ITT420 - Chapter 7 TCP
ITT420 - Chapter 7 TCP
(TCP)
ITT420
Network & System Administration
The bytes of data being transferred in each connection are numbered by TCP.
The numbering starts with a randomly generated number.
TCP Features
Numbering System
Sequence Number
After the bytes have been numbered, TCP assigns a sequence number
to each segment that is being sent
The sequence number for each segment is the number of the first
byte carried in that segment
Example
Suppose a TCP connection is transferring a file of 5000 bytes. The
first byte is numbered 10001. What are the sequence numbers for each
segment if data is sent in five segments, each carrying 1000 bytes?
A SYN segment cannot carry data, but it consumes one sequence number.
TCP Connection
Steps for 3-way handshaking (cont)
The server sends the second segment, a SYN + ACK segment
with 2 flag bits set – SYN and ACK
The server needs to define the receiver window size
Start cwnd = 1
After 1 RTT cwnd = 1+1=2
After 2 RTT cwnd = 2+1=3
After 3 RTT cwnd = 3+1=4
Congestion Control
Congestion Control
Congestion avoidance
When the limit of the slow start is reached, the additive phase
starts
Each time a window of segments is acknowledged, the size of
the congestion window is increased by one
Congestion Control
Congestion Detection
Multiplicative decrease
When congestion occurs, the congestion window size must be
decrease
The size of the threshold (limit) is dropped to half
If detection is by time-out, a new slow start phase starts
If detection is by three ACKs, a new congestion avoidance
phase starts