TechKnowSurge
Cisco CCNA 1.5 CompTIA Network+ 1.4 CompTIA A+ Core 1 2.1 Cisco CCST Networking 1.5 Cisco CyberOps Associate 4.8
VideoNetworkFree

Congestion & Flow Control

TCP's congestion and flow control mechanisms regulate how data moves across a network, preventing bottlenecks and packet loss by using acknowledgements and dynamic window sizing. These built-in features allow two devices to communicate at optimized speeds without overwhelming either side of the connection.

Complete this video to capture a CTF flag worth 1 point.

About this video

TCP manages network performance through two closely related mechanisms: congestion control and flow control. Congestion control addresses conditions on the network itself, where excessive traffic can reach a tipping point — much like rush hour traffic — after which adding more data makes the problem significantly worse rather than better. Without any control mechanism, a sender would push data as fast as possible, causing packets to queue up, get dropped, and trigger retransmissions that further burden an already strained network. Acknowledgements form the first line of defense against this kind of congestion. By requiring the sender to pause periodically and wait for confirmation that data was received, acknowledgements naturally pace the flow of traffic and prevent any single path from being flooded. The receiving device uses these acknowledgement messages not only to confirm receipt but also to signal how much additional data it is ready to accept, using the window size field in the TCP header. Window size, the core of TCP flow control, allows a receiving device to advertise its current buffer capacity to the sender. If the receiver is processing data efficiently, it advertises a larger window, allowing more data to be sent before the next acknowledgement is required. If it begins to fall behind, it advertises a smaller window, effectively throttling the sender. In extreme cases where the window size advertised becomes so small that meaningful communication is impractical, the condition is known as silly window syndrome. This dynamic negotiation between sender and receiver allows TCP connections to sustain optimized throughput under normal conditions while gracefully degrading and recovering as network or device capacity fluctuates.

What you'll learn

What's covered

TCP Congestion & Flow Control

Aligned to

Cisco CCNA
1.5 Compare TCP to UDP
CompTIA Network+
1.4 Explain common networking ports, protocols, services, and traffic types
CompTIA A+ Core 1
2.1 Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ports, protocols, and their purposes
Cisco CCST Networking
1.5 Describe common network applications and protocols
Cisco CyberOps Associate
4.8 Interpret the fields in protocol headers as related to intrusion analysis

Key terms

Transmission Control Protocol
TCP
A connection-oriented transport protocol that ensures reliable, ordered, and error-checked delivery of data.
Acknowledgement
ACK
A signal sent by a receiving device to confirm that a segment has been received, and to indicate the next expected sequence number.
Congestion Control
A TCP mechanism that adjusts the rate of data transmission in response to network congestion to prevent packet loss and degradation.
Flow Control
A protocol function that manages the rate of data transmission between devices to prevent overwhelming the receiver.
Window Size
A TCP header field that specifies how many bytes the receiver is willing to accept at one time, enabling flow control between devices.
Windowing
A flow control technique in TCP that controls how much data can be sent before an acknowledgement is required from the receiver.

Transcript

TCP is pretty cool with the different mechanisms that it uses to keep track of all this sequencing and acknowledgements. But there's also another aspect of this that's really cool, and that's congestion and flow control.

This is not meant to be a real in-depth look at congestion and flow control. There's actually a lot to this and a lot of routes that we could go down and explain, but this is a fundamentals course, so we're going to look at the top-layer view of this. We're going to take a look at congestion control and some mechanisms for it, and same thing with flow control, something called windowing. We'll look at these aspects of TCP and how it deals with things like congestion, when buffers get full, and when there are problems that happen on the network and on the machines.

Congestion control

TCP has some great things in it that can help make communication happen very efficiently and make sure that things are streaming at optimized levels. There are times when there's a lot of traffic that can go through, and you can pump that traffic through, and other times when there's congestion on the network, or other problems, where if you were to just shove more traffic down there it would cause worse problems. It's similar to rush hour traffic, where traffic could be flowing pretty well, pretty smoothly, until something happens, or there are extra cars that get added to it, and at some point in time there's a tipping point. Once it hits that tipping point, it's really hard to recover from that, especially if more and more cars are getting onto the freeways. It's the same thing with network traffic: it can flow really well and smoothly, but if it hits a certain point where it's just over-congested, and then there's other stuff being crammed down this pipeline, that can cause problems.

So TCP has a mechanism to help back things off to help control that. In this example, without congestion control, this PC would be sending data to this server, and it would just try to stream as fast as it could, and if this device is too slow, then those packets are going to get stacked up, and it's going to start losing packets, and then there's going to be resending, and that resending is going to cause more traffic and just compound the issue.

There are several things within TCP that can help mitigate this. For one, just acknowledgements. Acknowledgements will help alleviate this problem, because you wouldn't have all of this information getting bogged down if every few segments, or every so many segments, an acknowledgement is sent back. What the acknowledgements do is, as it's sending data over, it will pause and wait for an acknowledgement, and that acknowledgement will say go ahead and send more, or retransmit this data. So acknowledgements really help start shaping this traffic to make sure that we're not getting too much data on any one of these lines.

Flow control and windowing

When we took a look at the TCP header, we also saw this window size. The window size is another mechanism that can help communicate between two devices to say, "Slow down, I need a little less data." Certain devices can send information into this windowing field to let the other side know how much data they're willing to accept. In this example, let's say this device has a certain amount of capacity to process data. If you overwhelm this resource, then it's going to slow down even more, so we don't want to overwhelm these resources. That windowing field has a capability: when it sends an acknowledgement, it will tell the other PC how much this device, this web server, is willing to handle, how much this PC can send during any given time. Then this device will try to fill that up. It will send data to try to maximize that speed, and then every once in a while this machine will send an acknowledgement to acknowledge, yes, I've received this data, and this is the next set of data that I'm willing to accept, that I can handle, that you can send my way.

Now, if it's getting overwhelmed, then those window sizes become pretty small. And if it becomes unresponsive, then possibly this machine will check into this machine and just send, hey, are you still accepting? Are you ready for more information? So this communication can still happen. TCP has that mechanism to allow this communication to happen and allow things to slow down until the time is right to send more data.

Silly window syndrome

Of course, I have to put this in here about silly window syndrome. The silly window syndrome is when this web server continues to broadcast window sizes that are really small, so small that at that point in time it's pretty ridiculous to even try to communicate with it, because those window sizes are so small. I don't know that you need to know too much about that, except that it's kind of a fun name and I thought I'd throw it in there just for fun.

So we talked a little bit about congestion control and how acknowledgements help the flow and stop congestion, just by the pauses that happen for those acknowledgements. We also talked about flow control and how we have some windowing that can happen, so a machine can tell the other side, hey, slow down, this is a little too much information, and it slows the process of sending.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →