Application Layer | HTTP, HTML & TELNET | Alison
Loading

Module 1: Application Layer

Notes
Study Reminders
Support
Text Version

Application Layer: HTTP, HTML & TELNET

Set your study reminders

We will email you at these times to remind you to study.
  • Monday

    -

    7am

    +

    Tuesday

    -

    7am

    +

    Wednesday

    -

    7am

    +

    Thursday

    -

    7am

    +

    Friday

    -

    7am

    +

    Saturday

    -

    7am

    +

    Sunday

    -

    7am

    +

Application Layer: HTTP, HTML & TELNET
Hello. So, we will continue our discussion on HTTP, HTML and TELNET. So, as youhave as we have seen that that HTTP clients are it works on a client server mode. So,HTTP client typically browsers will request to the HTTP server which are web server.And it will reflect it will basically respond the web document to the things right. So, thisdocuments are typically in a formatted in a in a hypertext markup language right. So, thisis a structured language which allows a parser or HTTP which is there in the HTTPbrowser to look at the document and appropriately display the document on the screenright.So, what we will do as these days HTML are taught a from the school days itself. So, Ibelieve that most of you have some knowledge on the HTML, but what we’ll we do, wewill do we will look at a quickly at that different aspects of this HTML document right.So, before that one thing I thought of mentioning which might have missed in theprevious lecture that is this a concept of HTTP proxy right. So, this is interesting we willrevisit some time at the latter of the thing while look at the things.(Refer Slide Time: 01:41)Just to have before going to the HTML, so there is a concept of HTTP proxy server orproxy. So, what it does it proxies for the HTTP server right. So, there are different aspectof it right. So, it can it can catch something, it can even do some sort of a filteringoperations that who will be allowed, which type of data it can log data and type of thing.So, there is an intermediate server which access a proxy server. So, there are different setof proxy server just to mention that there is a this thing called HTTP proxy right. So, wewill come to that in a later stage when we will discussed on a on proxy severs.(Refer Slide Time: 02:23)Now, the HTML stands for hypertext markup language, it is a computer language used tocreate web pages right. And many of us have tried our hand, but these days lot of toolsare available. So, mostly we are not doing directly HTML coding, but using some toolsto code that. Tags tell the web browser how to display a page right, the tag tells a webbrowser how to display a page. Can have either htm or star html extension. So, the pagecan be dot html or htm. So, this there are it is a tag language right. Tag means it I will seethat there will be an opening tag and closing tag. And the content the tag dictates or tellsthe web browser that how the page need to be displayed, and in which colour, whichformat and how it need to be displayed which location and so on and so forth.(Refer Slide Time: 03:15)So, HTML elements, tags are the elements that create components of the page, tagsurrounded by a greater than and less than and greater than bracket usually come in pairsright. So, it is there should be a start tag, and there should be a end tag. So, p slash p, sofor say tag for paragraph this is that. Stuff in between are element content right. Tags arenot case sensitive, new standard to use lower cases right.(Refer Slide Time: 03:49)So, like a typical HTML document should have a HTML tag of HTML and slash HTMLwith source it is a HTML document. There is a header which you can give head that tag,and header can have title and other things, there can be a body or content tag.(Refer Slide Time: 04:09)Right like what we see here like these are document type definitions which is in thatDTD which defines that what are the things can be defined in HTML. And if you look atthat HTML, HTML are the container of the whole document. Header is the title of thepage right body of the content of the page. So, it comes up like this.(Refer Slide Time: 04:35)Like if we look at the IITKgp page. So, here if you see that is a particular title of thepage is being displayed like which Indian Institute of Technology Kharagpur and type ofthings right. So, the finally, the thing which is displayed by the browser is a HTML,some form of a HTML page.(Refer Slide Time: 04:54)So, there are different tags it is first of all not possible to discuss all the tags and it maynot be necessary also. So, those who are working on writing HTML should refer a bookor web document some web documents to write things. So, and there are different goodtutorial one that is the one of www consortium or w3 schools are excellent tutorials arethere to for beginners to look at it. So, some popular tags are mostly used one is theheading. So, you can have different level of headings like a in word document (ReferTime: 05:36) and there are paragraph insert a line in between and before the a paragraph.(Refer Slide Time: 05:41)Like here are different types of headings. Similarly, we can have different type ofparagraphs also.(Refer Slide Time: 05:48)There are other tags which are interesting what we say link tag right. So, one documentlinking to other and type of those. So, three types of link. Link to a page of the samefolder right, you can link to the same folder; link to a page of a different folder; and linkoutside the web page on the internet. So, it can be in the same folder the link is there. So,it can be some data to be popped up or image etcetera. And something in a differentfolder, so that link, but within that page or something can be totally outside the pagedomain itself.(Refer Slide Time: 06:23)So, similarly it is like a if I have that link a href www IITKgp ac dot in then go toIITKgp home page, so I can have this sort of a linking to the things. So, two component,one is the address and the text describing the component. So, what we see that the textwill be some sort of a hyperlink where if you click it will go to that particular page.(Refer Slide Time: 06:49)And we can have different things we can have image image resource tags. So, empty tagno closing tag here. So, it is image source is the particular url. So, alternate is thedescription of the image. And url the points to the location of the particular file whichwhere the file is there it points to the things. And alt describes the image on the screenreader right. So, what is the description of the image on when we the description is givenon the thing right. So, I can have IIT Kharagpur, say main building (Refer Time: 07:26)image or I can say something some other particular region image other type of things.(Refer Slide Time: 07:36)So, in this one example that same folder sample Pic dot gif document relative link; lookfor image in the same folder different folder names. So, I can have slash images slashsamplePic dot gif. Either it may be same folder or in a different folder in that case I haveto specify the particular folder.(Refer Slide Time: 07:57)So, this is another thing division or section of the document. Use group of elements toapplying format or style example div color, say title of the section, say computer networklike here we have written a page. Say if I try to show you, say I open it in a note pad andsave it file save as, so I saved it on the desktop. Say I say sample HTML say 1 dot htmlright. So, this is the file name I saved.And if I go to this particular sample file where it is saved, let me just check the filewhere it is OK let me save in a another folder. Open file, save as in the desktop I have afolder called SKG sample 1 dot HTML we can save. So, now, if we go to that particularfolder then we can have those data displayed. So, let me check where the SKG say this isthe sample I opened this. Open. So, this is displays, hello from HTML that if you if welook at we it was there right, sample page, then hello from NPTEL particular colorchange in a section etcetera. So, it is getting displayed out here. So, not a good lookingpage, you need to have a good aesthetic of having that page to be displayed neverthelessyou can write a very simple page just like that right.(Refer Slide Time: 10:31).Like it is, it will show us like it was showing like this. Similarly, I can have meet mypages having like in this particular example page that different important links etcetera, Ican able to display those links right.(Refer Slide Time: 10:41)So, this is if we look at it a typical HTML document which have a title header, yourcontents and so on and so forth.(Refer Slide Time: 10:52)So, here is another page where the if we write that document I can have this sort of adocument here. Again we can look at this particular thing. Say if I copy these, file saveas let me save as a html 2 dot htm, save. Go to that folder now let me go to skg and thenthis is the array. So, course says personal xyz and I think something is there say there issome error so that is showing something some wrong or things are there. So, it is more ofa other than the syntax, it is if you find it is more of a if your aesthetic sense whichmakes a page more appealing and type of things. Definitely a contact content syntaxtechnology is there, but designing a page is more of a aesthetic of the of the person whois designing the page, so that that the html.(Refer Slide Time: 12:12)And we can have different type of things next color text color, link color, backgroundcolor, choose font size and type of thing. So, lot of text level things are there. So, withthis we now try to look at this this covers our http and html basics. Some of the aspectswe will be revisiting rather in different cases we will be again picking up some of thisaspect. So, the next thing what we want to discuss is that another protocol which is calledTELNET. So, what we have seen protocol called DNS, http one we like to see thisprotocol or FTP and this another very popular protocol for TELNET primarily used forremotely logging in to a system. So, I can TELNET to a server to another server at a atthe other end of the network or in the same network or a different network.(Refer Slide Time: 13:15)So, if we look at it, so there is a telnet client and there is a telnet server. There the clientrequest goes the input to the things, it open ups takes the action on the things and returnit back. So, if I say that the client program is telnet, the at the server there is a telnetserver should be running. Typically what we say it is a telnet d daemon. So, somethingthe protocol is telnet; and the application is also telnet. Like if I say the protocol iscapital HTTP the application is small http type of things or the client is there server isHTTP there, here also there.(Refer Slide Time: 13:56)So, just to show the thing to telnet is the protocol that provides a general bidirectionaleight bit byte-oriented communication facility. Telnet is a program that supportsTELNET protocol over TCP. So, it is a connection-oriented service. Many applicationprotocols are built upon the telnet protocol. So, I can build telnet as the some sort of apiggyback on telnet and build different applications underlying it will be using theTELNET protocol right, because it has a TCP oriented connection it is a bidirectionalconnection and so forth. So, name several protocol exploits this TELNET protocol.
Application Layer: HTTP, HTML & TELNET - Part 2
So, the RFCs 854 TCP connection, the popular telnet port is port 23, but I can do telnetin other port. Like a way I have seen in the HTTP also the well known port is port 80, butI can do in different port here also. Data and control are over the same connection right.So, there is a another term comes into play while we talk about telnet is the networkvirtual terminal. Intermediate representation of a generic terminal, provides a standardlanguage for communication of terminal control functions right. So, it is a intermediaterepresentation of generic terminal, provide a standard language for communication ofterminal control function, so that is a network virtual terminal.(Refer Slide Time: 15:28)So, like that what we see underlying TCP is there over that NVT is there, over that thereare different server processes right. So, what we have TCP, NVT server processes, andthis communicates with the server processes, client communicates with the serverprocess right, so that is the telnet. If I look at, it is the telnet client which is looking at thetelnet server in turn they have both have this NVT or the network virtual terminals. So,as we have seen intermediate representation of a generic terminal, so that it showsbecause telnet at the end you are trying to open up a terminal at the other end right.So, from here you are trying to open up another terminal, work on that particular othermachines. So, this is there. Provided standard language for communication for the timerand control function otherwise there will be lot of problem with the escape charactersand type of thing. So, it provides the things. Underlying the TCP is there, that is theconnection-oriented transport layer functionality.(Refer Slide Time: 16:34)And if you look at the TELNET server have different type of things one is the userapplications right, another is there are different server control or the control interface.There is a access and multi-user interface right. There are there can be multiple multiuserinterface or telnet need to handle that. So, the client when it connects, it is connectsto the server and server takes care of those at the background thing.(Refer Slide Time: 17:01)So, there are several negotiated option that all NVT supports a minimal set of capabilitiesright. So the whichever is the system and type of things, it should support a minimum setof capability. Some terminal have more capability than the minimal set that is absolutelyno issue, but they should have a minimal set. The set of options is not a part of the telnetprotocol. This options are not a part of these things, so that new terminal features can beincorporated without changing the telnet protocol. So, it TELNET protocol is more onmaking this communication to happen over this net right.So, if you are increasing option or changing the option that is without effecting the telnetprotocol. So, it detached it and gives a better interoperability. Two end points negotiate aset of mutual acceptable options right, so line mode and verses character mode, echomode that whatever is there it a echoing back there is a character set EBCDIC versusASCII and type of thing. So, they need to the end point need to negotiate mutually on aacceptable option; otherwise whatever you are keying in need to be transmitted andexecuted to the other end that will be a serious problem on that.(Refer Slide Time: 18:21)There are several control function. The TELNET includes support for series of controlfunction commonly supported by the servers right so series of. This provides a uniformmechanism for communication of control function. So, there is a set of control functions,which are supported by the server. And this control functions allows this overallcommunication thing to happen right.(Refer Slide Time: 18:51)So, some of the control functions are here, like one is Interrupt Process IP suspend abortprocess; or abort output sends no more output to the user terminal. Are you there, somesort of a are you alive type of things check to see if the system is still running. There isErase Character or EC delete last character sent right. So, there is a erase charactercontrol function, because there may be need to delete the last character which may besomething extra character is coming into. Erase line delete all inputs in the current lineright. So, these are the things which are which are different control function a set of somesample set of control functions of the TELNET.(Refer Slide Time: 19:44)So, all TELNET commands and control flow throw the same TCP connection. So, thereis one thing. So, there is no separate data and control connection unlike FTP right therewas port 20, 21, one is data for one is control type of things, they are the same TCPconnection. Commands starts with a special character called interpret command escapecharacter or IAC code. So, there is a called IAC code is typically 255. And if a 255 issent as data, then there should be followed by another 255 right. So, if the data itself is a255, then it should be followed by another 255. If the IAC is found, the next byte is if aIAC found, the next byte is IAC, a single byte is represented to application and terminal.If IAC is followed by any other code, the TELNET layer interprets this as a commandlike. So, IAC after that there is any other code the TELNET interprets as a command andtry to execute it as per the protocol for that commands or the rules for that commands.(Refer Slide Time: 20:50)So, you can use telnet program to play with TELNET protocol right, or to work with theTELNET protocol. Telnet is a generic TCP/IP client right. So, it is generic TCP sorryTCP client. Sends whatever you type on the TCP socket prints whatever comes backs tothe TCP socket, so it is a very simple and vanilla type of things useful for test testingTCP servers. ASCII based protocols right. So, there are different TCP servers which youcan useful for testing. Even I can test say mail server. So, mail like SMTP is typically inport 25. So, if I say telnet, some mail server, port 25, it will respond back right. So, this isthis is a mode of a I can we can roughly say it is a mode of a carrier protocol which takesthe things and get the commands (Refer Time: 21:49) if that particular thing is allowed inthat particular other end of the server.So, many Unix systems have these servers running by default, like is one is echo serverwhich runs in port 7; there is a discard server which is in port 9; daytime server whichresponds with the day time is port 13; chargen server which is at port 19. So, these arethe different servers which are different Linux systems run by default.(Refer Slide Time: 22:20)Like here if we do a port 7 that is echo server and give something then it responds backlike I say particular this is all fictitious thing means not mean some what we say examplescenario, telnet skg cse dot edu nothing as such nothing is there means no such server.So, it tries to the IP and then once it is connected, then it gives that particular escapecharacter. And whatever you give it gives you a return it back. And then once you quit,then it closes the connection. So, echo server is very handy to see that how whether thatparticular telnet server is running or not at the other end and whether it is respondingproperly. So, is a first level of cross check on the whole system.(Refer Slide Time: 23:14)So, if we look at this particular telnet scenario, so it is it is basically what we have say Ican have a telnet client and one end and the telnet server can be on the same system or ina different system right. So what we what we do telnet to a particular server and then Ican execute some program right. I can access directly etcetera here right. I can telnet toanother server to a particular server and access the things, all provided you have theaccess to that particular server, so that means, if not only the requirement of the clienttelnet server, there is a requirement of authentication for that or what we say the usershould be authenticated other end. So, when we you go for when we do a telnet, itusually replies it prompts back by a login password. So, you have a if you are having alogin password into the system, then you logged into the system and then you canbrowse to the directory structure, you can execute any program and type of things right.So, it can be within the system I can do a telnet into the within the system or I can do atelnet to a other system right. I can do a telnet to a any system over the network right.And once you there, the connection is established, the connection stays with that, so longthe execution is there or there is some error etcetera and you can whatever the whateverthe permission set provided at the other end is the accessibility of the client or the clientor the user right. So, if you are given access to different directories etcetera you canaccess that and so and so forth so that you can do, it is as if you go as a user to that loginfrom a remote location, so that you can do that.Okay, so with this let us conclude our today’s discussion. The thing what we have seentoday is two important protocol right which one is making this www to happen right. So,it is the hyper HTTP or hyper text transfer protocol. And along with HTML which is themarkup languages. There are different other markup languages we’ll see some of thesethings, but HTML is the most popular things and the browser any browser understandhow to interpret the HTML. So, the browser has a some sort of a HTML interpreter or aparser, which parse the html tag and displays as per the things which is been given right.So, this makes that whole information gateway or information all this exchange possibleover this underlying network, so that is the one thing.Another thing what we have seen is a protocol which is which is a connection-orientedprotocol is telnet which allows to remotely connect to the things right. One is thatextracting information and display on the thing another is remotely connection to aanother server, another machine which is either in the in your own network or ownsystem I can telnet if the server is running from that I can telnet to the same server or inany server in the things. It allows me to work on another system and execute the thingright. So, this and as you have seen it is a very simple type of or very what is vanilla typeof protocol and it allows lot of things to piggy back on it.So, telnet becomes a carrier to different thing to execute on the things, because itestablished a connection connection-oriented service. And any other applications whichwant to piggy back on the telnet is it is possible to do that right. And one other type ofthings what will be discussing in the in the application layer protocol in our subsequenttalk is one is for this mail type of thing or SMTP type of server. And another is some sortof a management type of server or SNMP type of server. So, with this let us concludetoday.Thank you.

Notification
You have received a new notification
Click here to view them all