0% found this document useful (0 votes)
0 views50 pages

Transport Layer

The Transport Layer is responsible for process-to-process delivery of messages, overseeing segmentation, flow control, error control, and connection management. It utilizes protocols such as TCP for reliable, connection-oriented communication and UDP for connectionless, faster transmission. Key functions include service-point addressing, segmentation and reassembly, and congestion control to manage network traffic effectively.

Uploaded by

kibrusayzana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views50 pages

Transport Layer

The Transport Layer is responsible for process-to-process delivery of messages, overseeing segmentation, flow control, error control, and connection management. It utilizes protocols such as TCP for reliable, connection-oriented communication and UDP for connectionless, faster transmission. Key functions include service-point addressing, segmentation and reassembly, and congestion control to manage network traffic effectively.

Uploaded by

kibrusayzana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Transport Layer

 Main Tasks
 TCP
 UDP
Transport Layer (4 OSI layer) th

 It is responsible for process-to-process delivery of the entire


message.
– A process is an application program running on a host.
– Network layer oversees source-to-destination delivery of
individual packets, it does not recognize any relationship
between those packets.

Sunday, June 8, 2025 2


Process-to-Process Delivery
 The data link layer is responsible for delivery of frames
between two neighboring nodes over a link. This is called
node-to-node delivery.
 The network layer is responsible for delivery of datagrams
between two hosts. This is called host-to-host delivery.
 The transport layer is responsible for process-to-process
delivery-the delivery of a packet, part of a message, from one
process to another.
Sunday, June 8, 2025 3
Cont’d

the transport
The network layer gets
layer gets the entire
each packet message to
to the the correct
correct process on
computer; that
computer.

Sunday, June 8, 2025 4


Figure :Types of data deliveries

Sunday, June 8, 2025 5


Responsibilities
1. Service-point addressing
– Computers often run several programs at the same time.

– source-to-destination delivery means delivery not only


from one computer to the next but also from a specific
process (running program) on one computer to a specific
process on the other.
– The transport layer header must therefore include a type
of address called a service-point address (or port address).
Sunday, June 8, 2025 6
Transport layer addressing
 to deliver something to one specific destination among many,
we need an address.
– At the data link layer (MAC address )
• to choose one node among several nodes if the
connection is not point-to-point.
– At the network layer (IP address)
• to choose one host among millions.
– At the transport layer( port number)
• to choose among multiple processes running on the
destination host.
Sunday, June 8, 2025 7
Cont’d
2. Segmentation and Reassembly

– A message is divided into transmittable segments, with


each segment containing a sequence number.

– These numbers enable the transport layer to reassemble


the message correctly upon arriving at the destination and
to identify and replace packets that were lost in
transmission.

Sunday, June 8, 2025 8


Cont’d
3. Flow Control
– Like the data link layer, the transport layer is responsible
for flow control.
– However, flow control at this layer is performed end to end
rather than across a single link.

Sunday, June 8, 2025 9


Cont’d
4. Error control
– error control at this layer is performed process-to-process
rather than across a single link.
– The sending transport layer makes sure that the entire
message arrives at the receiving transport layer without
error (damage, loss, or duplication).
– Error correction is usually achieved through
retransmission.
Sunday, June 8, 2025 10
Figure : Error control

Sunday, June 8, 2025 11


Contd.
5. Connection control
– The transport layer can be either connectionless or
connection-oriented.
– Connectionless transport layer
• treats each segment as an independent packet and delivers it to the
transport layer at the destination machine.

– Connection-oriented transport layer


• makes a connection with the transport layer at the destination
machine first before delivering the packets.

Sunday, June 8, 2025 12


Figure IP addresses versus port numbers

Sunday, June 8, 2025 13


Port Number
 The destination port number is needed for delivery.
 The source port number is needed for the reply.
 The port numbers are 16-bit integers between 0 and 65,535.
 The client program  The server process
– defines itself with a port – must also define itself with a port
number number.
– chosen randomly by the – Use well known ports and allows
transport layer software running client applications to easily locate
on the client host. the corresponding server
– This is the ephemeral application processes on other
(temporal) port number. hosts.
Sunday, June 8, 2025 14
Figure: IANA ranges

