Vous êtes sur la page 1sur 72

Application Layer Functionality and Protocols

Network Fundamentals Chapter 3

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Acknowledgement
 Thanks must go out to Rick Graziani of Cabrillo College and Terry Dame of St. Clair College in Windsor, Ontario. Their material and additional information was used as a reference and guide in the creation of these slides.  If anyone finds any errors or omissions, please let me know at:
hazinah@fsksm.utm.my

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Objectives
 Define the application layer as the source and destination of data for communication across networks.  Explain the role of protocols in supporting communication between server and client processes.  Describe the features, operation, and use of well-known TCP/IP application layer services (HTTP, DNS, SMTP).

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

 Applications Networks

The Interface Between Human and Data

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Application Layer
Two important concepts: Application Layer: The first step for getting data on to the network. Application Software: The programs used to communicate over the network. For example: When displaying a web page: The Application Layer uses the HTTP Protocol. The Application Software is your browser.
ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Application Layer Software


Within the Application layer, there are two forms of software programs or processes that provide access to the network:
Applications Services

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Network-Aware Applications  The software programs used by people to communicate.


 They implement the application layer protocols and are able to communicate directly with the lower layers of the protocol stack.
Email Clients Web Browsers

Application Layer Services

 Other programs may need the assistance of Application Layer services to use network resources such as:
File transfer Network print spooling

 These services are the programs that interface with the network and prepare the data for transfer.
2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0 Chapter 1

The Application Layer


 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  The
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application layer protocols are used by both the source and destination devices during a communication session. The application layer protocols implemented on the source and destination host must match. Protocols establish consistent rules for exchanging data between applications and services loaded on the participating devices.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

 The functionality of the TCP/IP application layer protocols fit roughly into the framework of the top three layers of the OSI model: Application, Presentation and Session layers

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

10

The Presentation Layer


y Has 3 primary functions: - Coding and conversion to ensure that data from the source device can be interpreted by the appropriate at destination. - Compression data compressed can be decompressed by the destination device. - Encryption hide data for transmission and unhide (decrypt) data at destination.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

11

The Session Layer


 The Session Layer

- It creates and maintains dialogs between source and destination applications. - It handles the exchange of information to initiate dialogs, keep them active, and to restart sessions that are disrupted or idle for a long period of time
 Most applications, like web browsers or e-mail clients, incorporate functionality of the OSI layers 5, 6 and 7.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

12

 The most widely-known TCP/IP Application layer protocols are those that provide for the exchange of user information

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

13

Protocol DNS (Domain Name Service) HTTP (Hypertext Transfer Protocol) SMTP (Simple Mail Transfer Protocol) Telnet a terminal emulation protocol FTP (File Transfer Protocol) DHCP (Dynamic Host Configuration Protocol)

Function Resolve Internet names to IP addresses. Transfer files that make up the Web pages of the World Wide Web. Transfer of mail messages and attachments. Provide remote access to servers and networking devices. Interactive file transfer between systems. Assigns IP Addresses and other parameters to hosts.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

14

 The Transport layer uses an addressing scheme called a port number.  Port numbers identify applications and Application layer services that are the source and destination of data

53

23 SMTP:25 POP:110

67

80

20&21

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

15

The Role of Protocols in Supporting Communication


Making Provisions for Applications and Services

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

16

Introduction
When accessing information on a device, the data may not be physically stored on that device. If that is the case, a request must be made to the device where the data resides. Three methods:
Client/Server Model Application Layer Services and Protocols Peer-to-Peer (P2P) Networking and Applications
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

17

Client/Server Model
May also require Files downloaded control information. to the client. User Authentication or identify a file to be transferred.

Clients hardware, software combination


The client begins the exchange by making a request for data.

The server responds with one or more streams of data. Files uploaded to the server

Resources are stored on the server.


ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

18

Client/Server Model

The biggest advantage of the client/server model is the centralization of resources. User Names and Passwords, Files, Databases.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

19

Servers
Servers are repositories of information. Processes on the server control the delivery of information to the client. The information is usually shared with multiple clients.
Web Server FTP Server Database Server
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

20

Servers
Some servers may require user authentication to access the data or the network. FTP Server: May require an account and password before allowing a transfer. Domain Controller Server: Will require a user name and password in order to access the network.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

21

