Transport Layer
Transport Layer
different hosts. The transport layer has no knowledge of the destination host type, the type of media
over which the data must travel, the path taken by the data, the congestion on a link, or the size of
the network.
UDP is connectionless protocol, it uses datagrams which are also referred to segments, it is best-
effort which means it is faster. UDP provides no flow control or acknowledgement.
Except of data segmentation and reassembling, TCP provides:
Establishing the session – how much traffic can be do at one time
Ensures reliable delivery – acknowledgement
Provides same order delivery – segments in correct order
Supports flow control – if recourses of a device are overtaxed, TCP can reduce the rate of
data flow.
Overall media and video, simple messages apps and apps that handle reliability by themselves
Three-way handshake:
Control bits are flags that say what flag for TCP is set on:
During session setup, the initial sequence number (ISN) is set to provide “numbering” the segments if
they arrive in not proper order.
To provide retransmission during data loss TCP uses SEQ (sequence number) and ACK (acknowledge)
by sending ACK past not proper SEQ number received, then source have to retransmit the all-next
segments, unless they use:
SACK (selective acknowledgement) then source have to resend only valid segments.
The window size is the number of bytes that the destination device of a TCP session can accept and
process at one time:
Maximum segment size is agreed during three-way handshake, it indicates the maximum size of the
segment that can be sent at one time:
the default is 1460 bytes because of 20 bytes of IP and 20 bytes of TCP for IPv4, the default
doesn’t include TCP header itself.
To avoid congestions, if TCP doesn’t get expected acknowledge, it sends packet second time, but after
some time to avoid congestions (it often happens because of router discards the segment) it makes the
segment smaller to provide better communication.