15.4 Application Layer Examples 15.4.1 Telnet Instructor Note One purpose of telnet is described. Another purpose, common as a second semester troubleshooting tool, is to telnet into various routers. As a simple activity, you may want to have the students telnet into another computer via your LAN. This target indicator describes the details of the Telnet process. Emphasis is on the client-server model and the 7 OSI layers. Terminal emulation (Telnet) software provides the ability to remotely access another computer. It allows you to log in to an Internet host and execute commands. A Telnet client is referred to as a local host, and a Telnet server, which uses special software called a daemon, is referred to as a remote host. To make a connection from a Telnet client, you must select a connection option. A dialog box prompts you for a "Host Name" and "Terminal Type". The host name is the IP address (DNS) of the remote computer that you wish to connect to; and the terminal type describes the type of terminal emulation that you want the computer to perform. The Telnet operation uses none of the transmitting computers processing power; instead, it transmits the keystrokes to the remote host and sends the resulting screen output back to the local monitor. All processing and storage take place on the remote computer. Telnet begins with the e-mail process. When you enter a DNS name for a Telnet location, the name must be translated into its associated IP address before a connection can be established. The Telnet application works mainly at the top three layers of the OSI model - the application layer (commands), the presentation layer (formats, usually ASCII), and the session layer (transmits). The data then passes to the transport layer where it is segmented, and the port address and error checking are added. The data then passes to the network layer where the IP header (containing the source and destination IP addresses) is added. Next, the packet travels to the data link layer, which encapsulates the packet in a data frame, adds the source and destination MAC address, and a frame trailer. If the source computer doesnt have the MAC address of the destination computer, it performs an ARP request. When the MAC address has been determined, the frame travels across the physical medium (in binary form) to the next device.When the data reaches the remote host computer, the data link, network, and transport layers, reassemble the original data commands. The remote host computer executes the commands and transmits the results back to the local client computer by using the same process of encapsulation that delivered the original commands. This whole process repeats itself, sending commands and receiving results, until the local client has completed the work that needs to be done. When the work is done, the client terminates the session. Web Links What is Telnet? 15.4 Application Layer Examples 15.4.2 File transfer protocol Instructor Note The purposes of ftp are described. As a simple activity, you may want to have the students download a small file using ftp. This target indicator describes the details of the Telnet process. Emphasis is on the client-server model and the 7 OSI layers. File transfer protocol (FTP) is designed to download files (e.g. receive from the Internet) or upload files (e.g. send to the Internet). The ability to upload and download files on the Internet is one of the most valuable features the Internet has to offer, especially for those people who rely on computers for many purposes, and who may need software drivers and upgrades immediately. Network administrators can rarely wait even a few days to get the necessary drivers that enable their network servers to function again. The Internet can provide these files immediately by using FTP. FTP is a client-server application just like e-mail and Telnet. It requires server software running on a host that can be accessed by client software. An FTP session is established the same way in which a Telnet session is established. And, just like Telnet, the FTP session is maintained until the client terminates it, or there is some sort of communication error. Once you establish a connection to an FTP daemon, you must supply a login ID and a password. Normally, you would use "anonymous" as the login ID, and your e-mail address as the password. This type of connection is known as anonymous FTP. Upon establishing your identity, a command link opens between your client machine and the FTP server. This is similar to a Telnet session, in which commands are sent and executed on the server and the results returned to the client. This feature allows you to create and change folders, erase and rename files, or execute many other functions associated with file management. The main purpose of FTP is to transfer files from one computer to another by copying and moving files from servers to clients, and from clients to servers. When you copy files from a server, FTP establishes a second connection, a data link between the computers, across which the data is transferred. Data transfer can occur in ASCII mode or in binary mode. These two modes determine how the data file is to be transferred between the stations. After the file transfer has ended, the data connection terminates automatically. After you have completed the entire session of copying and moving files, you may log off, thus closing the command link, and ending the session. Another protocol that has the ability to download files is Hypertext Transfer Protocol (HTTP), which you will learn about in the next section. One limitation of HTTP is that you can only use it to download files, and not upload them. 15.4 Application Layer Examples 15.4.3 Hypertext transfer protocol Instructor Note The purpose of http and its relation to the WWW are explained. it is very important to "uncover" the mystery behind this ubiquitous protocol. Students use it every day, but few can describe what is going on when http is typed. This makes cyberspace a little less magical. The purpose of this target indicator is to give the student a precise definition of hyperlinks. For those with a fair amount of programming background, you might want to compare hyperlinks to pointer variables and linked lists.The purpose of this target indicator is to have a student dissect a URL. the students use URLs every day but rarely take the time to understand them in detail. This makes cyberspace a little less magical.A short definition of and examples of redirectors are presented. Hypertext Transfer Protocol (HTTP) works with the World Wide Web, which is the fastest growing and most used part of the Internet. One of the main reasons for the extraordinary growth of the Web is the ease in which it allows access to information. A Web browser (along with all the other network applications covered in this chapter) is a client-server application, which means that it requires both a client and a server component in order to function. A Web browser presents data in multimedia formats on Web pages that use text, graphics, sound, and video. The Web pages are created with a format language called Hypertext Markup Language (HTML). HTML directs a Web browser on a particular Web page to produce the appearance of the page in a specific manner. In addition, HTML specifies locations for the placement of text, files, and objects that are to be transferred from the Web server to the Web browser. Hyperlinks make the World Wide Web easy to navigate. A hyperlink is an object (word, phrase, or picture) on a Web page that, when clicked, transfers you to a new Web page. The Web page contains (often, hidden within its HTML description) an address location known as a Uniform Resource Locator (URL). In the following example, the "http://" tells the browser which protocol to use. The second part, "www", tells the browser what type of resource it wishes to contact. The third part, "cisco.com," identifies the domain of the Web server IP address. The last part, "edu" identifies the specific folder location (on the server) that contains the Web page. Example: http://www.cisco.com/edu/When you open a Web browser, the first thing you usually see is a starting (or "home") page. The URL of the home page has already been stored in the configuration area of your Web browser and can be changed at any time. From the starting page you can click on one of the Web page hyperlinks, or type a URL in the browsers address bar. The Web browser then examines the protocol to determine if it needs to open another program, and determines the IP address of the Web server. After that, the transport layer, network layer, data link layer, and physical layer initiate a session with the Web server. The data that is transferred to the HTTP server contains the folder name of the Web page location. (Note: The data can also contain a specific file name for an HTML page.) If no name is given, the server uses a default name (as specified in the servers configuration). The server responds to the request by sending all of the text, audio, video, and graphic files, as specified in the HTML instructions, to the Web client. The client browser reassembles all the files to create a view of the Web page, and then terminates the session. If you click on another page that is located on the same, or a different server, the whole process begins again. Web Links Hypertext Transfer Protocol Summary In this chapter, you learned about the functions of the application layer and the different processes that occur as data packets travel through this layer. More specifically, you learned that the application layer: identifies and establishes the availability of intended communication partners synchronizes cooperating applications establishes agreement on procedures for error recovery controls data integrity In addition, you learned that the application layer supports:direct and indirect network applications the domain name system Telnet, FTP and HTTP Now that you have completed this chapter, you should have a firm understanding of how the application layer provides services from the host to the destination.