Servers
The server runs a service, or process, sometimes called a server daemon. Daemons (like other services):
Typically run in the background. Are not under an end user's direct control. Are described as "listening" for a request from a client. Programmed to respond whenever the server receives a request for the service provided by the daemon.

When a daemon "hears" a request from a client:


It exchanges appropriate messages with the client. Sends the requested data in the proper format.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

22

Application Layer Services and Protocols


Typically, a server will have multiple clients requesting services at the same time. For example, the Telnet Server. The Telnet daemon listens for connection requests that are received on port 23. Connection options are negotiated with the client and a Child Process is created on the server on a different unused port. The Telnet daemon resumes listening and repeats the process for each unique connection.
2007 Cisco Systems, Inc. All rights reserved. Cisco Public

ITE PC v4.0 Chapter 1

23

The Peer-to-Peer Model


 In addition to the client/server model for networking, there is also a peer-to-peer model.  Peer-to-peer networking involves two distinct forms:
peer-to-peer network design and peer-to-peer applications (P2P).

 Both forms have similar features but in practice work very differently.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

24

 In a peer-to-peer network, every connected end device (known as a peer) can function as either a server or a client. The roles of client and server are set on a per request basis  A peer-to-peer application (P2P), unlike a peer-to-peer network, 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 a client. Both can initiate a communication and are considered equal in the communication process.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

25

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

26

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

27

Application Layer Functionality and Protocols

Application Layer Protocols and Services Examples

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

28

Features, Operation, and Use of TCP/IP Application Layer Services


 DNS  WWW Services and HTTP  Email Services and SMTP/POP Protocols  Telnet  DHCP  FTP

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

29

DOMAIN NAME SYSTEM (DNS)

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

30

DNS
 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.  DNS is a client/server service but a bit different from others The DNS client runs as a service itself.  The DNS client, sometimes called the DNS resolver, supports name resolution for our other network applications and other services that need it  ****Try nslookup

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

31

Domain Name System (DNS)

DNS and the Browser: 1. First, a domain name or URL is entered in the address field of the browser. The browser passes the name to the resolver.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

32

Domain Name System (DNS) 2


www.cisco.com

3
www.cisco.com = 198.133.219.25 DNS and the Browser: The resolver sends the DNS request to the DNS Server. The server then searches its records and resolves the name with to a corresponding IP Address.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

33

Domain Name System (DNS) 2


www.cisco.com

3
www.cisco.com = 198.133.219.25

4
198.133.219.25

DNS and the Browser: 4. The DNS server then sends the IP Address back to the client that made the request. The IP Address will be used in the encapsulation process as the destination address for packets going to www.cisco.com.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

34

Domain Name System (DNS)

Utility - nslookup: Windows operating systems provide the nslookup utility. Use to query a domain name and get the IP Address.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

35

 A DNS server provides the name resolution using the name daemon, which is often called named, (pronounced name-dee).  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:
A - an end device address NS - an authoritative name server 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 MX - mail exchange record; maps a domain name to a list of mail exchange servers for that domain

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

36

 The Domain Name System uses a hierarchical system to create a name database to provide name resolution.  The hierarchy looks like an inverted tree with the root at the top and branches below.  At the top of the hierarchy, the root servers maintain records about how to reach the top-level domain servers, which in turn have records that point to the secondary level domain servers and so on.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

37

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

38

Domain Name System (DNS)


www.site.com = 202.2.2.2 Store in cache, Send to client www.site.com = 202.2.2.2

? www.site.com

? www.site.com www.site.com = 202.2.2.2 .Store in cache

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

39

WWW SERVICE & HTTP

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

40

