Computer Networks
LECTURE # 13
CONNECTION ESTABLISHMENT , FLOW AND CONGESTION CONTROL
Understanding Connection-Oriented vs. Connectionless Communication
Connection-Oriented Communication: This type of communication establishes a connection before any data is sent. TCP is a prime example. It ensures reliability, ordering, and error-checking.
Connectionless Communication: In this method, data packets are sent without establishing a connection first. User Datagram Protocol (UDP) exemplifies this with lower latency but no reliability guarantees.
2. The Role of TCP in Connection Establishment
TCP enables reliable communication through a process known as the three-way handshake during connection establishment. Let’s break this down step by step:
2.1 Three-Way Handshake Process
This three-way handshake not only establishes the connection but also synchronizes the sequence numbers for both the client and server, ensuring that data packets are tracked accurately during transmission.
3. Timeout and Retransmissions
In addition to the handshake, TCP is equipped with mechanisms to handle lost packets. If an ACK is not received within a specific timeout period, the client or server will retransmit the data or SYN packet. This feature ensures reliability, a key aspect of TCP.
4. Connection Termination
Connection termination in TCP is as important as establishment. The process typically involves a four-step handshake, which can be summarized as follows:
This orderly shutdown helps to ensure that all data is transmitted and acknowledged before the connection is fully closed.
5. Error Handling and Flow Control
TCP also employs various mechanisms for error handling (using checksums) and flow control (using the sliding window protocol). These ensure smooth and reliable data transmission even over unpredictable networks.
Understanding Flow Control
Definition
Flow control is a technique used to manage the rate of data transmission between sender and receiver, ensuring that the sender does not overwhelm the receiver with more data than it can handle at any given time.
1.2. Importance
Prevent Data Loss: By regulating the flow, we reduce the chance of data loss due to buffer overflow at the receiver.
Ensure Smooth Communication: Flow control helps maintain a smooth and efficient communication channel between devices.
1.3. Techniques
Here are some common flow control mechanisms:
Stop-and-Wait Protocol: After sending each message, the sender waits for an acknowledgment (ACK) from the receiver before sending the next one.
Sliding Window Protocol: This allows the sender to send multiple frames before needing an acknowledgment. The number of unacknowledged frames is controlled by the window size.
2. Understanding Congestion Control
2.1. Definition
Congestion control refers to mechanisms that ensure the network can handle the amount of data being transmitted without overwhelming its capacity, which can lead to packet loss, delays, and inefficient communication.
2.2. Importance
Network Efficiency: Prevents bottlenecks and ensures optimal utilization of network resources.
Quality of Service: Helps maintain the performance level of applications relying on the network, especially in real-time communications like VoIP and video streaming.
2.3. Congestion Control Strategies
Congestion control strategies can generally be divided into two categories: preventive and reactive.
Preventive Control:
Reactive Control:
3. Flow Control vs. Congestion Control
While flow control focuses on the sender-receiver relationship to ensure smooth data transmission, congestion control addresses global network conditions that affect all users. Both controls operate at different layers of the OSI model:
4. Challenges in Flow and Congestion Control
Thank You