Chapter 4. Application Layer

Objectives

Upon completion of this chapter, you will be able to answer the following questions:

Image How do the functions of the application layer, session layer, and presentation layer work together to provide network services to end-user applications?

Image How do common application layer protocols interact with end-user applications?

Image Which common application layer protocols provide Internet services to end users, including World Wide Web services and email?

Image Which application layer protocols provide IP addressing services, including DNS and DHCP?

Image How do well-known application layer protocols allow for sharing services, including FTP, file sharing services, and SMB protocol?

Key Terms

This chapter uses the following key terms. You can find the definitions in the Glossary.

application layer page 141

presentation layer page 142

session layer page 142

TCP/IP application layer page 143

network-aware applications page 144

application layer services page 144

peer-to-peer (P2P) networking page 145

GET page 151

POST page 151

PUT page 151

HTTP Secure (HTTPS) protocol page 151

Post Office Protocol (POP) page 151

Simple Mail Transfer Protocol (SMTP) page 151

Mail Transfer Agent (MTA) page 152

Mail Delivery Agent (MDA) page 152

domain names page 155

Domain Name System (DNS) page 155

nslookup page 157

File Transfer Protocol (FTP) page 161

Server Message Block (SMB) page 162

Introduction (4.0.1.1)

We experience the Internet through the World Wide Web, email services, and file sharing programs. These applications, and many others, provide the human interface to the underlying network, enabling us to send and receive data with relative ease. Typically the applications that we use are intuitive and transparent, meaning we can access and use them without knowing how they work. However, for network professionals, it is important to know how an application is able to format, transmit, and interpret messages that are sent and received across the network.

Visualizing the mechanisms that enable communication across the network is made easier if we use the layered framework of the OSI model.

In this chapter, we will explore the role of the application layer and how the applications, services, and protocols within the application layer make robust communication across data networks possible.


Image

Class Activity 4.0.1.2: Application Investigation

In this activity, you will envision what it would be like not to have network applications available to use in the workplace.


Application Layer Protocols (4.1)

Data that is sent across networks is generated by a person or device using some type of computer application. Which protocols an application uses depends on the purpose of the application.

Application, Session, and Presentation (4.1.1)

Image
Layers 5-7 - The Upper Layers

In this section you will learn about the services of the three top layers of the OSI model and the application layer of the TCP/IP model.

OSI and TCP/IP Models Revisited (4.1.1.1)

Networking professionals use the OSI and TCP/IP models to communicate both verbally and in written technical documentation. As such, networking professionals can use these models to describe the behavior of protocols and applications.

In the OSI model, data is passed from one layer to the next, starting at the application layer on the transmitting host, and proceeding down the hierarchy to the physical layer, and then passing over the communications channel to the destination host, where the data proceeds back up the hierarchy, ending at the application layer.

The application layer is the top layer of both the OSI and TCP/IP models. The TCP/IP application layer includes a number of protocols that provide specific functionality to a variety of end-user applications. The functionality of the TCP/IP application layer protocols fits roughly into the framework of the top three layers of the OSI model: application, presentation, and session layers. The OSI model Layers 5, 6, and 7 are used as references for application software developers and vendors to produce products, such as web browsers that need to access networks.

Application Layer (4.1.1.2)

The process of network communication starts with a device running an application at the application layer, to form a message. The application layer formats that message in preparation for its journey.

The application layer is closest to the end user. As shown in Figure 4-1, it is the layer that provides the interface between the applications we use to communicate and the underlying network over which our messages are transmitted. Application layer protocols are used to exchange data between programs running on the source and destination hosts. There are many application layer protocols, and new protocols are always being developed. Some of the most widely known application layer protocols include Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Trivial File Transfer Protocol (TFTP), Internet Message Access Protocol (IMAP), and Domain Name System (DNS) protocol.

Image

Figure 4-1 Application Layer Protocols

Presentation and Session Layers (4.1.1.3)

The presentation and session layers from the OSI model are folded into the application layer in the TCP/IP model.

The Presentation Layer

The presentation layer has three primary functions:

Image Formats, or presents, data from the source device into a compatible form for receipt by the destination device

Image Compression of the data in a way that can be decompressed by the destination device

Image Encryption of the data for transmission and the decryption of data upon receipt by the destination

As shown in Figure 4-2, the presentation layer formats data for the application layer and it sets standards for file formats. Some well-known standards for video include QuickTime and Motion Picture Experts Group (MPEG). QuickTime is an Apple computer specification for video and audio, and MPEG is a standard for video and audio compression and coding.

Image

Figure 4-2 Presentation Layer Functions

Among the well-known graphic image formats that are used on networks are Graphics Interchange Format (GIF), Joint Photographic Experts Group (JPEG), and Portable Network Graphics (PNG) format. GIF and JPEG are compression and coding standards for graphic images. PNG was designed to address some of the limitations of the GIF format and to eventually replace it.

The Session Layer

As the name implies, functions at the session layer create and maintain dialogs between source and destination applications. The session layer handles the exchange of information to initiate dialogs, keep them active, and restart sessions that are disrupted or idle for a long period of time.

