Transport Layer
Transport Layer
1. Connection Type:
o TCP: Connection-oriented. A connection is established before data is transmitted,
ensuring reliable communication.
o UDP: Connectionless. Data is sent without establishing a connection, which can
lead to faster transmissions.
2. Reliability:
o TCP: Reliable. It ensures that data is delivered in order and retransmits lost
packets.
o UDP: Unreliable. There is no guarantee of delivery, order, or error checking.
3. Flow Control and Congestion Control:
o TCP: Implements flow control and congestion control mechanisms to manage
data transmission.
o UDP: Does not implement flow or congestion control; it's up to the application to
handle these.
4. Data Transmission:
o TCP: Data is sent as a stream of bytes, maintaining order.
o UDP: Data is sent as discrete packets, known as datagrams.
5. Use Cases:
o TCP: Suitable for applications requiring reliable communication (e.g., web
browsing, email).
o UDP: Suitable for applications where speed is critical and occasional loss is
acceptable (e.g., online gaming, video streaming).
Network Congestion: Network congestion occurs when the amount of data being
transmitted exceeds the network's capacity, causing delays and packet loss. It typically
arises from high traffic volume, inefficient routing, or insufficient bandwidth.
Causes of Congestion:
● High User Demand: Many users trying to access the network simultaneously.
● Insufficient Bandwidth: The network cannot handle the amount of traffic.
● Network Configuration Issues: Poorly optimized settings can contribute to congestion.
1. Connection Establishment:
o The sender and receiver establish a connection (e.g., using TCP’s three-way
handshake).
2. Initial Transmission:
o The sender starts transmitting data using an initial congestion window size, which
is often small.
3. Monitoring Feedback:
o The sender monitors acknowledgments (ACKs) from the receiver. These ACKs
inform the sender that packets have been successfully received.
o If the sender does not receive an ACK for a packet within a certain timeframe
(timeout), it assumes packet loss has occurred.
4. Adjusting Transmission Rate:
o Slow Start: The sender exponentially increases the congestion window size for
each ACK received until a threshold (slow start threshold) is reached.
o Congestion Avoidance: Once the threshold is reached, the sender switches to
linear growth of the congestion window to avoid further congestion.
oFast Retransmit: If the sender receives multiple duplicate ACKs (indicating a
packet loss), it retransmits the lost packet immediately without waiting for a
timeout.
o Fast Recovery: After retransmitting, the sender reduces its congestion window
and enters congestion avoidance mode to stabilize the transmission rate.
5. Feedback Loop:
o The process continues, with the sender adjusting its transmission based on the
feedback from the network (via ACKs or timeouts) to ensure it doesn’t
overwhelm the network.
1. Packet Transmission:
o Similar to end-to-end, the sender transmits packets to the receiver. However,
network elements (routers and switches) monitor the state of the network.
2. Network Monitoring:
o Routers track metrics such as queue lengths and packet loss rates. Routers take
action when congestion is detected (e.g., queues are filling up).
3. Explicit Congestion Notification (ECN):
o Instead of dropping packets when congestion occurs, routers can mark packets
with a congestion notification.
o This notification signals to the sender that the network is experiencing congestion.
4. Feedback to Sender:
o When the sender receives a marked packet or feedback from the network, it
adjusts its sending rate:
▪ Reduce Rate: The sender may decrease its congestion window or send
fewer packets until congestion is alleviated
N:B : Remaining topics from the book of Computer Networking, A top down approach featuring the
internet ( James F. Kurose)