Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Flow Control and Congestion Control in TCP?

What's the difference between flow control and congestion control in TCP?

This question can be broken down into two parts:

  1. What is the overall purpose of flow and congestion control?
  2. How is the task accomplished?

According to Wikipedia, TCP flow control relies on the window size reported in an ACK message. Congestion control also relies on acknowledgement messages. I would like to know what the difference is between the two goals, and how they work.

like image 750
GM Lucid Avatar asked May 09 '13 23:05

GM Lucid


People also ask

What is TCP flow control?

TCP Flow Control is a protocol designed to manage the data flow between the user and the server. It ensures that there is a specific bandwidth for sending and receiving data so the data can be processed without facing any major issues.

What is congestion and congestion control in TCP?

TCP uses a congestion window in the sender side to do congestion avoidance. The congestion window indicates the maximum amount of data that can be sent out on a connection without being acknowledged. TCP detects congestion when it fails to receive an acknowledgement for a packet within the estimated timeout.

What is the difference between congestion control and flow control quizlet?

is that the flow control is a mechanism that controls the traffic between sender and receiver. On the other hand, the congestion control mechanism controls the traffic that is placed by the transport layer into the network.

Are the objectives of flow control and congestion control the same?

Flow control prevents the receiver at the slower end from being overloaded with the data transmitted by the sender at the faster end whereas, the congestion control mechanism prevents the network from being congested with the data transmitted by the transport layer.


1 Answers

As to part 1, super general overview:

Flow control is controlled by the receiving side. It ensures that the sender only sends what the receiver can handle. Think of a situation where someone with a fast fiber connection might be sending to someone on dialup or something similar. The sender would have the ability to send packets very quickly, but that would be useless to the receiver on dialup, so they would need a way to throttle what the sending side can send. Flow control deals with the mechanisms available to ensure that this communication goes smoothly.

Congestion control is a method of ensuring that everyone across a network has a "fair" amount of access to network resources, at any given time. In a mixed-network environment, everyone needs to be able to assume the same general level of performance. A common scenario to help understand this is an office LAN. You have a number of LAN segments in an office all doing their thing within the LAN, but then they may all need to go out over a WAN link that is slower than the constituent LAN segments. Picture having 100mb connections within the LAN that ultimately go out through a 5mb WAN link. Some kind of congestion control would need to be in place there to ensure there are no issues across the greater network.

As to part 2:

If this is an interview-prep question, as you said above, I would consider taking some time to read up on TCP/IP in general. Don't use Wikipedia. RTFM! This is VERY much worth your time. You could argue that this is the most important protocol holding up most of the modern internet.

Things to read about for Flow Control: stop and wait, sliding window, PAUSE frames.

Things to read about for Congestion Control: QoS (Quality-of-Service), retransmission policies, windowing policies.

Beyond that, you can search for any particular vendor implementations (Cisco, etc..)

like image 193
JP Doherty Avatar answered Sep 26 '22 19:09

JP Doherty