TCP/IP Application Layer Protocols (4.1.1.4)

Image
Application Layer

Whereas the OSI model separates the individual application, presentation, and session functions, most widely known and implemented TCP/IP applications incorporate the functionality of all three layers.

The TCP/IP application layer protocols specify the format and control information necessary for many common Internet communication functions. Among these TCP/IP protocols are

Image Domain Name System (DNS): This protocol resolves Internet names to IP addresses.

Image Telnet: This protocol is used to provide remote access to servers and networking devices.

Image Simple Mail Transfer Protocol (SMTP): This protocol transfers mail messages and attachments.

Image Dynamic Host Configuration Protocol (DHCP): This protocol is used to assign an IP address, subnet mask, default gateway, and DNS server addresses to a host.

Image Hypertext Transfer Protocol (HTTP): This protocol transfers files that make up the web pages of the World Wide Web.

Image File Transfer Protocol (FTP): This protocol is used for interactive file transfer between systems.

Image Trivial File Transfer Protocol (TFTP): This protocol is used for connectionless active file transfer.

Image Bootstrap Protocol (BOOTP): This protocol is a precursor to the DHCP protocol. BOOTP is a network protocol used to obtain IP address information during bootup.

Image Post Office Protocol (POP): This protocol is used by email clients to retrieve email from a remote server.

Image Internet Message Access Protocol (IMAP): This is another protocol for email retrieval.

Application layer protocols are used by both the source and destination devices during a communication session. For the communications to be successful, the application layer protocols implemented on the source and destination host must be compatible.


Image

Activity 4.1.1.4: Application Layer Protocols

Go to the online course and perform the application layer protocol exercise.


Services at the Application Layer (4.1.1.5, 4.1.1.6)

Application layer protocols enable humans to interface with the underlying data network. When we open a web browser or an instant message window, an application is started, and the program is put into the device’s memory, where it is executed. Each executing program that is loaded on a device is referred to as a process.

Within the application layer, there are two forms of software programs or processes that provide access to the network: network-aware applications and application layer services.

Network-Aware Applications

End-user applications are the software programs used by people to communicate over the network. Some end-user applications are network-aware applications, meaning that they implement the application layer protocols and are able to communicate directly with the lower layers of the protocol stack. Email clients and web browsers are examples of these types of applications.

Application Layer Services

Other programs may need the assistance of application layer services to use network resources, like file transfer or network print spooling. Though transparent to the user, application layer services are programs that interface with the network and prepare the data for transfer. Different types of data—whether it is text, graphics, or video—require different network services to ensure that the data is properly prepared for processing by the functions occurring at the lower layers of the OSI model.

Each application or service uses protocols that define the standards and data formats to be used. Without protocols, the data network would not have a common way to format and direct data. To understand the function of various network services, familiarize yourself with the underlying protocols that govern their operation.

Many different types of applications communicate across data networks. Therefore, application layer services must implement multiple protocols to provide the desired range of communication experiences. Each protocol has a specific purpose and contains the characteristics required to meet that purpose. The right protocol details in each layer must be followed so that the functions at one layer interface properly with the services in the lower layer.


Image

Activity 4.1.1.5: Software Processes

Go to the online course and perform the interactive exercise.


Applications and services may also use multiple protocols in the course of a single conversation. One protocol may specify how to establish the network connection, and another protocol may describe the process for the data transfer when the message is passed to the next-lower layer.

Whereas applications provide people with a way to create messages, and application layer services establish an interface to the network, protocols provide the rules and formats that govern how data is treated. All three components may be used by a single executable program and can even use the same name. For example, when discussing Telnet, we could be referring to the application, the service, or the protocol.


Image

Video 4.1.1.6:

View the video in the online course for a demonstration of services in the OSI model.


Applications Interface with People and Other Applications (4.1.1.7)

In the OSI model, applications that interact directly with people are considered to be above the OSI layers, as are the users themselves. User applications, such as a web browser or email program, are not a part of the OSI or TCP/IP application layer. It is the application layer protocols that enable the function of the user applications.


Image

Activity 4.1.1.8: Application Protocols and Standards

Go to the online course and perform the interactive exercise.


How Application Protocols Interact with End-User Applications (4.1.2)

Image
Classifying Networks by Architecture

In this section you will learn about protocols used in peer-to-peer networks and client/server networks.

Peer-to-Peer Networks (4.1.2.1)

Image
Peer to Peer Architecture

When accessing information on a networking device, whether it is a PC, laptop, tablet, smartphone, or some other device connected to a network, the data may not be physically stored on the device. In this case, a request to access that information must be made to the device where the data resides. In the peer-to-peer (P2P) networking model, the data is accessed from a peer device without the use of a dedicated server.

The P2P network model involves two parts: P2P networks and P2P applications. Both parts have similar features, but in practice work quite differently.

In a P2P network, two or more computers are connected via a network and can share resources (such as printers and files) without having a dedicated server. Every connected end device (known as a peer) can function as both a server and a client. One computer might assume the role of server for one transaction while simultaneously serving as a client for another. The roles of client and server are set on a per-request basis.