Dynamic:
Well known : Registered :
private or temporary ports
assigned and used by vendors for
which are neither controlled nor
controlled by IANA their own server
registered. They can be used by
applications
any process.
Called ephemeral ports

Example of well known port numbers:


53- DNS ,21-FTP, 23-telnet, 25-SMTP, 80-HTTP, etc

Sunday, June 8, 2025 15


Socket Addresses
 Process-to-process delivery needs two identifiers, IP address
and the port number, at each end to make a connection.
 The combination of an IP address and a port number is called
a socket address.

Sunday, June 8, 2025 16


Transport Layer Services

Connectionless Reliable
Vs. Vs.
Connection-Oriented Unreliable
Services Services

Sunday, June 8, 2025 17


Connectionless Service
– the packets are sent from one party to another with no
need for connection establishment or connection release.
– The packets are not numbered;
– they may be delayed or lost or may arrive out of sequence.
– There is no acknowledgment either.
– UDP is a connectionless protocol

Sunday, June 8, 2025 18


Connection-Oriented Service
– a connection is first established between the sender and
the receiver.
– Data are transferred.
– At the end, the connection is released.
– TCP and SCTP are connection-oriented protocols.

Sunday, June 8, 2025 19


Reliable Vs. Unreliable
 Reliable
– Implementing flow and error control in Transport layer
– slower and more complex service.
 Unreliable
– if the application program uses its own flow and error
control mechanism
– When application program needs fast service
– the nature of the service does not demand flow and error
control (real-time applications)
Sunday, June 8, 2025 20
Transport Layer Protocols
• UDP
• TCP
• SCTP (Stream Control Transmission
Protocol )
UDP
 User Datagram Protocol
 UDP is connectionless and unreliable
 It does not add anything to the services of IP except to
provide process-to-process communication.
 it performs very limited error checking.
 Does provide a checksum to verify individual packet integrity.

Sunday, June 8, 2025 22


UDP issues
 UDP is not capable of segmenting and reassembling frames
 Does not implement sequence numbers
 No protection against duplicate packets.
 No guaranteed ordering of packets.
 No verification of the readiness of the computer receiving the
message.
 No guarantee the destination will receive all transmitted
bytes.
Sunday, June 8, 2025 23
UDP issues
 UDP can transmit only small portions of data at a time

because it is not capable of segmenting and reassembling

frames and does not implement sequence numbers

Sunday, June 8, 2025 24


UDP Benefits
– No retransmission delay
– Speed
– Suitable for broadcasts and multicasts
– UDP is suitable for a process with internal flow and error
control mechanisms.
• For example, the Trivial File Transfer Protocol (TFTP) process
includes flow and error control. It can easily use UDP

Sunday, June 8, 2025 25


UDP header packet structure
 UDP packets, called user datagrams

 contains four fields totaling 8 bytes.

 The fields in a UDP header are:

– Source port number

– Destination port number

– Length

– Check Sum
Sunday, June 8, 2025 26
Contd.

Sunday, June 8, 2025 27


TCP
 Transmission Control Protocol
 It is a connection-oriented and reliable protocol.
 TCP, like UDP, is a process-to-process (program-to-program)
protocol.
 uses flow and error control mechanisms at the transport level

Sunday, June 8, 2025 28


Figure : TCP segment format

Sunday, June 8, 2025 29


TCP Services
 Process-to-Process Communication

– Like UDP, TCP provides process-to-process


communication using port numbers.
 Stream Delivery Service
 Full-Duplex Communication
 Connection-Oriented Service
 Reliable Service

Sunday, June 8, 2025 30


TCP data delivery

Sunday, June 8, 2025 31


Sending and receiving buffers

Sunday, June 8, 2025 32


TCP Segment Numbering System
 Byte Number
– TCP numbers all data bytes that are transmitted in a
connection.
– Numbering is independent in each direction.
– When TCP receives bytes of data from a process, it stores
them in the sending buffer and numbers them.
– The numbering does not necessarily start from 0.

Sunday, June 8, 2025 33


TCP Segment Numbering System
 Byte Number

– For example, if the random number happens to be 1057


