0% found this document useful (0 votes)
28 views

Lecture 4 - Application Layer nET

The document discusses the application layer and how it provides support to end-user applications. It explains that the application layer, presentation layer, and session layer work together to provide network services. Common application layer protocols like HTTP, SMTP, and FTP are described. Both the client-server and peer-to-peer models are covered, explaining how end-user applications operate in each type of network.

Uploaded by

mohamed ghnam
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Lecture 4 - Application Layer nET

The document discusses the application layer and how it provides support to end-user applications. It explains that the application layer, presentation layer, and session layer work together to provide network services. Common application layer protocols like HTTP, SMTP, and FTP are described. Both the client-server and peer-to-peer models are covered, explaining how end-user applications operate in each type of network.

Uploaded by

mohamed ghnam
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Application Layer

Module Objectives
• Module Title: Application Layer
• Module Objective: Explain the operation of application layer protocols in providing support to end-user
applications.

Topic Title Topic Objective

Explain how the functions of the application layer, presentation layer, and
Application, Presentation, and Session session layer work together to provide network services to end user
applications.

Peer-to-Peer Explain how end user applications operate in a peer-to-peer network.

Web and Email Protocols Explain how web and email protocols operate.

IP Addressing Services Explain how DNS and DHCP operate.

File Sharing Services Explain how file transfer protocols operate.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Application, Presentation, and Session

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
Application, Presentation, and Session
Application Layer Application Layer:

• Closest to the end user.


• Used to exchange data between
programs running on the source and
destination hosts.
• The upper three layers of the OSI
model (application, presentation, and
session) define functions of the single
TCP/IP application layer.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Application, Presentation, and Session
Application Layer Application Layer:

• The TCP/IP application protocols


specify the format and control
information necessary for many
common internet communication
functions.
• 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 that are implemented on
the source and destination host
must be compatible.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Application, Presentation, and Session
Presentation and Session Layer
Presentation Layer function:

• Formatting data at the source device


into a compatible form for the receiving
device.
• Compressing data.
• Encrypting data.

Common data formats include the following:  Encryption and decryption of data communications
• American Standard Code for Information are also performed at the presentation layer.
Interchange and Extended Binary Coded  Encryption methods and keys exchange between
Decimal Interchange Code for text; the two communicating devices.
• UTF-8 has been the most common encoding  Only the sender and receiver can properly
for the World Wide Web since 2008 encode and decode data so it returns to a readable
• JPEG, GIF and TIFF for images; and format.
• MPEG, MIDI and QuickTime for video.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Application, Presentation, and Session
Presentation and Session Layer
Session Layer Function:

Create and maintain dialogs between


source and destination applications.

 This layer allows users on different


machines to establish active
communications sessions between them.
 It is responsible for establishing,
maintaining, synchronizing, terminating
sessions between end-user applications.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Application, Presentation, and Session
TCP/IP Application Layer Protocols • Post Office Protocol (POP) TCP 110 -
Enables clients to retrieve email from a mail
server.

• Internet Message Access Protocol (IMAP)


TCP 143 - Enables clients to retrieve email
from a mail server, maintains email on server.

• File Transfer Protocol (FTP) TCP 20 and 21 -


Reliable, connection-oriented, and
acknowledged file delivery protocol.
• Domain Name Server (DNS) TCP,UDP 53 - Translates
domain names, such as cisco.com, into IP addresses. • Trivial File Transfer Protocol (TFTP) UDP 69
– simple connectionless file transfer protocol.
• (BOOTP) – Bootstrap Protocol - BOOTP is being
superseded by DHCP. • Hypertext Transfer Protocol (HTTP) TCP 80,
• Dynamic Host Configuration Protocol (DHCP) UDP 8080 - Set of rules for exchanging text,
graphic images, etc. on the World Wide Web.
client 68, server 67 – Dynamically assigns IP addresses
to client stations at start-up. • Hypertext Transfer Protocol Secure (HTTPS)
• Simple Mail Transport Protocol (SMTP) TCP 25 - TCP, UDP 443 – Uses encryption and
Enables clients to send email to a mail server. authentication to secure communication.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
Client-Server Model and Peer-to-Peer

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
How Application Protocols Interact with End-User Applications
Client-Server Model
 Client and server processes
are considered to be in the
application layer.
 Application layer protocols
describe the format of the
requests and between clients
and servers.
 Example of a client-server
network is using an ISP’s
email service to send, receive
and store email.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
How Application Protocols Interact with End-User Applications
Peer-to-Peer Networks
 The P2P network model
involves two parts: P2P
networks and P2P
applications.
 Data is accessed from a