An example is a simple home network with two computers, as shown in Figure 4-3. In this example, Peer2 has a printer attached to it directly by USB and is set up to share the printer on the network so that Peer1 can print to it. Peer1 is set up to share a drive or folder on the network. This allows Peer2 to access and save files to the shared folder. In addition to sharing files, a network such as this one would allow users to enable networked games, or share an Internet connection.

Image

Figure 4-3 Peer-to-Peer Networking

P2P networks decentralize the resources on a network. Instead of locating data to be shared on dedicated servers, data can be located anywhere and on any connected device. Most of the current operating systems support file and print sharing without requiring additional server software. However, P2P networks do not use centralized user accounts or access servers to maintain permissions. Therefore, it is difficult to enforce security and access policies in networks containing more than just a few computers. User accounts and access rights must be set individually on each peer device.

Peer-to-Peer Applications (4.1.2.2)

A peer-to-peer (P2P) application allows a device to act as both a client and a server within the same communication. In this model, every client is a server and every server is a client. Both can initiate a communication and are considered equal in the communication process. However, P2P applications require that each end device provide a user interface and run a background service. When you launch a specific P2P application, it loads the required user interface and background services; afterward, the devices can communicate directly.

Some P2P applications use a hybrid system where resource sharing is decentralized but the indexes that point to resource locations are stored in a centralized directory. In a hybrid system, each peer accesses an index server to get the location of a resource stored on another peer. The index server can also help connect two peers, but after they are connected, the communication takes place between the two peers without additional communication to the index server.

P2P applications can be used on P2P networks, client/server networks, and across the Internet. Figure 4-4 depicts a remote P2P network topology.

Image

Figure 4-4 Peer-to-Peer Applications

Common P2P Applications (4.1.2.3)

With P2P applications, each computer in the network running the application can act as a client or a server for the other computers in the network running the application. Common P2P applications include

Image eDonkey

Image eMule

Image Shareaza

Image BitTorrent

Image Bitcoin

Image LionShare

Some P2P applications are based on the Gnutella protocol. They enable people to share files on their hard disks with others. Gnutella-compatible client software allows users to connect to Gnutella services over the Internet and to locate and access resources shared by other Gnutella peers. Many client applications are available for accessing the Gnutella network, including BearShare, Gnucleus, LimeWire, Morpheus, WinMX, and XoloX.

While the Gnutella Developer Forum maintains the basic protocol, application vendors often develop extensions to make the protocol work better with their application.

Many P2P applications do not use a central database to record all the files available on the peers. Instead, the devices on the network each tell the others what files are available when queried, and use the file sharing protocol and services to support locating resources.


Image

Lab 4.1.2.4: Researching Peer-to-Peer File Sharing

In this lab you will research P2P networks, protocols, and applications. You will also research P2P file sharing issues and legal issues.


Client-Server Model (4.1.2.5)

Image
Client Server Architecture

In the client/server model, the device requesting the information is called a client and the device responding to the request is called a server. Client and server processes are considered to be in the application layer. The client begins the exchange by requesting data from the server, which responds by sending one or more streams of data to the client. Application layer protocols describe the format of the requests and responses between clients and servers. In addition to the actual data transfer, this exchange may also require user authentication and the identification of a data file to be transferred.

One example of a client/server network is a corporate environment where employees use a company email server to send, receive, and store email. The email client on an employee computer issues a request to the email server for any unread mail. The server responds by sending the requested email to the client.

Although data is typically described as flowing from the server to the client, some data always flows from the client to the server. Data flow may be equal in both directions, or may even be greater in the direction going from the client to the server. For example, a client may transfer a file to the server for storage purposes. As shown in Figure 4-5, which depicts the client/server model and functions, data transfer from a client to a server is referred to as an upload and data transfer from a server to a client is referred to as a download.

Image

Figure 4-5 Client/Server Model

Well-Known Application Layer Protocols and Services (4.2)

There are hundreds of protocols used in computer networking, but this course will focus on a few well-known protocols.

Everyday Application Layer Protocols (4.2.1)

In this section, you will learn about common application protocols you commonly use.

Application Layer Protocols Revisited (4.2.1.1)

There are dozens of application layer protocols, but on a typical day you probably use only five or six. Three application layer protocols that are involved in everyday work or play are

Image Hypertext Transfer Protocol (HTTP)

Image Simple Mail Transfer Protocol (SMTP)

Image Post Office Protocol (POP)

These application layer protocols make it possible to browse the Web and send and receive email. HTTP is used to enable users to connect to websites across the Internet. SMTP is used to enable users to send email. And POP is used to enable users to receive email.

The next few pages focus on these three application layer protocols.

Hypertext Transfer Protocol and Hypertext Markup Language (4.2.1.2)

When a web address or uniform resource locator (URL) is typed into a web browser, the web browser establishes a connection to the web service running on the server using the HTTP protocol. URLs and Uniform Resource Identifier (URIs) are the names most people associate with web addresses.

The http://www.cisco.com/index.html URL is an example of a URL that refers to a specific resource; a web page named index.html on a server identified as cisco.com.

