7.6. FLOW CONTROL 97
W
1
64KB
X0.5
TO
3DA
X0.5
3DA
TO
X0.5
X0.5
SS CA
SS
CA
3
3
Figure 7.10: Evolution in time of the TCP window.
7.6 FLOW CONTROL
Congestion control is the mechanism to prevent saturating routers. Another mechanism, called flow
control, prevents saturating the destination of an information flow and operates as follows in TCP.
The end host of a TCP connection sets aside some buffer space to store the packets it receives until
the application reads them. When it sends a TCP packet, that host indicates the amount of free
buffer space it currently has for that TCP connection. This quantity is called the Receiver Advertised
Window (RAW). The sender of that connection then calculates RAW OUT where OUT is the
number of bytes that it has sent to the destination but for which it has not received an ACK. That
is, OUT is the number of outstanding bytes in transit from the sender to the receiver. The quantity
RAW OUT is the number of bytes that the sender can safely send to the receiver without risking
to overflow the receiver buffer.
The sender then calculates the minimum of RAW OUT and its current congestion window
and uses that minimum to determine the packets itcan transmit.This adjustment of theTCP window
combines congestion control and flow control.
7.7 SUMMARY
The Transport Layer is a set of end-to-end protocols that supervise the delivery of packets.
The transport layer offers two services: reliable byte stream (with TCP) and unreliable packet
delivery (with UDP) between ports.
A TCP connection goes through the following phases: Open (with a three-way handshake:
SYN, SYN.ACK, then ACK and start); Data exchange (with data and acks); half-close (with
FIN and FIN.ACK); then a second half-close (with FIN, timed wait, and FIN.ACK).

Get Communication Networks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.