Transport Layer: Congestion Control, Flow Control, TCP & UDP
What is Congestion Control in the Transport Layer?
Congestion control is an algorithm used in TCP that reacts to certain events occurring in the network. It sends packets without reservation, preventing packet loss in a router. It involves increasing the transmission rate, testing the available bandwidth until leakage occurs.
What is Flow Control in the Transport Layer?
Flow control is an algorithm that prevents the sender from overflowing the receiver’s buffer by transmitting data too quickly. The receiver has a receive buffer, and flow control adapts the transmission rate so that the application process can gradually read the buffer.
Services Provided by UDP and TCP
Both UDP and TCP are protocols that enable data transmission between computers.
UDP (User Datagram Protocol)
- Segments can be lost, disordered, or duplicated.
- No prior negotiation between sender and receiver.
- Each segment is treated independently.
- No need to establish a connection.
- Simple, with small segment size.
- No congestion control; UDP can transmit bursts at the desired speed.
- Used for multimedia applications.
- Unreliable and connectionless.
TCP (Transmission Control Protocol)
- Point-to-point: one sender to one receiver.
- Reliable, using algorithms like congestion control and flow control.
- Establishes a connection.
- Byte stream is transmitted in order.
- Unlimited messaging.
- Bidirectional data flow.
- Maximum segment size.
- Requires prior negotiation between sender and receiver.
- Flow is controlled to prevent the sender from overwhelming the receiver.
- Connection-oriented protocol.
Common Services Provided by TCP and UDP
Both protocols provide logical communication between application processes running on different computers. They both perform multiplexing and demultiplexing.
In demultiplexing, the host receives IP datagrams. Each datagram has source and destination IP addresses and carries a transport layer segment. Each segment has a source and destination port number. The computer uses IP addresses and port numbers to direct the segment to the appropriate socket.
Mechanisms Incorporated by TCP for Reliability
TCP incorporates these mechanisms for reliability:
- Congestion control
- Flow control
- Connection establishment
What Does it Mean that TCP Works End-to-End?
It means that the services provided by TCP run on either end of the connection, not within the network itself.
Difference Between Network Layer and Transport Layer
The transport layer provides logical communication between application processes running on different computers. The sender breaks application messages into segments and passes them to the network layer. The receiver reassembles the segments and passes them to the application layer.
At the network layer, transport occurs with segments from sender to receiver. The sender encapsulates the datagram segments, and the receiver delivers segments to the transport layer. There is a network layer protocol on each host, and the router examines header fields in all IP datagrams passing through it.
What do Nodes Agree on When Establishing a TCP Connection?
During TCP connection establishment, initial sequence numbers are exchanged between the two TCP entities. These sequence numbers are used to identify the data within the byte stream and to identify and count bytes of application data.