Web browsers are the type of client application a computer uses to connect to the World Wide Web and access resources stored on a web server. As with most server processes, the web server runs as a background service and makes different types of files available.

To access the content, web clients make connections to the server and request the desired resources. The server replies with the resources and, upon receipt, the browser interprets the data and presents it to the user.

Browsers can interpret and present many data types (such as plain text or Hypertext Markup Language, the language in which web pages are constructed). Other types of data, however, may require another service or program, typically referred to as plug-ins or add-ons. To help the browser determine what type of file it is receiving, the server specifies what kind of data the file contains.


Image

Activity 4.2.1.2: HTTP Protocol Process

Go to the online course and click the four graphics demonstrating how HTTP loads a web page in a browser.


To better understand how the web browser and web client interact, we can examine how a web page is opened in a browser. For this example, use the http://www.cisco.com/index.html URL.

First the browser interprets the three parts of the URL:

1. http (the protocol or scheme)

2. www.cisco.com (the server name)

3. index.html (the specific filename requested)

The browser then checks with a name server to convert www.cisco.com into a numeric address, which it uses to connect to the server (this is a DNS process and will be explained later in the chapter). Using HTTP requirements, the browser sends a GET request to the server and asks for the index.html file. The server sends the HTML code for this web page to the browser. Finally, the browser deciphers the HTML code and formats the page for the browser window.

HTTP and HTTPS (4.2.1.3)

HTTP is used across the network for data transfer and is one of the most used application protocols today. It was originally developed to simply publish and retrieve HTML pages; however, the flexibility of HTTP has made it a vital application within distributed, collaborative information systems.

HTTP is a request/response protocol. When a client, typically a web browser, sends a request to a web server, HTTP specifies the message types used for that communication. The three common message types are GET, POST, and PUT.

GET is a client request for data. A client (web browser) sends the GET message to the web server to request HTML pages. When the server receives the GET request, it responds with a status line, such as HTTP/1.1 200 OK, and a message of its own. The message from the server may include the requested HTML file, if available, or it may contain an error or information message, such as “The location of the requested file has changed.”

POST and PUT are used to upload data files to the web server. For example, when the user enters data into a form that is embedded within a web page (such as when completing an order request), the POST message is sent to the web server. Included within the POST message is the data that the user submitted in the form.

PUT uploads resources or content to the web server. For example, if a user attempts to upload a file or image to a website, a PUT message is sent from the client to the server with the attached file or image.

Although HTTP is remarkably flexible, it is not a secure protocol. The request messages send information to the server in plain text that can be intercepted and read. Similarly, the server responses, typically HTML pages, are also unencrypted.

For secure communication across the Internet, the HTTP Secure (HTTPS) protocol is used for accessing or posting web server information. HTTPS can use authentication and encryption to secure data as it travels between the client and server. HTTPS specifies additional rules for passing data between the application layer and the transport layer. HTTPS uses the same client request–server response process as HTTP, but the data stream is encrypted with Secure Sockets Layer (SSL) before being transported across the network. HTTPS creates additional load and processing time on the server due to the encryption and decryption of traffic.

SMTP and POP (4.2.1.4–4.2.1.7)

Email, the most popular network service, has revolutionized how people communicate through its simplicity and speed. Yet to run on a computer or other end device, email requires several applications and services. Two example application layer protocols are Post Office Protocol (POP) and Simple Mail Transfer Protocol (SMTP), shown in Figure 4-6. As with HTTP, these protocols define client/server processes.

Image

Figure 4-6 Email with SMTP and POP3

When people compose email messages, they typically use an email client, otherwise known as a Mail User Agent (MUA). The email client allows messages to be sent and places received messages into the client’s mailbox, both of which are distinct processes.

To receive email messages from an email server, the email client can use POP. Sending email from either a client or a server uses message formats and command strings defined by SMTP. Usually an email client provides the functionality of both protocols within one application.

The email server operates two separate processes:

Image Mail Transfer Agent (MTA)

Image Mail Delivery Agent (MDA)

The MTA process is used to forward email. As shown in Figure 4-7, the MTA receives messages from the email client or from another MTA on another email server. Based on the message header, it determines how a message must be forwarded to reach its destination. If the mail is addressed to a user whose mailbox is on the local server, the mail is passed to the MDA. If the mail is for a user that is not on the local server, the MTA routes the email to the MTA on the appropriate server.

Image

Figure 4-7 Email Server - MTA

In Figure 4-8, the MDA accepts a piece of email from an MTA and performs the actual delivery. The MDA receives all the inbound mail from the MTA and places it into the appropriate users’ mailboxes. The MDA can also resolve final delivery issues, such as virus scanning, spam filtering, and return-receipt handling. Most email communications use the MUA, MTA, and MDA applications; however, there are other alternatives for email delivery.

Image

Figure 4-8 Email server - MDA.

A client may be connected to a corporate email system, such as IBM’s Lotus Notes, Novell’s GroupWise, or Microsoft’s Exchange. These systems often have their own internal email format, and their clients typically communicate with the email server using a proprietary protocol. The server sends or receives email via the Internet through the product’s Internet mail gateway, which performs any necessary reformatting.