and the total data to be sent are 6000 bytes, the bytes are
numbered from 1057 to 7056.
– Byte numbering is used for flow and error control too.

Sunday, June 8, 2025 34


TCP Segment Numbering System
 Sequence Number

– After the bytes have been numbered, TCP assigns a


sequence number to each segment that is being sent.
– The sequence number for each segment is the number of
the first byte carried in that segment.

Sunday, June 8, 2025 35


Quiz
 Suppose a TCP connection is transferring a file of 8000 bytes.
The first byte is numbered 10,001.
 What are the sequence numbers for each segment if data are
sent in four segments, each carrying 2000 bytes?

Sunday, June 8, 2025 36


Quiz :Solution
– Segment 1 Sequence Number:
10,001 (range: 10,001 to 12,000)
– Segment 2 Sequence Number:
12,001 (range: 12,001 to 14,000)
– Segment 3 Sequence Number:
14,001 (range: 14,001 to 16,000)
– Segment 4 Sequence Number:
16,001 (range: 16,001 to 18,000)
Sunday, June 8, 2025 37
Acknowledgment Number

 It is cumulative i.e. the party takes the number of the last byte
that it has received, safe and sound, adds 1 to it, and
announces this sum as the acknowledgment number.
 if a party uses 5643 as an acknowledgment number, it has
received all bytes from the beginning up to 5642.
– Note that this does not mean that the party has received
5642 bytes because the first byte number might not have
to start from 0.
Sunday, June 8, 2025 38
Three-Way Handshaking
 The process starts with the server.

– The server program tells its TCP that it is ready to accept a

connection. This is called a request for a passive open.


 The client program issues a request for an active open.
 A client that wishes to connect to an open server tells its TCP
that it needs to be connected to that particular server.
 TCP can now start the three-way handshaking process

Sunday, June 8, 2025 39


Figure : Connection establishment using three-way handshaking

Sunday, June 8, 2025 40


A SYN segment cannot carry data, but it consumes one
sequence number.

A SYN + ACK segment cannot


carry data, but does consume one
sequence number.

An ACK segment, if carrying no data, consumes no sequence


number.

Sunday, June 8, 2025 41


Figure: Data transfer

The Receiver
Window (rwnd) is
a variable that
advertises the
amount of data
that the
destination side
can receive.

Sunday, June 8, 2025 42


Figure : Connection termination using three-way handshaking

Sunday, June 8, 2025 43


The FIN segment consumes one sequence number if it does
not carry data.

The FIN + ACK segment consumes


one sequence number if it
does not carry data.

Sunday, June 8, 2025 44


Figure :Half-close

Sunday, June 8, 2025 45


Congestion
 Congestion:
– Congestion in a network may occur if the load on the
network-the number of packets sent to the network-is
greater than the capacity of the network-the number of
packets a network can handle.
 Congestion control
– refers to the mechanisms and techniques to control the
congestion and keep the load below the capacity.

Sunday, June 8, 2025 46


Congestion control Flow Control
Traffics are controlled entering to Traffics are controlled which are
the network. flow from sender to a receiver.
Network layer and Transport Data link layer and Transport
layer handle it. layer handle it.
Network is prevented from Receiver’s data is prevented
congestion. from being overwhelmed.
Transport layer is responsible for Only sender is responsible for
the traffic. the traffic.
Traffic is prevented by slowly Traffic is prevented by slowly
transmitting by the transport sending by the sender.
layer.
buffer overrun is restrained in buffer overrun is restrained in
the intermediate systems in the the receiver.
network.

Sunday, June 8, 2025 47


CONGESTION CONTROL

 Congestion control refers to techniques and mechanisms that


can either prevent congestion, before it happens, or remove
congestion, after it has happened.
 In general, we can divide congestion control mechanisms into
two broad categories: open-loop congestion control
(prevention) and closed-loop congestion control (removal) as
shown in Figure below.

Sunday, June 8, 2025 48


Congestion Control

Open Loop
• Retransmission Policy
• Window Policy
• Acknowledgment Policy
• Discarding Policy
• Admission Policy

Closed Loop
• Back Pressure
• Choke packet
• Implicit signaling
• Explicit signaling
Sunday, June 8, 2025 49
Thank You

You might also like