Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 34

Transport Layer

Session Layer
Presentation Layer

By : Dr. poonam Garg


The Transport Layer
Layers 1 -3
 Layer 1 allows bit streams to be created and to
travel.
 Layer 2 packages those data packets into frames to
be converted to bit streams and makes LAN
delivery possible.
 Layer three packages data from upper layers in
packets and makes routing and WAN delivery
possible.
Layer 4 - Transport Layer
But we have made no provision for
assuring our data reliably travels
end-to-end across the often vast network
path. Layer 4 performs multiple functions to
provide this "quality of service.”
Quality of Service
The phrase "quality of service" is often used
to describe the purpose of Layer 4 - the
transport layer. Its primary duties are to
transport and regulate the flow of
information from source to destination,
reliably and accurately.
repeat their words (reliability), and to speak slowly (flow
control).
The TCP/IP protocol of the OSI model Layer 4 (transport layer)
has two protocols - TCP and UDP.
TCP
TCP supplies a virtual circuit between end-user
applications. These are its characteristics:
 connection-oriented
 reliable
 divides outgoing messages into segments
 reassembles messages at the destination station
 re-sends anything not received
 reassembles messages from incoming segments.
UDP
UDP transports data unreliably between hosts. Following are
the characteristics of UDP:
 connectionless
 unreliable
 transmit messages (called user datagrams)
 provides no software checking for message delivery
(unreliable)
 does not reassemble incoming messages
 uses no acknowledgements
 provides no flow control
TCP is connection-oriented and ensures reliability and
IP is connection-less with best effort attempts at delivery.
Transmission Control Protocol TCP.

Transmission Control Protocol (TCP) is a connection-


oriented Layer 4 (transport layer) protocol that provides
reliable full-duplex data transmission. TCP is part of the
TCP/IP protocol stack.
User Datagram Protocol (UDP)

UDP is the connectionless transport protocol in the


TCP/IP protocol stack. UDP is a simple protocol that
exchanges datagrams, without acknowledgments or
guaranteed delivery, requiring that error processing and
retransmission be handled by other protocols.
TCP Segment Fields
Following are the definitions of some of the fields in
the TCP segment:
 source port -- number of the calling port
 destination port -- number of the called port
 sequence number -- number used to ensure correct sequencing
of the arriving data
 acknowledgment number - next expected TCP octet
 window -- number of octets that the sender is willing to accept
 HLEN - number of 32-bit words in the header
 reserved - set to zero
code bits - control functions (such as setup and termination of a
session)
checksum - calculated checksum of the header and data fields
urgent pointer - indicates the end of the urgent data
option- one option - maximum TCP segment size
data - upper-layer protocol data
UDP Segment Fields

UDP uses no windowing or acknowledgments, therefore application-layer


protocols provide reliability. UDP is designed for applications that do not need to
put sequences of segments together.
 Protocols that use UDP include:
 TFTP SNMP
 DHCP
 DNS (Domain Name System)

TCP & UDP Port Numbers
Both TCP and UDP use port (or socket)
numbers to pass information to the upper
layers.
 Numbers below 255 - are for public
applications
 Numbers from 255-1023 - are assigned to
companies for marketable applications
 Numbers above 1023 - are unregulated
Common Public Port Number
3-Way Handshake
 TCP hosts establish a connection-oriented session
with one another using a three-way handshake.
 A three-way handshake synchronizes a connection
at both ends before user data is exchanged.
 The exchange of introductory sequence numbers,
during the connection sequence, ensures that any data
that is lost, due to problems that may occur later, can
be recovered.
3-Way Handshake
Window Size
Window size determines the amount of data
that you can transmit at one time before
receiving an acknowledgment from the
destination.
Window Size = 3
Sequencing
 TCP provides sequencing of segments with
a forward reference acknowledgment.
 If a sequence number is missing in the
series, that segment is re-transmitted.
TCP Sequence &
Acknowledgement Number
The Session Layer
7 Application Network processes to applications
6 Presentation Data Representation
5 Session Interhost Communication
Establishes, manages and terminates
sessions between applications
4 Transport
3 Network
2 Data Link
1 Physical
Dialog Control
 When the session layer decides whether to
use 2-way simultaneous or 2-way alternate
communication it is called dialogue control.
 The session layer uses two major forms of
dialog control:
2-way alternate communication
2-way simultaneous communication
2-Way Alternate and 2-Way
Simultaneous Communication.

 2-way alternate communication avoids


interrupts by taking turns.
 2-way simultaneous communication allows
2 messages to cross during a conversation.
Dialogue Separation

Dialogue separation is the orderly initiation,


termination, and managing of
communication.
Layer 5 Protocols
Layer 6 - The Presentation Layer
 The presentation layer is responsible for
presenting data in a form that the receiving
device can understand.
 The presentation layer has 3 main functions:
data formatting
data compression
data encryption
Data Formatting
To understand how data formatting works,
imagine two dissimilar systems. The first system
uses Extended Binary Coded Decimal Interchange
Code (EBCDIC) to format text. The second
system uses American Standard Code for
Information Interchange (ASCII) to format text.
Layer 6 provides the translation between these two
different types of codes.
Graphic File Formats
The Internet uses two binary file formats to
display images:
 Graphic Interchange Format (GIF)
 Joint Photographic Experts Group (JPEG).
Any computer with a reader for the GIF and
JPEG file formats can read these file types,
regardless of the type of computer.
Multimedia File Format
 The multimedia file format is another type
of binary file, which stores sounds, music,
and video.
 Sound files may be completely downloaded,
first, and then played, or they may download
while they are playing. The latter method is
referred to as streaming audio.
Markup Language
Another type of file format is markup
language. This format acts as a set of
directions that tell a Web browser how to
display and manage documents. Hypertext
Markup Language (HTML) is the language
of the Internet.
Encryption & Compression
 Layer 6 is responsible for data encryption.
Data encryption protects information during
its transmission.
 The presentation layer is also responsible
for the compression of files.

You might also like