As another alternative, computers that do not have an email client can still connect to a mail service on a web browser to retrieve and send messages. Some computers may run their own MTA and manage interdomain email. If, for example, two people who work for the same company exchange email with each other using a proprietary protocol, their messages may stay completely within the company’s corporate email system.

Email can use the application layer protocols POP and SMTP, as shown in Figure 4-8. POP and POP3 are inbound mail delivery protocols and are typical client/server protocols. They deliver email from the email server to the client (MUA). The MDA listens for a client to connect to a server. After a connection is established, the server can deliver the email to the client.

The SMTP, on the other hand, governs the transfer of outbound email from the sending client to the email server (MDA), as well as the transport of email between email servers (MTA). SMTP enables email to be transported across data networks between different types of server and client software, and makes email exchange over the Internet possible.

The SMTP message format uses a rigid set of commands and replies. These commands support the procedures used in SMTP, such as session initiation, mail transaction, forwarding mail, verifying mailbox names, expanding mailing lists, and the opening and closing exchanges.


Image

Packet Tracer Activity 4.2.1.8: Web and Email

In this activity you will configure HTTP and email services using the simulated server in Packet Tracer. You will then configure clients to access the HTTP and email services.


Providing IP Addressing Services (4.2.2)

In this section you will learn about DNS and DHCP protocols and services.

Domain Name Service (4.2.2.1)

In data networks, devices are labeled with numeric IP addresses to send and receive data over networks. Most people cannot remember this numeric address. Domain names were created to convert the numeric address into a simple, recognizable name.

On the Internet, these domain names, such as http://www.cisco.com, are much easier for people to remember than 198.133.219.25, which is the actual numeric address for this server. If Cisco decides to change the numeric address of www.cisco.com, it is transparent to the user, because the domain name remains the same. The new address is simply linked to the existing domain name and connectivity is maintained. When networks were small, it was a simple task to maintain the mapping between domain names and the addresses they represented. As networks grew and the number of devices increased, this manual system became unworkable.

The Domain Name System (DNS) was created for domain name to address resolution for these networks. DNS uses a distributed set of servers to resolve the names associated with these numbered addresses.


Image

Activity 4.2.2.1: Resolving DNS

Go to the online course to observe the steps involved in DNS resolution. Click the buttons in the figure to see the steps.


The DNS protocol defines an automated service that matches resource names with the required numeric network address. It includes the format for queries, responses, and data. The DNS protocol communications use a single format called a message format. This message format is used for all types of client queries and server responses, error messages, and the transfer of resource record information between servers.

DNS Message Format (4.2.2.2)

A DNS server provides the name resolution using the Berkeley Internet Name Domain (BIND), or the name daemon, which is often called “named” (pronounced name-dee). BIND was originally developed by four students at the University of California Berkley in the early 1980s. The DNS message format used by BIND is the most widely used DNS format on the Internet.

The DNS server stores different types of resource records used to resolve names. These records contain the name, address, and type of record.

Some of these record types are

Image A: An end device address

Image NS: An authoritative name server

Image CNAME: The canonical name (or Fully Qualified Domain Name) for an alias; used when multiple services have the single network address but each service has its own entry in DNS

Image MX: Mail exchange record; maps a domain name to a list of mail exchange servers for that domain

When a client makes a query, the server’s BIND process first looks at its own records to resolve the name. If it is unable to resolve the name using its stored records, it contacts other servers to resolve the name.

The request may be passed along to a number of servers, which can take extra time and consume bandwidth. After a match is found and returned to the original requesting server, the server temporarily stores the numbered address that matches the name in cache memory.

If that same name is requested again, the first server can return the address by using the value stored in its name cache. Caching reduces both the DNS query data network traffic and the workloads of servers higher up the hierarchy. The DNS Client service on Windows PCs optimizes the performance of DNS name resolution by also storing previously resolved names in memory. The ipconfig /displaydns command displays all of the cached DNS entries on a Windows computer system.

DNS Hierarchy (4.2.2.3)

The DNS protocol uses a hierarchical system to create a database to provide name resolution. As shown in Figure 4-9, the hierarchy looks like an inverted tree, with the root DNS server at the top and branches below. DNS uses domain names to form the hierarchy.

Image

Figure 4-9 Hierarchy of DNS Servers

The naming structure is broken down into small, manageable zones. Each DNS server maintains a specific database file and is only responsible for managing name-to-IP mappings for that small portion of the entire DNS structure. When a DNS server receives a request for a name translation that is not within its DNS zone, the DNS server forwards the request to another DNS server within the proper zone for translation.


Note

DNS is scalable because hostname resolution is spread across multiple servers.


The different top-level domains represent either the type of organization or the country of origin. Examples of top-level domains are

Image .au: Australia

Image .co: Colombia

Image .com: a business or industry

Image .jp: Japan

Image .org: A nonprofit organization

After top-level domains are second-level domain names, and below them are other lower-level domains. Each domain name is a path down this inverted tree, starting from the root. For example, as shown in Figure 4-9, the root DNS server may not know exactly where the record for the email server, mail.cisco.com, is located, but it maintains a record for the .com domain within the top-level domain. Likewise, the servers within the .com domain may not have a record for mail.cisco.com, but they do have a record for the domain. The servers within the cisco.com domain have a record (an MX record to be precise) for mail.cisco.com.

DNS relies on this hierarchy of decentralized servers to store and maintain these resource records. The resource records list domain names that the server can resolve and alternative servers that can also process requests. If a given server has resource records that correspond to its level in the domain hierarchy, it is said to be authoritative for those records. For example, a name server in the cisco.netacad.net domain would not be authoritative for the mail.cisco.com record, because that record is held at a higher domain level server; specifically the name server in the cisco.com domain.

nslookup (4.2.2.4)

DNS is a client/server service; however, it differs from the other client/server services. Whereas other services use a client that is an application (such as web browser, email client), the DNS client runs as a service itself. The DNS client, sometimes called the DNS resolver, supports name resolution for other network applications and other services that need it.

When configuring a network device, we generally provide one or more DNS server addresses that the DNS client can use for name resolution. Usually the Internet service provider (ISP) provides the addresses to use for the DNS servers. When a user’s application requests to connect to a remote device by name, the requesting DNS client queries one of these name servers to resolve the name to a numeric address.

Computer operating systems also have a utility called nslookup that allows the user to manually query the name servers to resolve a given hostname. This utility can also be used to troubleshoot name resolution issues and to verify the current status of the name servers.

In Figure 4-10, when the nslookup command is issued, the default DNS server configured for your host is displayed. In this example, the DNS server is dns-sj.cisco.com, which has an address of 171.70.168.183.

Image

Figure 4-10 nslookup Command

The name of a host or domain can be entered at the nslookup prompt. In the first query in Figure 4-10, a query is made for www.cisco.com. The responding name server provides the address 198.133.219.25.

The queries shown in Figure 4-10 are only simple tests. The nslookup utility has many options available for extensive testing and verification of the DNS process. When finished, type exit to leave the nslookup utility.


Image

Activity 4.2.2.5: Syntax Checker - DNS CLI Commands in Windows and UNIX

Go to the online course and practice nslookup in the simulation.


Dynamic Host Configuration Protocol (4.2.2.6)

The Dynamic Host Configuration Protocol (DHCP) service enables devices on a network to obtain IP addresses and other information from a DHCP server. This service automates the assignment of IP addresses, subnet masks, gateway, and other IP networking parameters. This is referred to as dynamic addressing. The alternative to dynamic addressing is static addressing. When using static addressing, the network administrator manually enters IP address information on network hosts.

DHCP allows a host to obtain an IP address dynamically when it connects to the network. The DHCP server is contacted and an address is requested. The DHCP server chooses an address from a configured range of addresses called a pool and assigns (leases) that address to the host for a set period.

On larger local networks, or where the user population changes frequently, DHCP is preferred for address assignment. New users may arrive with laptops and need a connection; others may have new workstations that must be connected. Rather than have the network administrator assign IP addresses for each workstation, it is more efficient to have IP addresses assigned automatically using DHCP.

DHCP-distributed addresses are not permanently assigned to hosts, but rather are only leased for a period of time. If the host is powered down or taken off the network, the address is returned to the pool for reuse. This is especially helpful with mobile users that come and go on a network. Users can freely move from location to location and re-establish network connections. The host can obtain an IP address after the hardware connection is made, via either a wired or wireless LAN.

DHCP makes it possible to access the Internet using wireless hotspots at airports or coffee shops. When a wireless device enters a hotspot, the device DHCP client contacts the local DHCP server via a wireless connection, and the DHCP server assigns an IP address to the device.

Various types of devices can be DHCP servers when running DHCP service software. The DHCP server in most medium-to-large networks is usually a local, dedicated, PC-based server. With home networks, the DHCP server is usually located on the local router that connects the home network to the ISP. Local hosts receive IP address information directly from the local router. The local router receives an IP address from the DHCP server at the ISP.

DHCP can pose a security risk because any device connected to the network can receive an address. This risk makes physical security a determining factor of whether to use dynamic or manual addressing. Both dynamic and static addressing have a place in network design. Many networks use both DHCP and static addressing. DHCP is used for general-purpose hosts, such as end-user devices; static addressing is used for network devices, such as gateways, switches, servers, and printers.

DHCP Operation (4.2.2.7)

Without DHCP, users have to manually input the IP address, subnet mask, and other network settings to join the network. The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when the client is powered on. Because the IP addresses are dynamic (leased), rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation. As shown in Figure 4-11, when a DHCP-configured device boots up or connects to the network, the client broadcasts a DHCP discover (DHCPDISCOVER) message to identify any available DHCP servers on the network. A DHCP server replies with a DHCP offer (DHCPOFFER) message, which offers a lease to the client. The offer message contains the IP address and subnet mask to be assigned, the IP address of the DNS server, and the IP address of the default gateway. The lease offer also includes the duration of the lease.

Image

Figure 4-11 DHCP Messages Exchanged

