You are on page 1of 18

Transport Layer

Goals: Overview:
 understand principles  transport layer services
behind transport layer  multiplexing/demultiplexing
services:  connectionless transport: UDP
 multiplexing/demultiplex 
ing
principles of reliable data
transfer
 reliable data transfer
 connection-oriented transport:
 flow control
TCP
 congestion control
 reliable transfer
 flow control
 connection management
 principles of congestion control
 TCP congestion control
23-1 PROCESS-TO-PROCESS 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. Two processes
communicate in a client/server relationship, as we will
see later.
Note

The transport layer is responsible for process-to-


process delivery.
Types of data deliveries
IP addresses versus port numbers
IANA ranges
Socket address
Multiplexing and demultiplexing
Position of UDP, TCP, and SCTP in TCP/IP suite
23-2 USER DATAGRAM PROTOCOL (UDP)

The User Datagram Protocol (UDP) is called a


connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
UDP: User Datagram Protocol [RFC 768]

 “best effort” service, UDP segments may be:


 lost
 delivered out of order to app
 Why use UDP?
 No connection establishment cost (critical for
some applications, e.g., DNS)
 No connection state
 Small segment headers (only 8 bytes)
Multiplexing/Demultiplexing
HTTP
Transport FTP Transport
Layer Telnet Layer

Network Network
Layer Layer

 Use same communication channel between


hosts for several logical communication
processes
User datagram format
UDP Checksum

• The UDP Checksum provides for error detection

• UDP at the sender side performs the one’s complement


of the sum of all the 16 bit words in the segment.
• This result is put in the checksum field of the UDP
Segment.
• At the receiving host all 16 bit words are added together
including the checksum
• If the sum equals 111111111111111 then the segment has no
error detected.
• If one of the bit is zero, then we know that error has
been introduced in the segment
UDP Checksum (cont)

We have the following 3 sixteen bit words


UDP Checksum (cont)

• The sum of 3 16 bit numbers is 1100101011001010

• The complement of the sum is 0011010100110101


UDP Checksum (cont)

• At the receiver all four 16 bit words are added, including


the checksum.
• If no error are introduced into a segment then the sum
at the receiver will be 111111111111111.
• If one of the bit is zero then we know that error has
been introduced into the segment.
UDP Checksum (cont)

• The sum of first three 16 bit number is


1100101011001010
• Now to add checksum
• 1100101011001010
• 0011010100110101
• The sum is 1111111111111111 which means that there is no
error detected.

Q: Is it possible that UDP checksum does not detect an


error?

You might also like