All notes
Tcp

# Intro

TcpIPGuide. TCP is implemented as a Finite State Machine.

### Congestion window

• The congestion window is maintained by the sender. Not to be confused with the TCP window size which is maintained by the receiver.
• The congestion window is a means of stopping a link between the sender and the receiver from getting overloaded with too much traffic, and is calculated by estimating how much congestion there is between the two places.

#### Congestion window vs reveiver window

To give a short answer: the receive window is managed by the receiver, who sends out window sizes to the sender. The window sizes announce the number of bytes still free in the receiver buffer, i.e. the number of bytes the sender can still send without needing an acknowledgement from the receiver.

The congestion window is a sender imposed window that was implemented to avoid overrunning some routers in the middle of the network path. The sender, with each segment sent, increases the congestion window slightly, i.e. the sender will allow itself more outstanding sent data. But if the sender detects packet loss, it will cut the window in half. The rationale behind this is that the sender assumes that packet loss has occurred because of a buffer overflow somewhere (which is almost always true), so the sender wants to keep less data "in flight" to avoid further packet loss in the future.

For more, start here: http://en.wikipedia.org/wiki/Slow-start