The client may receive multiple DHCPOFFER messages if there is more than one DHCP server on the local network; therefore, it must choose between them, and send a DHCP request (DHCPREQUEST) message that identifies the explicit server and lease offer that the client is accepting. A client may also choose to request an address that it had previously been allocated by the server.

Assuming that the IP address requested by the client, or offered by the server, is still available, the server returns a DHCP acknowledgement (DHCPACK) message that acknowledges to the client that the lease is finalized. If the offer is no longer valid, perhaps due to a timeout or another client taking the lease, then the selected server responds with a DHCP negative acknowledgement (DHCPNAK) message. If a DHCPNAK message is returned, then the selection process must begin again with a new DHCPDISCOVER message being transmitted. After the client has the lease, it must be renewed prior to the lease expiration through another DHCPREQUEST message.

The DHCP server ensures that all IP addresses are unique (the same IP address cannot be assigned to two different network devices simultaneously). Using DHCP enables network administrators to easily reconfigure client IP addresses without having to manually make changes to the clients. Most Internet providers use DHCP to allocate addresses to their customers that do not require a static address.


Image

Packet Tracer Activity 4.2.2.8: DNS and DHCP

In this activity you will configure and verify static IP addressing and DHCP addressing. You will then configure a DNS server to map IP addresses to the website names.



Image

Lab 4.2.2.9: Observing DNS Resolution

In this lab you will observe the DNS conversion of a URL to an IP address and observe DNS lookup using nslookup on a website and a mail server.


Providing File Sharing Services (4.2.3)

File Transfer Protocol and Server Message Block are two important file sharing protocols explored in this section.

File Transfer Protocol (4.2.3.1)

The File Transfer Protocol (FTP) is another commonly used application layer protocol. FTP was developed to allow for data transfers between a client and a server. An FTP client is an application that runs on a computer that is used to push and pull data from a server running an FTP daemon (FTPd).

As Figure 4-12 illustrates, to successfully transfer data, FTP requires two connections between the client and the server, one for commands and replies, the other for the actual file transfer:

Image The client establishes the first connection to the server for control traffic, consisting of client commands and server replies.

Image The client establishes the second connection to the server for the actual data transfer. This connection is created every time there is data to be transferred.

The data transfer can happen in either direction. The client can download (pull) data from the server, or the client can upload (push) data to the server.

Image

Figure 4-12 FTP Processes


Image

Packet Tracer Activity 4.2.3.2: FTP

In this activity you will configure FTP services. You will then use the FTP services to transfer files between clients and the server.



Image

Lab 4.2.3.3: Exploring FTP

In this lab you will use FTP both from a command prompt and from a browser to download a file.


Server Message Block (4.2.3.4)

The Server Message Block (SMB) is a client/server file sharing protocol, developed by IBM in the late 1980s, to describe the structure of shared network resources, such as directories, files, printers, and serial ports. It is a request-response protocol.

The SMB protocol describes file system access and how clients can make requests for files. It also describes the SMB protocol interprocess communication. All SMB messages share a common format. This format uses a fixed-sized header, followed by a variable-sized parameter and data component.

SMB messages can

Image Start, authenticate, and terminate sessions

Image Control file and printer access

Image Allow an application to send or receive messages to or from another device

SMB file-sharing and print services have become the mainstay of Microsoft networking. With the introduction of the Windows 2000 software series, Microsoft changed the underlying structure for using SMB. In previous versions of Microsoft products, the SMB services used a non-TCP/IP protocol to implement name resolution. Beginning with Windows 2000, all subsequent Microsoft products use DNS naming, which allows TCP/IP protocols to directly support SMB resource sharing, as shown in Figure 4-13.

Image

Figure 4-13 SMB Protocol

Unlike the file sharing supported by FTP, clients establish a long-term connection to servers. After the connection is established, the user of the client can access the resources on the server as if the resources are local to the client host.

The Linux and UNIX operating systems also provide a method of sharing resources with Microsoft networks using a version of SMB called SAMBA. The Apple OS X operating systems also support resource sharing using the SMB protocol.

Summary (4.3)


Image

Class Activity 4.3.1.1: Make It Happen!

Use the same scenario you completed in the introduction modeling activity (Class Activity 4.0.1.2) to answer questions about your solutions.



Image

Packet Tracer Activity 4.3.1.2: Packet Tracer Multiuser - Tutorial

The multiuser feature in Packet Tracer allows multiple point-to-point connections between multiple instances of Packet Tracer. This first Packet Tracer Multiuser (PTMU) activity is a quick tutorial demonstrating the steps to establish and verify a multiuser connection to another instance of Packet Tracer within the same LAN. Ideally, this activity is meant for two students. However, it can also be completed as a solo activity simply by opening the two separate files to create two separate instances of Packet Tracer on your local machine.



Image

Packet Tracer Activity 4.3.1.3: Packet Tracer Multiuser - Implement Services

In this multiuser activity, two students (players) cooperate to implement and verify services including DHCP, HTTP, Email, DNS, and FTP. The server-side player will implement and verify services on one server. The client-side player will configure two clients and verify access to services.


