Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a difference between flow control and congestion control at the following layers?

  1. layer 2(data link layer)
  2. layer 3(network layer)

If they are not same, then how is each handled at the following layers?

  1. layer 2(data link layer)
  2. layer 3(network layer)
share|improve this question

closed as not a real question by Greg Askew, EEAA, Ward, mgorven, Scott Pack Jun 11 '12 at 23:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Flow control in the generic sense refers to mechanisms that allow for the increase or decrease of traffic across a given data link by a transmitter based on some kind of signal (implicit or explicit) captured from the receiver.

Back in the days when serial communication was more common we used hardware flow control (RTS / CTS) to allow the endpoints on the serial link to signal when they were- or were not- capable of receiving data. A DCE (a modem, for example) might have buffers that could be overrun by the sending station. When this device passed a certain threshold of buffering, it would lower the appropriate signal line and the sending station would respond by pausing its data transfer until the DCE indicated that the immediate congestion issue had cleared. A similar mechanism was also implemented in-band (i.e. as part of the data being transmitted) known as XON/XOFF - same ideas as RTS/CTS but implemented as special control characters rather than dedicated hardware lines.

More recently (~15 years ago, or so) similar mechanisms were introduced in Ethernet in the IEEE 802.3x standard. This introduced a so-called "pause" frame. As in the serial case, a given receiver can emit such a frame when it is unable to accept more traffic. This is a MAC-layer mechanism (i.e. layer 2) which is has been implemented in a fair number of devices but whose actual usage and deployment has been quite limited. The issue with 802.3x is that when a PAUSE frame is issued then all traffic is held, regardless of the importance of said traffic. More recently there have been newer standards (collectively known as DCB) that allow for more fine-grained controls (i.e. pausing traffic on a per CoS basis) as well as complimentary facilities to define different classes of traffic and how they map to these CoS values. Other examples of extensions to L2 networking for active flow control include buffer credits in Fibre Channel and the feedback mechanisms found in ATM ABR.

True flow control isn't really applicable at layer 3, which is largely concerned with reachability and addressing. There are mechanisms at layer 4, however - notably TCP windowing - which allow senders to throttle back transmission based on network conditions. The operation and caveats of TCP windowing deserve their own question/post as there's a huge amount of literature on the subject. Another mechanism that has been specified but not extensively implemented/used for TCP is ECN (explicit congestion notification) which potentially allows a more proactive approach to throttling transmitter bandwidth (vs relying on packet drops for TCP windowing).

In addition to strict flow control there are also mechanisms to shape, selectively drop and police traffic on a per-sender basis (i.e. L2 / L3 and some L4 QoS mechanisms) but these aren't precisely flow control, at least in the usual definition of the term.

share|improve this answer
Thanks for your exhaustive reply Mxrx. I got an idea of flow control at layer 2 and layer 3. But am still not quite clear about congestion control. – gsinha Jun 11 '12 at 15:32
@rnxrx ECN is in both layer 3 in the IP header, AND layer 4 in the TCP header. You answer gives me the impression it only exists at layer 4. – jwbensley Aug 16 '13 at 14:30
@gsinha The wiki pages on congestion control are pretty clear, see and Congestion avoidance is avoiding a breakdown of communication, flow control is something that is typically used when a link is saturated and everything has gone wrong :) Although flow control (priority based flow control) in Data Centre Bridging is a little different, offering more flexibility at layer 2. – jwbensley Aug 16 '13 at 14:33

I think you should be more specific about what do you mean about Flow Control and Congestion Control.

However layer 2 deal with Frames and mac addresses and Layer 3 with packet and ip addresses.

For example routing algorithms (OSPF, EIGRP, BGP, RIP) are layer 3 "flow control" mechanism, Spanning Tree or flexlinks etc instead are layer 2 "flow control" mechanism.

Again with more specific information about what do you mean with "flow control" i can be more accurate and more specific.

Hope you'll find this post useful Cheers

share|improve this answer
Flow control is a very specific set of mechanisms for actually throttling back (or increasing) the volume of traffic on a given link. The examples given (routing protocols, STP, flexlink) are mechanisms for discovering and mapping reachability in networks and, in themselves, do not dictate any kind of control of the actual volume of traffic on a given link. – rnxrx Jun 10 '12 at 17:10
Okey maybe i've understood the question now... i thought he was reffering to network wide mechanisms/protocols not to single host protocol... TCP Windowing is a flow control i'm getting it right now? – eldblz Jun 10 '12 at 22:05
Yes - TCP windowing is a flow control mechanism. – rnxrx Jun 10 '12 at 22:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.