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

Session Presentation Application Layers

The session layer is responsible for managing dialogues and data exchange between applications. It defines how sessions are started, controlled, and ended between two applications. The session layer offers provisions for efficient data transfer through functions like creating and managing multiple connections, and ending sessions using a three-way handshake. It also synchronizes data exchange between the presentation layers of two hosts.

Uploaded by

Sarah Gazan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Session Presentation Application Layers

The session layer is responsible for managing dialogues and data exchange between applications. It defines how sessions are started, controlled, and ended between two applications. The session layer offers provisions for efficient data transfer through functions like creating and managing multiple connections, and ending sessions using a three-way handshake. It also synchronizes data exchange between the presentation layers of two hosts.

Uploaded by

Sarah Gazan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Session Layer

OSI Model
LAYER 5: SESSION

The session layer is responsible for dialog control and synchronization.


LAYER 5: SESSION
The session layer defines how to start, control and end
conversations (called sessions) between applications.
This includes the control and management of multiple bi-
directional messages using dialogue control.
It also synchronizes dialogue between two hosts' presentation
layers and manages their data exchange.
The session layer offers provisions for efficient data transfer.
Basic Functions for the Session Layer
Protocols
Creating a connection – session/communication session
between an APPLICATION in one computer and another
APPLICATION in another computer
THREE-WAY-HANDSHAKE: a method widely used to establish
and end connection
Sender sends SYN message to request a session to the
receiver
Receiver replies by sending ACK message to
acknowledge the SYN message sent by the sender, and
SYN message to request a session to the sender
Sender replies by sending ACK message to acknowledge
the SYN message sent by the receiver
Basic Functions for the Session Layer
Protocols
Basic Functions for the Session Layer
Protocols
Managing multiple sessions
A computer can establish multiple sessions with several
other computers
e.g., session 1: exchanging information over the World Wide Web with
www.yahoo.com
session 2: exchanging information over the World Wide Web with
www.google.com
session 3: exchanging information over the World Wide Web with
www.espn.com
Two computers can also establish multiple sessions,
e.g., function 1: exchanging information over the World Wide Web;
function 2: exchanging information over the FTP;
function 3: exchanging information over the email
Basic Functions for the Session Layer
Protocols
Ending a session
THREE-WAY-HANDSHAKE: a method widely used to establish
and end connection
Sender sends FIN message to close a session to the
receiver
Receiver replies by sending ACK message to
acknowledge the FIN message sent by the sender, and
FIN message to close a session to the sender
Sender replies by sending ACK message to acknowledge
the FIN message sent by the receiver
Session Layer protocols

ISO-SP: OSI Session Layer Protocol


PPTP, Point-to-Point Tunneling Protocol
RPC, Remote Procedure Call Protocol
RTCP, Real-time Transport Control Protocol

SQL is a Session layer application that manages


multiple queries to the SQL database.
Presentation Layer
OSI Model
Topics Covered
 Introduction to Presentation Layer
 Data Representation
 Data Compression
▪ Image
▪ Audio
▪ Video
 Encryption
Presentation Layer
 The presentation layer is the sixth level of
the seven layer OSI model.
 It responds to service requests from the
application layer and issues service
requests to the session layer.
 Concerned with syntax and semantics of
the information exchanged between two
systems.
Presentation Layer
From application layer To application layer

Data Data

Presentation layer Presentation layer

To session layer From session layer


Presentation Format
 In the case of the sender and receiver
seeing the same data, the issue is one of
agreeing to a message format, called a
presentation format.
 The presentation layer may represent
(encode) the data in various ways (e.g.,
data compression, or encryption),but the
receiving peer will convert the encoding
back into its original meaning (decode).
Encoding/Decoding
 The sending program translates the data
it wants to transmit from the
representation it uses internally into a
message that can be transmitted over the
network
→the data is encoded in a message.
 On the receiving side, the application
translates this arriving message into a
representation it can process
→the message is decoded.
Presentation formatting
Application Application
data data

Presentation Presentation
encoding decoding

■ ■■
Message Message Message
Presentation Layer
 Specific responsibilities of presentation
layer:
➢ Data Representation
➢ Data Compression
➢ Encryption
DATA
REPRESENTATION
Data Representation
 Different computers have different