The application layer is responsible for directly accessing the underlying processes that manage and deliver communication to the human network. This layer serves as the source and destination of communications across data networks. The application layer applications, services, and protocols enable users to interact with the data network in a way that is meaningful and effective.

Image Applications are computer programs with which the user interacts and which initiate the data transfer process at the user’s request.

Image Services are background programs that provide the connection between the application layer and the lower layers of the networking model.

Image Protocols provide a structure of agreed-upon rules and processes that ensure services running on one particular device can send and receive data from a range of different network devices.

Delivery of data over the network can be requested from a server by a client, or between devices that operate in a P2P arrangement, where the client/server relationship is established according to which device is the source and destination at that time. Messages are exchanged between the application layer services at each end device in accordance with the protocol specifications to establish and use these relationships.

Protocols like HTTP, for example, support the delivery of web pages to end devices. SMTP and POP support sending and receiving email. SMB and FTP enable users to share files. P2P applications make it easier for consumers to seamlessly share media in a distributed fashion. DNS resolves the human-legible names used to refer to network resources into numeric addresses usable by the network.

All of these elements work together, at the application layer. The application layer enables users to work and play over the Internet.

Practice

The following activities provide practice with the topics introduced in this chapter. The Labs and Class Activities are available in the companion Network Basics Lab Manual (978-1-58713-313-8). The Packet Tracer Activities PKA files are found in the online course.

Image

Class Activities

Class Activity 4.0.1.2: Application Investigation

Class Activity 4.3.1.1: Make It Happen!

Image

Labs

Lab 4.1.2.4: Researching Peer-to-Peer File Sharing

Lab 4.2.2.9: Observing DNS Resolution

Lab 4.2.3.3: Exploring FTP

Image

Packet Tracer Activities

Packet Tracer Activity 4.2.1.8: Web and Email

Packet Tracer Activity 4.2.2.8: DNS and DHCP

Packet Tracer Activity 4.2.3.2: FTP

Packet Tracer Activity 4.3.1.2: Packet Tracer Multiuser - Tutorial

Packet Tracer Activity 4.3.1.3: Packet Tracer Multiuser - Implement Services

Check Your Understanding

Complete all the review questions listed here to test your understanding of the topics and concepts in this chapter. The appendix, “Answers to the ‘Check Your Understanding’ Questions,” lists the answers.

1. Which three layers of the OSI model make up the application layer in the TCP/IP model?

A. Application, presentation, and transport

B. Session, presentation, and application

C. Application, session, and transport

D. Application, transport, and Internet

2. HTTP, DHCP, Telnet, and TFTP are examples of

A. Layer 4 protocols

B. Layer 5 protocols

C. Layer 6 protocols

D. Layer 7 protocols

3. Which layer is responsible for maintenance of dialogs between source and destination applications?

A. Layer 7

B. Layer 6

C. Layer 5

D. Layer 4

4. Choose the correct order of protocols to complete the sentences: Application layer protocols make it possible to browse the Web and send and receive email. ______ is used to enable users to connect to websites across the Internet. _____ is used to enable users to send email. And _____ is used to enable users to receive email.

A. HTTP, SMTP, POP

B. DNS, POP, HTTP

C. HTTP, P2P, SMTP

D. P2P, HTTP, POP

5. Which is not a component of the web address http://cisco.com/index.htm?

A. The server name

B. The DNS tag

C. The protocol

D. The desired filename

6. Which is true about the HTTP protocol?

A. It uses a POST message to request data from a client.

B. It authenticates the sources that send requests.

C. It uses less processing power than HTTPS.

D. It uses SSL.

7. What is true of both HTTP and HTTPS? (Choose two.)

A. They use SSL encryption.

B. They use GET messages to request pages.

C. They use the same computing resources.

D. POST and PUT messages are used to upload files.

E. HTTPS was developed prior to HTTP.

8. Which protocol is used to transport email over the Internet?

A. POP

B. POP3

C. SMTP

D. SNMP

9. Which protocol is responsible for converting text Internet addresses (for example, www.cisco.com) into numeric Internet addresses?

A. POP

B. DNS

C. UDP

D. NDS

10. Which servers are at the top of the DNS hierarchy?

A. Primary servers

B. Top-level servers

C. Secondary servers

D. Root servers

11. Entering nslookup at the command prompt will provide which of the following?

A. An IP address from a domain name

B. The default name server for your host

C. The domain name for a given IP address

D. The name of the root server for the connected network

12. When a student enters a Wi-Fi hotspot on campus, she can log on to the Internet. Which protocol contributes to making this possible by assigning her device an IP address?

A. DHCP

B. nslookup

C. IPHD

D. SMB

13. Which DHCP requests are made by the client requesting an address? (Choose two.)

A. DHCP DISCOVER

B. DHCP OFFER

C. DHCP REQUEST

D. DHCP ACK

E. DHCP SETUP

14. FTP requires ____ connection(s) between client and server to successfully transfer files.

A. 1

B. 2

C. 3

D. 4

15. Which is not a function of the SMB protocol?

A. Resolving IP addresses

B. Controlling access to files and printers

C. Initiating, authenticating, and terminating sessions

D. Permitting applications to exchange information with other devices

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.180.43