peer device without the
use of a dedicated
server.
 Each device (known as
a peer) can function as
both a server and a
client.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
How Application Protocols Interact with End-User Applications
Peer-to-Peer Applications
 A P2P application allows a device to act as
both a client and a server within the same
communication.
 P2P applications require that each end device
provide a user interface and run a background
service.
 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.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
How Application Protocols Interact with End-User Applications
Common P2P Applications  Common P2P networks include:
• G2
• Bitcoin
• BitTorrent
• eDonkey
 Some P2P applications are based on the
Gnutella protocol, where each user shares
whole files with other users.
 Many P2P applications allow users to share
pieces of many files with each other at the
same time –this is BitTorrent technology.
 Clients ask for pieces from multiple users at the
same time, known as a swarm.
 This technology is called BitTorrent.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Well-Known Application Layer
Protocols and Services

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Web and Email Protocols
Hypertext Transfer Protocol and Hypertext Markup Language
http://www.cisco.com/index.html  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.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Web and Email Protocols
Hypertext Transfer Protocol and Hypertext Markup Language
HTTP: hypertext transfer protocol
• Web’s application layer protocol

• client/server model HT
TP
•client: browser that requests, receives, req
PC running HTT ues
“displays” Web objects Pr t
Explorer esp
•server: Web server sends objects in response o ns
e
to requests
st
• The client program and server program, executing q ue
re se Server
on different end systems, talk to each other by TTP on
H p
exchanging HTTP messages. es running
T Pr Apache Web
HT
• HTTP defines the structure of these messages and server
how the client and server exchange the messages.
• HTTP 1.0: RFC 1945 Mac running
Navigator
• HTTP 1.1: RFC 2068

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
HTTP connections

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
Nonpersistent HTTP (contains text,
Suppose user enters URL references to 10
www.someSchool.edu/someDepartment/home.index jpeg images)

1a. HTTP client initiates TCP


connection to HTTP server
(process) at 1b. HTTP server at host
www.someSchool.edu on port 80 www.someSchool.edu waiting
for TCP connection at port 80.
“accepts” connection, notifying
client
2. HTTP client sends HTTP
request message (containing
URL) into TCP connection 3. HTTP server receives request
socket. Message indicates that message, forms response
client wants object message containing requested
someDepartment/home.index object, and sends message
into its socket

time
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
Nonpersistent HTTP (cont.)
4. HTTP server closes TCP
connection.
5. HTTP client receives response
message containing html file,
displays html. Parsing html file,
finds 10 referenced jpeg objects

time 6. Steps 1-4 repeated for each of


10 jpeg objects

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Response time modeling
Definition of RRT: time to send a
small packet to travel from client
to server and back.
Response time:
initiate TCP
• one RTT to initiate TCP connection
connection RTT
request
• one RTT for HTTP request and file
first few bytes of HTTP response time to
RTT
to return transmit
file
• file transmission time file
received
total = 2RTT+transmit time
time time

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
Response time modeling
Nonpersistent HTTP Persistent HTTP

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
Web and Email Protocols
HTTP and HTTPS
 HTTP is a request/response
protocol.
 Three common HTTP message
types are:
• GET - A client request for data.
• POST - Uploads data files to the web
server.
• PUT - Uploads resources or content to
the web server.
 HTTP Secure (HTTPS) protocol
uses encryption and authentication
to secure data.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
Web and Email Protocols
HTTP and HTTPS

request line
(GET, POST,
HEAD, PUT, and DELETE GET /somedir/page.html HTTP/1.1
commands) Host: www.someschool.edu
header User-agent: Mozilla/4.0
lines Connection: close
Accept-language:fr
Carriage return,
line feed (extra carriage return, line feed)
indicates end
of message
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
Web and Email Protocols
HTTP and HTTPS
HTTP response message
status line
(protocol
HTTP/1.1 200 OK
status code
Connection close
status phrase)
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
header
Last-Modified: Mon, 22 Jun 1998 …...
lines
Content-Length: 6821
Content-Type: text/html
data, e.g.,
requested
data data data data data ...
HTML file
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
Web and Email Protocols
HTTP and HTTPS
HTTP response status codes

200 OK
•request succeeded, requested object later in this message
301 Moved Permanently
•requested object moved, new location specified later in this message (Location:)
400 Bad Request
•request message not understood by server
404 Not Found
•requested document not found on this server
505 HTTP Version Not Supported
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
Web and Email Protocols
Email Protocols
 Email clients communicate with mail
servers to send and receive email.
 Mail servers communicate with other
mail servers to transport messages
from one domain to another.
 Three protocols for email:
