Computer Networks UNIT-9
Computer Networks UNIT-9
Semester : IV
Unit number :9
C o n f i d e n NEXT
HOME tial
Unit-9 Transport Layer
Transport Layer
Objectives
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Transport Layer
Lecture outline
•Introduction
•Connection establishment
•Connection Release
•Transport Protocols
•Summary
PREVIOUS
C o n f i d e nNEXT
tial
Unit-9 Transport Layer
Introduction
• The transport layer is the fourth layer of the OSI reference model.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
• The transport layer usually turns the unreliable and very basic
service provided by the Network layer into a more powerful one.
Connection-oriented :
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
The Network layer doesn't generally guarantee that packets of data will
arrive in the same order that they were sent, but often this is a desirable
feature, so the Transport layer provides it.
Reliable Data :
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Flow Control :
When sender is fast and receiver is slow, flow control mechanism is used
to stop sender from fast sending so that receiver should accept all the
data properly.
Congestion avoidance :
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Byte orientation :
Ports :
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection establishment
The problem occurs when the network can lose, store and duplicate
packets.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection establishment
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection establishment
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection release
Symmetric release
Asymmetric release
Asymmetric release is the way the telephone system works. Here when
one party hangs up, the connection is broken. Asymmetric release is
abrupt and may result in data loss.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection release
a) Figure below shows the normal case in which one of the users sends a
DISCONNECTION REQUEST (DR) TPDU. When it arrives, the recipient
sends back a DR TPDU and starts the timer to keep track in case DR is
lost. Finally when the ACK TPDU arrives the receiver also releases the
connection.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection release
(b) Figure below illustrates the situation when the signal ACK TPDU which
we came across in normal connection release is lost. The situation is
saved by the use of timer. When the timer expires, the connection is
released anyway.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Connection release
(c) Figure below illustrates the case when the second DR TPDU which
we came across in normal connection release is lost. The user
initiating the disconnection will not receive the expected response,
with time out and will start all over again. Here we assume the
second time no TPDU are lost and all TPDU’s delivered correctly and
on time.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
TCP protocol :
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
In the Internet protocol suite, TCP is the intermediate layer between the
Internet Protocol (IP) below it, and an application above it.
TCP does the task of the transport layer in the simplified OSI model of
computer networks.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Bits
+ 4–7 8–15 16–31
0–3
0 Source Port Destination Port
32 Sequence Number
64 Acknowledgment Number
Data
96 Reserved Flags Window
Offset
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
• Data offset: This 4-bit field specifies the size of the TCP header in
32-bit words. The minimum size header is 5 words and the maximum
is 15 words thus giving the minimum size of 20 bytes and maximum
of 60 bytes. This field gets its name from the fact that it is also the
offset from the start of the TCP packet to the data.
• Reserved: 4-bit reserved field for future use and should be set to
zero.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
UDP protocol :
User Datagram Protocol (UDP) is one of the core protocols of the Internet
protocol suite. Using UDP, programs on networked computers can
send short messages sometimes known as datagrams (using
Datagram Sockets) to one another.
UDP does not guarantee reliability or ordering in the way that TCP does.
Datagrams may arrive out of order, appear duplicated, or go missing
without notice.
UDP is a minimal message-oriented transport layer protocol. In the
Internet protocol suite, UDP provides a very simple interface between
a network layer below and a session layer or application layer above.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
The UDP header consists of only 4 fields. The use of two of those is
optional.
+ Bits 0 - 15 16 - 31
32 Length Checksum
Data
64
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Source port :This field identifies the sending port when meaningful and
should be assumed to be the port to reply to if needed. If not used, then
it should be zero.
Length : A 16-bit field that specifies the length in bytes of the entire
datagram: header and data. The minimum length is 8 bytes since that's
the length of the header. The field size sets a theoretical limit of 65,527
bytes for the data carried by a single UDP datagram.
PREVIOUS i d e n t i a NEXT
C o n f HOME l
Unit-9 Transport Layer
Summary
• The transport layer is the fourth layer of the OSI reference model.
• The transport layer provides transparent transfer of data between
hosts. It is usually responsible for end-to-end connection, error
recovery, flow control, and ensuring complete data transfer.
• The transport layer provides various services.
• The most important of which is to provide an end to end, reliable
connection oriented byte stream from sender to receiver. It is
achieved by using the service primitives like LISTEN, SEND etc. These
service primitives permit the connection establishment, use and
release of the connection.
• Two main important protocols of transport layer are TCP and UDP.
TCP is reliable and connection oriented protocol where as UDP is
unreliable and connection less protocol.
C o n f i d e nHOME
PREVIOUS tial