0% found this document useful (0 votes)
5 views6 pages

Transport Layer Protocols Explained

Chapter 3 discusses transport-layer services focusing on process-to-process communication, addressing through port numbers, and the concepts of multiplexing and demultiplexing. It explains connection-oriented and connectionless services, detailing protocols such as UDP and TCP, including their features, error control mechanisms, and applications. The chapter highlights the importance of flow control, error detection, and the use of acknowledgments in reliable data transmission.

Uploaded by

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

Transport Layer Protocols Explained

Chapter 3 discusses transport-layer services focusing on process-to-process communication, addressing through port numbers, and the concepts of multiplexing and demultiplexing. It explains connection-oriented and connectionless services, detailing protocols such as UDP and TCP, including their features, error control mechanisms, and applications. The chapter highlights the importance of flow control, error detection, and the use of acknowledgments in reliable data transmission.

Uploaded by

jatink1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 3

Transport-Layer Services
Process-to-process Communication: The rst duty of a transport-layer protocol. Process-to-
process means not only getting from source to destination computer but also to the correct pro
cess.
Addressing: Port Numbers: port number between 0-65535 (16-bits). Ephemeral port number has
to be greater than 1023.
ICANN Ranges:
• well-known: ports ranging from 0 to 1023
• registered ports: 1024 - 49151
• dynamic-private: 49152-65535
IP address + Port address = Socket address
The packets at the transport layers in the Internet are called user datagrams, segments, or
packets.
Multiplexing: When an entity accepts items from more than one source
Demultiplexing: vice versa.
Multiple messages form multiple packets (multiplexer) these packets go to multiple destinations
where they are extracted and sent to respective processed (demultiplexer)
Pushing: If the sender delivers items whenever they are produced without a prior request from the
consumer
Pulling: If the producer delivers the items after the consumer has requested them
When the producer pushes the items, the consumer may be overwhelmed and there is a need for
ow control.

Use bu ers where ow control is required.


Error Control: Detecting and discarding corrupt packets, Keeping track of lost and discarded
packets and resending them. Recognising duplicates and discarding them. Bu ering out-of-order
packets until the missing packet arrives.
The receiving transport layer manager error control, by informing the sending transport layer
about the problems.
Acknowledgement: Positive error control signal, receiver sends sender acknowledgment that he
has received packet safe and sound.
Combination of Error control and ow control: Two bu ers one at each site.
Sliding window is used in bu er
Congestions at the transport layer is actually the result of congestion at the network layer, which
manifests itself at the transport layer.
fl
ff
fl
ff
fl
fi
ff
ff
Connectionless Service: interdependency between packets. The transport layer treats each
chunk as a single unit without any relation between the chunks. No ow control, error control, or
congestion control can be e ectively implemented.
Connection-Oriented service: client-server logical connection, exchange dependent packets,
tear down connection. the service is end-to-end. only involves the two hosts. Can implement all
controls.

Transport Layer Protocols


Simple Protocol: connectionless protocol, no error, ow control. Assume receiver is always
ready.
ff
fl
fl
Stop and Wait Protocol: connection-oriented protocol. Both ow and error control. Sliding
window of size 1. Checksum for error control, timer for ow control. We need sequencing number
0, 1 only. Acknowledgement numbers always announce the sequence number of the next packet
expected by the receiver.

E ciency: The stop and wait protocol is very ine cient if our channel is thick and long.
Round trip delay is long + large bandwidth -> bandwidth delay product.
No pipelining in stop and wait

Go-Back-N Protocol
(GBN):
We can send several
packets before receiving
acknowledgments, but
the receiver can only
bu er one packet.
Send window: an
imaginary box covering
the sequence numbers of
the data packets that can
be in transit or can be
sent.
Receive window: makes
sure that the correct data
packets are received and
that the correct
acknowledgments are
sent. In GBN the size of
this window is 1.
ffi
ff
ffi
fl
fl
Selective Repeat Protocol:
Simpli es process at the receiver as it keeps track of only one variable. Two windows, the
maximum size of the send window is 2^m-1. The size of the receive window is the same.
Acknowledgment is about sequence received.
Why window size is at most half? This you can read from book, good explanation.

Piggybacking: in two way connections, one direction data is sent with the acknowledgment for
other direction.

User Datagram Protocol (UDP)


connectionless, unreliable transport protocol. Minimum of overhead.
User datagrams - xed header of 8 bytes , 2 bytes source port, 2 bytes destination port, 2 bytes
total length (including header), 2 bytes checksum.
UDP services: process-to-process communication, connectionless service, no ow control, only
checksum error control, no congestion control, encapsulation and decapsulation is there,
multiplexing demultiplexing is there.
fi
fi
fl
checksum: calculation includes three sections: a pseudo-header, the UDP header, and the data
coming from the application layer. The pseudo-header is the part of the header of the IP packet, in
which the user datagram is to be encapsulated with some elds lled with 0s. If the check sum
does not include the pseudo-header, a user datagram may arrive safe and sound. However, if the
IP header is corrupted it may be delivered to the wrong host. The protocol eld is added to ensure
that the packet belongs to UDP. UDP - 17. Sender decides not to calculate checksum, the
checksum eld is lled with all -0s.

In UDP, queues are associated with ports.


The only di erence between UDP and simple protocol is of checksum.

UDP Applications:

• Connectionless service: connectionless service is better if requests and response are short,
delay is an important issue. DNS uses UDP, SMTP cannot use UDP
• Lack of error control: good where uneven delay is not good but some information lost is ne.
Good for video calls, bad for pdfs
• Lack of congestion control: does not create extra tra c in error-prone network.
• UDP is also used with internal ow and error control mechanisms.

Transmission Control Protocol (TCP):


connection-oriented, reliable protocol. Uses combination of GBN and SR protocols to provide
reliability. Uses checksum, retransmission of lost or corrupted packets, cumulative and selective
acknowledgements and timers.
TCP services: process-to-process communication. allows sending process to deliver data as a
stream of bytes. Has sending and receiving bu ers. Uses segments, (group of bytes with a
header). Full-duplex, data can ow in both direction at the same time. Connection oriented
service. Reliable service.
TCP features:
• Numbering System
• Byte number: number is independent in each direction, doesn’t have to start at 0.
• Sequence number: seq no of the rst segments is the initial sequence number, any other
segment is seq no of the previous segment + number of bytes carried by the previous
segment. Sometimes, empty segments with only control data are sent, they are counted as
one byte.
• Acknowledgment number: the number of next byte and is cumulative.
fi
ff
fi
fl
fl
fi
ff
ffi
fi
fi
fi
fi
Segment: header is 20-60 bytes.

HLEN - header length - number of 4-byte words in the TCP.

Window size, is determined by the receiver.


Checksum - mandatory. The same pseudo-header is added. value of protocol is 6
urgent pointer - valid if urgent ag is set.
TCP segment encapsulates the data received from application layer.
fl

You might also like