• Simple Mail Transfer Protocol (SMTP)
to send email.
• Post Office Protocol (POP) to retrieve
email.
• Internet Message Access Protocol
(IMAP) to retrieve email.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
Web and Email Protocols
SMTP Operation
 SMTP is used to send email

 SMTP message formats require a message


header and a message body.
 When a client sends email, the client SMTP
process connects with a server SMTP process
on well-known port 25.
 After the connection is made, the client
attempts to send the email to the server
across the connection.
 When the server receives the message, it
either places the message in a local account,
if the recipient is local, or forwards the
message to another mail server for delivery.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Web and Email Protocols
POP Operation
 POP is used to retrieve email from a mail
server.

 The server starts the POP service by


passively listening on TCP port 110 for client
connection requests.

 When a client wants to make use of the


service, it sends a request to establish a TCP
connection with the server.

 When the connection is established, the POP


server sends a greeting.

 The client and POP server then exchange


commands and responses until the
connection is closed or aborted.

 Email is downloaded from the server to the


client and then deleted on the server.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28
Web and Email Protocols
IMAP Operation

 IMAP is used to retrieve mail from a mail server.

 Copies of messages are downloaded from the server to the client and the
original messages are stored on the server.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
POP vs. IMAP
POST OFFICE PROTOCOL (POP3) INTERNET MESSAGE ACCESS PROTOCOL (IMAP)
POP is a simple protocol that only allows downloading messages from IMAP is much more advanced and allows you the user to see all the folders
your Inbox to your local computer. on the mail server.
The POP server listens on port 110, and the POP with SSL IMAP server listens on port 143, and the IMAP with SSL secure(IMAPDS)
secure(POP3DS) server listens on port 995 server listens on port 993.

In POP3 the mail can only be accessed from a single device at a


Messages can be accessed across multiple devices
time.

To read the mail it has to be downloaded on the local system. The mail content can be read partially before downloading.

The user can not organize mails in the mailbox of the mail server. The user can organize the emails directly on the mail server.

The user can not create, delete or rename email on the mail server. The user can create, delete or rename email on the mail server.

A user can not search the content of mail before downloading to the
A user can search the content of mail for specific string before downloading.
local system.

After download, the message exists in the local system if the local Multiple redundant copies of the message are kept at the mail server, in
system crashes message is lost. case of loss of message of a local server, the mail can still be retrieved

Changes in the mail can be done using local email software. Changes made web interface or email software stay in sync with the server.

All the message are downloaded at once. Message header can be viewed prior to downloading.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
IP Addressing Services
Domain Name Service
 Domain names
convert the numeric
address into a
simple, recognizable
name.
 The DNS protocol
defines an
automated service
that matches
resource names with
the required numeric
network address.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
IP Addressing Services
DNS Message Format
 When a client makes a query, the
server’s DNS process first looks at its
own records to resolve the name.
 If unable to resolve, it contacts other
servers to resolve the name.
 The server temporarily stores the
numbered address in the event that
the same name is requested again.
 The ipconfig /displaydns command
displays all of the cached DNS
entries on a Windows PC.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
IP Addressing Services
DNS Hierarchy

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
IP Addressing Services
The nslookup Command

 Nslookup - a utility that allows a user to manually query the name servers to
resolve a given host.
• Can also be used to troubleshoot name resolution issues and to verify the current
status of the name servers. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
IP Addressing Services
Dynamic Host Configuration Protocol
 The Dynamic Host Configuration
Protocol (DHCP) for IPv4 automates the
assignment of IPv4 addresses, subnet
masks, gateways, and other
parameters.
 DHCP-distributed addresses are leased
for a set period of time, then returned to
pool for reuse.
 DHCP is usually employed for end user
devices. Static addressing is used for
network devices, such as gateways,
switches, servers, and printers.
 DHCPv6 (DHCP for IPv6) provides
similar services for IPv6 clients. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
IP Addressing Services
DHCP Operation

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36
File Sharing Services
File Transfer Protocol
 FTP requires two connections
between the client and the
server, one for commands
and replies, the other for the
actual file transfer:
• The client establishes the
first connection to the
server for control traffic
using TCP port 21.
• The client establishes the
second connection to the
server for the actual data
transfer using TCP port 20.

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37
File Sharing Services
Server Message Block
 The Server Message Block
(SMB) is a client/server file
sharing protocol:
• SMB file-sharing and print
services have become the
mainstay of Microsoft
networking.
• Clients establish a long-
term connection to servers
and can access the
resources on the server
as if the resource is local
to the client host.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38

You might also like