Application Layer - Modulo 15 Flashcards
Application Layer
Application, Presentation, and Session
Application Layer
In the OSI and the TCP/IP models, the application layer is the closest layer to the end
user.
As shown in the figure, it is the layer that provides the interface between the applications
used to communicate, and the underlying network over which messages are transmitted.
Application layer protocols are used to exchange data between programs running on the
source and destination hosts.
Based on the TCP/IP model, the upper three layers of the OSI model (application,
presentation, and session) define functions of the TCP/IP application layer.
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.
Presentation 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.
As shown in the figure, the presentation layer formats data for the application layer, and it
sets standards for file formats.
Some well-known standards for video include Matroska Video (MKV), Motion Picture
Experts Group (MPG), and QuickTime Video (MOV).
Some well-known graphic image formats are Graphics Interchange Format (GIF), Joint
Photographic Experts Group (JPG), and Portable Network Graphics (PNG) format.
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 to restart sessions that are disrupted or idle for a long period of time.
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.
Name System
DNS - Domain Name System (or Service)
* TCP, UDP 53
* Translates domain names, such as cisco.com, into IP addresses.
Host Config
BOOTP - Bootstrap Protocol
* UDP client 68, server 67
* Enables a diskless workstation to discover its own IP address, the IP address of a
BOOTP server on the network, and a file to be loaded into memory to boot the
machine
* BOOTP is being superseded by DHCP
DHCP - Dynamic Host Configuration Protocol
* UDP client 68, server 67
* Dynamically assigns IP addresses to be re-used when no longer needed
SMTP - Simple Mail Transfer Protocol
* TCP 25
* Enables clients to send email to a mail server
* Enables servers to send email to other servers
POP3 - Post Office Protocol
* TCP 110
* Enables clients to retrieve email from a mail server
* Downloads the email to the local mail application of the client
IMAP - Internet Message Access Protocol
* TCP 143
* Enables clients to access email stored on a mail server
* Maintains email on the server
File Transfer
FTP - File Transfer Protocol
* TCP 20 to 21
* Sets rules that enable a user on one host to access and transfer files to and from
another host over a network
* FTP is a reliable, connection-oriented, and acknowledged file delivery protocol
TFTP - Trivial File Transfer Protocol
* UDP client 69
* A simple, connectionless file transfer protocol with best-effort, unacknowledged file
delivery
* It uses less overhead than FTP
Web
HTTP - Hypertext Transfer Protocol
* TCP 80, 8080
* A set of rules for exchanging text, graphic images, sound, video, and other
multimedia files on the World Wide Web
HTTPS - HTTP Secure
* TCP, UDP 443
* The browser uses encryption to secure HTTP communications
* Authenticates the website to which you are connecting your browser
Peer-to-Peer
Client-Server Model
In the previous topic, you learned that TCP/IP application layer protocols implemented on
both the source and destination host must be compatible.
In this topic you will learn about the client/server model and the processes used, which are
in the application layer.
The same is true for a peer-to-peer network.
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.
The client is a hardware/software combination that people use to directly access the
resources that are stored on the 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 using the email service of an ISP to send,
receive, and store email.
The email client on a home computer issues a request to the email server of the ISP for
any unread mail.
The server responds by sending the requested email to the client.
Data transfer from a client to a server is referred to as an upload and data from a server to
a client as a download.
Peer-to-Peer Networks
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.
In addition to sharing files, a network such as this one would allow users to enable
networked games or share an internet connection.
In a peer-to-peer exchange, both devices are considered equal in the communication
process.
Peer 1 has files that are shared with Peer 2 and can access the shared printer that is
directly connected to Peer 2 to print files.
Peer 2 is sharing the directly connected printer with Peer 1 while accessing the shared files
on Peer 1, as shown in the figure.
Peer-to-Peer Applications
A P2P application allows a device to act as both a client and a server within the same
communication, as shown in the figure.
In this model, every client is a server and every server is a client.
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.
Common P2P Applications
With P2P applications, each computer in the network that is running the application can act
as a client or a server for the other computers in the network that are also running the
application. Common P2P networks include the following:
* BitTorrent
* Direct Connect
* eDonkey
* Freenet
Some P2P applications are based on the Gnutella protocol, where each user shares whole
files with other users.
As shown in the figure, 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 Gnutella client applications are available, including μTorrent, BitComet, DC++,
Deluge, and emule.
Many P2P applications allow users to share pieces of many files with each other at the
same time.
Clients use a torrent file to locate other users who have pieces that they need so that they
can then connect directly to them.
This file also contains information about tracker computers that keep track of which users
have specific pieces of certain files.
Clients ask for pieces from multiple users at the same time.
This is known as a swarm and the technology is called BitTorrent. BitTorrent has its own
client.
But there are many other BitTorrent clients including uTorrent, Deluge, and qBittorrent.
Note: Any type of file can be shared between users. Many of these files are copyrighted,
meaning that only the creator has the right to use and distribute them. It is against the law
to download or distribute copyrighted files without permission from the copyright holder.
Copyright violation can result in criminal charges and civil lawsuits
Web and Email Protocols
Hypertext Transfer Protocol and
Hypertext Markup Language
There are application layer-specific protocols that are designed for common uses such as
web browsing and email.
The first topic gave you an overview of these protocols.
This topic goes into more detail.
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.
URLs and Uniform Resource Identifiers (URIs) are the names most people associate with
web addresses.
To better understand how the web browser and web server interact, examine how a web
page is opened in a browser. For this example, use
the http://www.cisco.com/index.html URL.
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)
Step 2
The browser then checks with a name server to convert www.cisco.com into a numeric IP
address, which it uses to connect to the server.
The client initiates an HTTP request to a server by sending a GET request to the server
and asks for the index.html file.
Step 3
In response to the request, the server sends the HTML code for this web page to the
browser.
Step 4
The browser deciphers the HTML code and formats the page for the browser window.
HTTP and HTTPS
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.