TCP - Frame Format, Error Control and Flow Control
TCP - Frame Format, Error Control and Flow Control
Process-to-Process Delivery:
23.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23-3 TCP
send data. In addition, TCP uses flow and error control mechanisms at the transport level.
TCP Services
TCP Features
Segment
A TCP Connection
Flow Control
Error Control
23.2
Table 23.2 Well-known ports used by TCP
23.3
Figure 23.13 Stream delivery
23.4
Figure 23.14 Sending and receiving buffers
23.5
Figure 23.15 TCP segments
23.6
Note
by TCP.
23.7
Example 23.3
23.8
Note
23.9
Note
23.10
Figure 23.16 TCP segment format
23.11
Figure 23.17 Control field
23.12
Table 23.3 Description of flags in the control field
23.13
Figure 23.18 Connection establishment using three-way handshaking
23.14
Note
number.
23.15
Note
sequence number.
23.16
Note
23.17
Figure 23.19 Data transfer
23.18
Figure 23.20 Connection termination using three-way handshaking
23.19
Note
23.20
Note
23.21
Figure 23.21 Half-close
23.22
Figure 23.22 Sliding window
23.23
Note
as
to control the flow of data so that the destination does not become
23.24
Example 23.4
What is the value of the receiver window (rwnd) for host A if the receiver, host B, has a buffer size
Solution
The value of rwnd = 5000 − 1000 = 4000. Host B can receive only 4000 bytes of data before
overflowing its buffer. Host B advertises this value in its next segment to A.
23.25
Example 23.5
What is the size of the window for host A if the value of rwnd is 3000 bytes and the value of cwnd is
3500 bytes?
Solution
The size of the window is the smaller of rwnd and cwnd, which is 3000 bytes.
23.26
Example 23.6
Figure 23.23 shows an unrealistic example of a sliding window. The sender has sent bytes up to
202. We assume that cwnd is 20 (in reality this value is thousands of bytes). The receiver has sent
an acknowledgment number of 200 with an rwnd of 9 bytes (in reality this value is thousands of
bytes). The size of the sender window is the minimum of rwnd and cwnd, or 9 bytes. Bytes 200 to
202 are sent, but not acknowledged. Bytes 203 to 208 can be sent without worrying about
23.27
Figure 23.23 Example 23.6
23.28
Note
cwnd.
worth of data.
window.
acknowledged.
23.30
Note
arrived.
23.31
Note
23.32
Note
receiving TCP,
process.
23.33
Figure 23.24 Normal operation
23.34
Figure 23.25 Lost segment
23.35
Note
23.36
Figure 23.26 Fast retransmission
23.37