Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Services provided by the transport layer:

TCP: Transmission Control Protocol

UDP: User Datagram Protocol

The transport layer serves as the intermediary connection between application processes operating
on distinct hosts or end systems. It facilitates the exchange of data between these processes, enabling
communication across network boundaries.

Transport Layer Multiplexing and Demultiplexing

One mother (transport layer protocol) in the Australian house (host) collected
(multiplexed) letters (messages) from her kids (application processes) and passed those on
to the postal service (network layer protocol). The other mother (transport layer protocol)
in the Belgium house (host) looked at the names on the envelopes (segment header) and
distributed (demultiplexed) letters (messages) to her kids (application processes) which are
passed down from the postal service (network layer protocols)

UDP User Datagram Protocol

In this basic version of the transport protocol, UDP (User Datagram Protocol) provides a besteffort
service, meaning segments may be lost or delivered out of order during transmission. The UDP
segment header, comprising 8 bytes, includes the source and destination ports for multiplexing and
demultiplexing, the segment's length, checksum for error detection, and the payload. The checksum
calculates a sum at the sender's side and the receiver verifies this sum to identify any errors. If the
sums don't match, it signals an error, enhancing reliability in data transmission.

TCP Transmission Control Protocol

In this basic version of the transport protocol, UDP (User Datagram Protocol) provides a besteffort
service, meaning segments may be lost or delivered out of order during transmission. The UDP
segment header, comprising 8 bytes, includes the source and destination ports for multiplexing and
demultiplexing, the segment's length, checksum for error detection, and the payload. The checksum
calculates a sum at the sender's side and the receiver verifies this sum to identify any errors. If the
sums don't match, it signals an error, enhancing reliability in data transmission.
A TCP segment is dynamically constructed, forming one segment if the window size is smaller than
the Maximum Segment Size (MSS), and multiple segments if it exceeds the MSS.

TCP implements a timeout or retransmission mechanism to recover lost segments. If segments sent
by the sender remain unacknowledged beyond a predetermined timeout period, the corresponding
data chunks are retransmitted to ensure reliable data delivery.

Flow control
When an application initiates sending a stream of data, it passes through the socket to the transport
layer at the sender's end. TCP initially stores this data in the TCP send buffer before segmenting it and
adding headers to create segments. TCP buffers can overflow if the sender continues transmitting
without confirmation from the receiver, leading to potential data loss. To prevent this, TCP
implements a flow-control service utilizing a sliding window mechanism.
Additionally, TCP employs congestion control mechanisms to manage and mitigate network
congestion, ensuring efficient and reliable data transmission across the network.
Upon receiving the acknowledgment for segment 2 from Host B, Host A's sliding window can progress
to include segments 3 to 6, allowing for the continued transmission of data. This movement within
the sliding window signifies that the receiver has successfully received and acknowledged the
previous segments, indicating readiness to accept additional data.

If the application at Host B doesn't retrieve received data promptly, TCP at the receiver adjusts the
window size to match the available buffer capacity, informing Host A accordingly. This enables Host A
to decrease the amount of data being transmitted, ensuring efficient utilization of network resources
and preventing buffer overflow.

Three main ARQ algorithms we use in computer networks:

Stop-and-wait: When the sender waits for acknowledgment before sending the next packet, it can
cause problems with how efficiently the network is used. This waiting can slow down data transfer
because the sender doesn't keep sending packets as soon as it can.

Go-back-N: When the sender sends multiple packets without waiting for acknowledgment, using a
window size to limit the number of unacknowledged packets, it reduces the channel utilization
problem seen in the stop-and-wait method. However, if an error occurs, the sender may need to
resend multiple packets, which can lead to inefficiencies.

Selective repeat: In Go-Back-N, the sender retransmits only the packets it suspects were received with
errors, rather than retransmitting a large batch of packets. This targeted approach minimizes
unnecessary retransmissions, which can occur in other methods, thereby improving efficiency in data
transmission.

TCP Congestion Control:


TCP's congestion control mechanism has two main parts: slow start and congestion avoidance.

The sending rate increase algorithm involves the sender checking if the network can handle a higher
sending rate.

The sending rate decrease algorithm involves the sender reducing its rate when congestion is
detected to improve packet delay and reduce loss rates. TCP Congestion Control algorithm has
two main phases:

During the Slow Start phase, TCP's send rate, also known as the congestion window, begins slowly and
grows exponentially until it reaches a threshold. Once the threshold is reached, the algorithm
transitions to the next phase, known as Congestion Avoidance.

In Congestion Avoidance, the congestion window value increases by just one Maximum Segment Size
(MSS) every round trip time (RTT).

How is this useful:

Understanding the functions and services of the transport layer, along with the protocols it
encompasses, is crucial for anyone involved in computer networks, such as network
administrators, engineers, and developers.

What is the most important thing you learnt in this module:

The most important thing I learned is how the transport layer helps applications on different
computers communicate reliably and efficiently. It makes sure data gets from one place to
another smoothly by managing things like flow control, congestion, and fixing errors along the
way.

You might also like