representations for characters.
 If two dissimilar computers are to exchange
text, say e-mail, they must agree on the
representation to be used in the exchange.
Then one must translate from, or into, the
agreed upon representation.
Data Representation
 Converting the complex data structures
used by an application (strings, integers,
structures, etc. ) into a byte stream
transmitted across the network.
 Representing information in such a way
that communicating peers agree to the
format of the data being exchanged.
E.g., How many bits does an integer
contain?,ASCII or EBCDIC character set?
Data Representation
 Popular network data representations
include:
◦ ASN.1 - an ISO standard
◦ XDR - used with SunRPC
DATA
COMPRESSION
Data Compression
 Reduces the number of bits contained in the
information.
 Lossless Compression -- data is
compressed and can be uncompressed
without loss of information.These are
referred to as bit-preserving or reversible
compression systems.
 Lossy Compression – aim to obtain the
best possible fidelity for a given bit-rate or
minimizing the bit-rate to achieve a given
fidelity measure. Most suited to video and
audio compression techniques
Why Compression?
 Sometimes programs need to send more
data in a timely fashion than the bandwidth
of the network supports. (For example,a
video stream that needs 10Mbps to transmit
on a 1 Mbps network).
 It’s hard to move data on the Internet at
>1Mbps.
 The Internet does not allow applications to
use more than their “fair share” of the
bandwidth on a congested link.
 Need to compress the data at the sender
and decompress it at the receiver.
Why Compression?
 In terms of storage, the capacity of a
storage device can be effectively
increased with methods that compresses
a body of data on its way to a storage
device and decompresses it when it is
retrieved.
 In terms of communications, the
bandwidth of a digital communication link
can be effectively increased by
compressing data at the sending end and
decompressing data at the receiving end.
ENCRYPTION
Encryption
• To carry sensitive information, a system must
be able to assure privacy.
• As the number of attacks increase and as the
public Internet is used to transmit private
data, it is increasingly difficult to protect
information.
• One way to safeguard data from attacks is
encrypting the data.
• Practically, encryption is suitably done in
presentation layer besides transport and
physical layer.
Encryption
Encryption – sender transform original
information (plaintext) to another form
(ciphertext) by a function that is
parameterised by a key.
Decryption – reverses the original process to
transform the message (ciphertext) back to
its original form (plaintext).
Encryption
Basic Terms and Concepts
 Cryptography – the science of transforming
information so that it is secure while it is being
transmitted or stored. Data is scrambled so that
it cannot viewed by unauthorized users.
 Cryptosystem – a disguises message that allows
only selected people to see through the disguise.
 Cryptanalysis – the science of breaking a
crptosystem
 Key – a value that is used by an algorithm to
encrypt and decrypt a message.
 Cipher – an encryption/decryption algorithm tool
that is used to create encrypted/decrypted text
Encrytption/Decryption Keys
 Symmetric Keys – use same key to
encrypt and decrypt a message.
Eg.: Data Encryption Standard (DES),
Triple DES (3DES),Advanced
Encryption Standard (AES)
 Asymmetric Keys -2 keys are needed
(public key and private key); 1 key to
encrypt, another key to decrypt and
vice versa.
Eg.: RSA and Diffie-Hellman
How Encryption Protects
 Because cryptography is concerned with
the storage or transmission of information,
five key security functions need to be
fulfilled:
Protection Description
Confidentiality Allow only authorized users to access
information.
Authentication Verify who the sender was and trust the
sender is who they claim to be.
Integrity Trust the information has not been altered
Nonrepudiation Ensure that the sender or receiver cannot
deny that a message was sent or received.
Access Control Restrict availability to information.
Application Layer
Introduction to Networks

Based on Cisco Materials


Objectives
▪ Explain how the functions of the application layer, session layer,
and presentation layer work together to provide network services to
end user applications.
▪ Describe how common application layer protocols interact with end
user applications.
▪ Describe, at a high level, common application layer protocols that
provide Internet services to end-users, including WWW services
and email.
▪ Describe application layer protocols that provide IP addressing
services, including DNS and DHCP.
▪ Describe the features and operation of well-known application layer
protocols that allow for file sharing services, including: FTP, File
Sharing Services.
Application Layer Outline
• Introduction
• Application Layer Protocols
• Well-Known Application Layer Protocols and Service
• Summary
Application, Session and Presentation
OSI and TCP/IP Models Revisited