WWW Service & HTTP


 When a web address (or 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 (or Uniform Resource Locator) and URIs (Uniform Resource Identifier) are the names most people associate with web addresses.
URL: http://www.cisco.com/web-server.htm.

y The browser interprets the 3 parts of the URL: 1. http (the protocol or scheme) 2. www.cisco.com(the server name) 3. web-server.htm (the specific file name requested).

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

41

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

42

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

43

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

44

WWW Service & HTTP


y HTTP specifies a request/response protocol. When a client, typically a web browser, sends a request message to a server, the HTTP protocol y GET to request the web page A web defines the message types the client uses is a client request for data.and browser sends The three common also the message types the server uses to respond.the GET message to message types are GET, POST, and request pages from a web server. PUT. y POST and PUT are used to send y Although it is remarkably flexible, HTTP is not a secure protocol. to the messages that upload data web server. y The POST messages upload information to the server in plain text that y For example, when the user enters data into can be intercepted and read. a form embedded in a web page, POST y Similarly, the server responses, typically includespages, are also HTML the data in the message sent to the HTTPS can use authentication and server. unencrypted. y PUT uploads resources or content to the encryption to secure data as it travels web server. y So in come HTTPS. What between the client and server. is HTTPS?? HTTPS specifies additional rules for y For secure communication acrossdata Internet, the HTTP Secure passing the between the Application (HTTPS) protocol is used for accessingTransport Layer. layer and the or posting web server information.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

45

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

46

EMAIL SERVICES AND SMTP/POP PROTOCOLS

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

47

Email Services and SMTP/POP Protocols


 E-mail requires several applications and services.  Two example Application layer protocols are
Post Office Protocol (POP) and Simple Mail Transfer Protocol (SMTP)

 As with HTTP, these protocols define client/server processes.  When people compose e-mail messages, they typically use an application called a Mail User Agent (MUA), or e-mail client The MUA allows messages to be sent and places received messages into the client's mailbox

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

48

In order to receive e-mail messages from an e-mail server, the e-mail client can use POP. Sending e-mail from either a client or a server uses message formats defined by the SMTP protocol. Usually an e-mail client provides the functionality of both protocols within one application.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

49

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

50

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

51

FILE TRANSFER PROTOCOL (FTP)

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

52

File Transfer Protocol (FTP)


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

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

53

File Transfer Protocol (FTP)

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

54

File Transfer Protocol (FTP)


TCP Port 21

TCP Port 20 Uses two well-known ports: Port 21 is used to establish the connection and the transfer of control information. Port 20 is used for the actual data transfer.
ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

55

File Transfer Protocol (FTP)


Client initiates a TCP control connection on Port 21. Username and password. 21

20 For each file transferred, TCP opens and closes a Data connection on Port 20.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

56

THE DYNAMIC HOST CONFIRMATION PROTOCOL (DHCP)

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

57

DHCP
y The DHCP service enables devices on a network to obtain IP addresses and other information from a DHCP server. y This service automates the assignment of IP addresses, subnet masks, gateway and other IP networking parameters.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

58

 The DHCP server is contacted and an address requested. The DHCP server chooses an address from a configured range of addresses called a pool and assigns ("leases") it to the host for a set period.  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 .

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

59

DHCP
DHCP is a four step process.

1. Client broadcasts a DHCP Discover frame to find a DHCP server. There may be more than one available.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

60

DHCP

2. A DHCP server responds with a DHCP Offer frame containing a lease time, an IP Address, Subnet Mask, and addresses for a Default Gateway and DNS Server.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

61

DHCP

3. The client responds by broadcasting a DHCP Request that identifies the server and the lease offer it is accepting.

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

62

DHCP

4. If the offer is still valid, the server returns a DHCP Acknowledgement and records that information as used. If it is no longer valid, a DHCP Negative Acknowledgement is sent and the process begins again.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

63

TELNET

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

64

Telnet
 Telnet provides a standard method of emulating text-based terminal devices over the data network.  A connection using Telnet is called a Virtual Terminal (VTY) session, or connection.  Rather than using a physical device to connect to the server, Telnet uses software to create a virtual device that provides the same features of a terminal session with access to the server command line interface (CLI).  To support Telnet client connections, the server runs a service called the Telnet daemon. A virtual terminal connection is established from an end device using a Telnet client application.  If security is a concern, the Secure Shell (SSH) protocol offers an alternate and secure method for server access.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

65

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

66

P2P AND GNUTELLA

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

67

P2P and Gnutella


 Many P2P applications do not use a central database to record all the files available on the peers, instead peers work together and use Gnutella protocol.  Within a Gnutella service, clients find other Gnutella nodes to connect to.  These nodes handle queries for resource locations and replies to those requests. They also govern control messages, which help the service discover other nodes. The actual file transfers usually rely on HTTP services.  The Gnutella protocol defines five different packet types:
ping - for device discovery pong - as a reply to a ping query - for file location query hit - as a reply to a query push - as a download request
ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

68

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

69

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

70

Summary

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

71

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

72

Vous aimerez peut-être aussi