Module-15-Application-Layer
Module-15-Application-Layer
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Application, Presentation, and Session
Application Layer
• The upper three layers of the OSI model
(application, presentation, and session)
define functions of the TCP/IP application
layer.
• The application layer provides the
interface between the applications used
to communicate, and the underlying
network over which messages are
transmitted.
• Some of the most widely known
application layer protocols include HTTP,
FTP, TFTP, IMAP and DNS.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
Application, Presentation, and Session
Presentation and Session Layer
The presentation layer has three primary functions:
• Formatting, or presenting, data at the source
device into a compatible format for receipt by
the destination device
• Compressing data in a way that can be
decompressed by the destination device
• Encrypting data for transmission and
decrypting data upon receipt
The session layer functions:
• 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.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Application, Presentation, and Session
TCP/IP Application Layer Protocols
• 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 6
Peer-to-Peer
Client-Server Model
• Client and server processes are considered to be in the application layer.
• 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.
• Application layer protocols describe the format of the requests and responses between
clients and servers.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Peer-to-Peer
Peer-to-Peer Networks
• In a peer-to-peer (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.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
15.3 Web and Email Protocols
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
Web and Email Protocols
Hypertext Transfer Protocol and Hypertext Markup Language
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. The web service is running on the
server that is using the HTTP protocol.
To better understand how the web browser and web server interact, examine how a web page
is opened in a browser.
Step 1
The browser interprets the three parts
of the URL:
• http (the protocol or scheme)
• www.cisco.com (the server name)
• index.html (the specific filename
requested)
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
Web and Email Protocols
Hypertext Transfer Protocol and Hypertext Markup Language (Cont.)
Step 2 Step 3
The browser then checks with a name In response to the request, the server sends
server to convert www.cisco.com into the HTML code for this web page to the
a numeric IP address, which it uses to browser.
connect to the server.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
Web and Email Protocols
Hypertext Transfer Protocol and Hypertext Markup Language (Cont.)
Step 4
The browser deciphers the HTML code and formats the page for the browser window.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
Web and Email Protocols
HTTP and HTTPS
HTTP is a request/response protocol
that specifies the message types used
for that communication.
The three common message types are
GET, POST, and PUT:
• GET - This is a client request for
data. A client (web browser) sends
the GET message to the web
server to request HTML pages.
• POST - This uploads data files to
the web server, such as form data.
• PUT - This uploads resources or Note: HTTP is not a secure protocol.
content to the web server, such as For secure communications sent across
the internet, HTTPS should be used.
an image.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Web and Email Protocols
Email Protocols
Email is a store-and-forward method of
sending, storing, and retrieving electronic
messages across a network. Email
messages are stored in databases on mail
servers. Email clients communicate with
mail servers to send and receive email.
The email protocols used for operation are:
• Simple Mail Transfer Protocol (SMTP)
– used to send mail.
• Post Office Protocol (POP) & IMAP –
used for clients to receive mail.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Web and Email Protocols
SMTP, POP and IMAP
• When a client sends email, the client
SMTP process connects with a server
SMTP process on well-known port 25.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Web and Email Protocols
SMTP, POP and IMAP (Cont.)
POP is used by an application to retrieve mail from a mail server. When mail is
downloaded from the server to the client using POP the messages are then deleted on
the 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 Note: Since POP does not store messages, it is not
until the connection is closed or recommended for small businesses that need a centralized
aborted. backup solution.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Web and Email Protocols
SMTP, POP and IMAP (Cont.)
IMAP is another protocol that
describes a method to retrieve email
messages.
• Unlike POP, when a user connects to
an IMAP server, copies of the
messages are downloaded to the
client application. The original
messages are kept on the server
until manually deleted.
• When a user decides to delete a
message, the server synchronizes
that action and deletes the message
from the server.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
15.4 IP Addressing Services
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
IP Addressing Services
Domain Name Service
• Domain names were created to
convert the numeric IP addresses
into a simple, recognizable name.
• Fully-qualified domain names
(FQDNs), such
as http://www.cisco.com, are much
easier for people to remember than
198.133.219.25.
• 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.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
IP Addressing Services
DNS Hierarchy
• DNS uses a hierarchical system to create a
database to provide name resolution.
• 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.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
IP Addressing Services
The nslookup Command
• Nslookup is a computer operating system
utility that allows a user to manually query the
DNS servers configured on the device to
resolve a given host name.
• This utility can also be used to troubleshoot
name resolution issues and to verify the
current status of the name servers.
• When the nslookup command is issued, the
default DNS server configured for your host is
displayed.
• The name of a host or domain can be entered
at the nslookup prompt.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
IP Addressing Services
Dynamic Host Configuration Protocol
• The Dynamic Host Configuration Protocol
(DHCP) for IPv4 service automates the
assignment of IPv4 addresses, subnet masks,
gateways, and other IPv4 networking
parameters.
• DHCP is considered dynamic addressing
compared to static addressing. Static addressing
is manually entering IP address information.
• When a host 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) it to the host.
• Many networks use both DHCP and static
addressing. DHCP is used for general purpose Note: DHCP for IPv6 (DHCPv6) provides similar
hosts, such as end user devices. Static services for IPv6 clients. However, DHCPv6 does
addressing is used for network devices, such as not provide a default gateway address. This can
gateway routers, switches, servers, and printers. only be obtained dynamically from the Router
Advertisement© message of the router.
2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
15.5 File Sharing Services
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
File Sharing Services
File Transfer Protocol
FTP was developed to allow for data transfers between a client and a server. An FTP client is
an application which runs on a computer that is being used to push and pull data from an FTP
server.
Step 1 - The client establishes the first connection
to the server for control traffic using TCP port 21.
The traffic consists of client commands and server
replies.
Step 2 - The client establishes the second
connection to the server for the actual data transfer
using TCP port 20. This connection is created
every time there is data to be transferred.
Step 3 - 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.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
File Sharing Services
Server Message Block
The Server Message Block (SMB) is a
client/server, request-response file sharing
protocol. Servers can make their own resources
available to clients on the network.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25