The key parallels are in the transport and network layer.


Application Session and Presentation
Application Layer
Application, Session and Presentation
Presentation and Session Layers

▪ Presentation layer
▪ Coding and conversion of application layer data
▪ Data compression
▪ Data encryption for the transmission and decryption of
data upon receipt by the destination
▪ Session layer
▪ Functions, creates, and maintains dialogs between source
and destination applications
▪ Handles the exchange of information to initiate dialogs,
keep them active, and to restart sessions
Application, Session and Presentation
Presentation and Session Layers (cont.)
Application, Session and Presentation
TCP/IP Application Layer Protocols
▪ Domain Name Service Protocol (DNS) – used to resolve Internet
names to IP addresses
▪ Telnet – a terminal emulation protocol used to provide remote access
to servers and networking devices
▪ Bootstrap Protocol (BOOTP) – a precursor to the DHCP protocol, a
network protocol used to obtain IP address information during bootup
▪ Dynamic Host Control Protocol (DHCP) – used to assign an IP
address, subnet mask, default gateway and DNS server to a host
▪ Hypertext Transfer Protocol (HTTP) – used to transfer files that
make up the Web pages of the World Wide Web
Application, Session and Presentation
TCP/IP Application Layer Protocols (cont.)

▪ File Transfer Protocol (FTP) - used for interactive file transfer


between systems
▪ Trivial File Transfer Protocol (TFTP) - used for connectionless
active file transfer
▪ Simple Mail Transfer Protocol (SMTP) - used for the transfer of
mail messages and attachments
▪ Post Office Protocol (POP) - used by email clients to retrieve email
from a remote server
▪ Internet Message Access Protocol (IMAP) – another protocol for
email retrieval
How Application Protocols Interact with End-User Applications
Peer-to-Peer Networks

Both devices are considered equal in the communication.


The roles of client and server are set on a per request basis.
How Application Protocols Interact with End-User Applications
Peer-to-Peer Applications
Client and server in the same communication.

Both can initiate a communication and are considered


equal in the communication process.
How Application Protocols Interact with End-User Applications
Common P2P Applications
▪ 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:
▪ eDonkey
▪ eMule
▪ Shareaza
▪ BitTorrent
▪ Bitcoin
▪ LionShare
▪ Some P2P applications are based on the Gnutella protocol which
enables people to share files on their hard disks with others
How Application Protocols Interact with End-User Applications
Client-Server Model
How Application Protocols Interact with End-User Applications
Client-Server Model
Well-Known Application Layer
Protocols and Services
Common Application Layer Protocols
Application Layer Protocols Revisited

Three application layer protocols involved in everyday work or play


include:
▪ HTTP to browse the web.
▪ Simple Mail Transfer Protocol (SMTP) to enable users to send email.
▪ Post Office Protocol (POP) to enable users to receive email.
Common Application Layer Protocols
Hypertext Transfer Protocol and Hypertext
Markup Language
Example URL: http://www.cisco.com/index.html

1. First, the browser interprets the three parts of the URL:


▪ http (the protocol or scheme)
▪ www.cisco.com (the server name)
▪ index.html (the specific file name requested)
2. Browser checks with a name server to convert www.cisco.com into
a numeric address
3. Using the HTTP protocol requirements sends a GET request to the
server and asks for the file index.html
4. Server sends the HTML code for this web page
5. Browser deciphers the HTML code and formats the page
Common Application Layer Protocols
HTTP and HTTPS
▪ Developed to publish and retrieve HTML pages
▪ Used for data transfer
▪ Specifies a request/response protocol
▪ Three common message types are GET, POST, and PUT
▪ GET is a client request for data
▪ POST and PUT are used to send messages that upload data to the
web server
Common Application Layer Protocols
SMTP, POP, and IMAP
▪ Typically use an application
called a Mail User Agent
(email client)
▪ Allows messages to be sent
▪ Places received messages
into the client's mailbox
▪ SMTP - Send email from
either a client or a server
▪ POP - Receive email
messages from an email
server
▪ IMAP - Internet Message
Access Protocol
▪ Email client provides the
functionality of both
protocols within one
application
Common Application Layer Protocols
SMTP, POP, and IMAP (cont.)
Common Application Layer Protocols
SMTP, POP, and IMAP (cont.)

Simple Mail Transfer Protocol (SMTP)


▪ transfers mail
▪ message must be formatted properly
▪ SMTP processes must be running on both the client and server
▪ message header must have a properly formatted recipient email
address and a sender
▪ uses port 25
Post Office Protocol (POP)
▪ enables a workstation to retrieve mail from a mail server
▪ mail is downloaded from the server to the client and then deleted on
the server
▪ uses port 110
▪ POP does not store messages
▪ POP3 is desirable for an ISP, because it improves their responsibility
for managing large amounts of storage for their email servers
Common Application Layer Protocols
SMTP, POP, and IMAP (cont.)
Common Application Layer Protocols
SMTP, POP, and IMAP (cont.)
Everyday Application Layer Protocols
SMTP, POP, and IMAP (cont.)

▪ MDA accepts a piece of email from MTA and performs the actual
delivery.
▪ MDA receives all the inbound mail from the MTA and places it into
mailboxes.
▪ MDA can also resolve final delivery issues, such as virus scanning,
spam filtering, and return-receipt handling.
Common Application Layer Protocols
SMTP, POP, and IMAP (cont.)

Simple Mail Transfer Protocol (SMTP)


▪ Transfers mail reliably and efficiently

Post Office Protocol (POP)


▪ Enables a workstation to retrieve mail from a mail server
▪ With POP, mail is downloaded from the server to the client and then
deleted on the server

Internet Message Access Protocol (IMAP)


▪ Another protocol that to retrieves email messages
▪ Unlike POP, when the user connects to an IMAP-capable server,
copies of the messages are downloaded to the client application
▪ Original messages are kept on the server until manually deleted
Providing IP Addressing Services
Domain Name Service

A human legible
name is resolved
to its numeric
network device
address by the
DNS protocol.
Providing IP Addressing Services
Domain Name Service (cont.)

A human legible
name is resolved
to its numeric
network device
address by the
DNS protocol.
Providing IP Addressing Services
Domain Name Service (cont.)
Providing IP Addressing Services
DNS Message Format
▪ DNS server stores different types of resource records used to resolve
names
▪ Contains the name, address, and type of record.
▪ Record types are:
▪ A – An end device address
▪ NS – An authoritative name server
▪ CNAME – The canonical 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
▪ Unable to resolve the name using its stored records, contacts other
servers.
▪ Server temporarily stores the numbered address that matches the name
in cache memory.
▪ Windows ipconfig /displaydns displays all cached DNS.
Providing IP Addressing Services
DNS Hierarchy

Examples top-
level domains:

.au - Australia

.co - Colombia

.com - business
or industry

.jp - Japan

.org - non-profit
organization
Providing IP Addressing Services
Dynamic Host Configuration Protocol

▪ DHCP allows a host to obtain an IP address dynamically.

▪ DHCP server is contacted and address requested - chooses address


from a configured range of addresses called a pool and “leases” it to
the host for a set period.

▪ DHCP used for general purpose hosts such as end user devices,
and static addressing is used for network devices such as gateways,
switches, servers and printers.
Providing IP Addressing Services
Dynamic Host Configuration Protocol (cont.)
Providing File Sharing Services
File Transfer Protocol
▪ FTP allow data transfers between a client and a server.

▪ 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.

▪ 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.
Providing File Sharing Services
File Transfer Protocol (cont.)
Application Layer
Summary
▪ Applications are computer programs with which the user interacts and
which initiate the data transfer process at the user’s request.
▪ Services are background programs that provide the connection
between the application layer and the lower layers of the networking
model.
▪ 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.
▪ HTTP supports the delivery of web pages to end devices.
▪ SMTP, POP, and IMAP support sending and receiving email.
Application Layer
Summary
▪ SMB and FTP enable users to share files.
▪ P2P applications make it easier for consumers to seamlessly share
media.
▪ 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.

You might also like