Title: TCP
1TCP
- Jean Walrand
- U.C. Berkeley
- www.eecs.berkeley.edu/wlr
2Outline
- TCP Service
- State Diagram
- Flow Control
- Congestion Control
- RTT Estimation
- Fast Recovery
- Fast Retransmit
3TCP Service
Reliable byte stream
TCP
IP
Unreliable packet delivery
Actual data path
4TCP Service (cd)
A B p1 p2
5State Diagram
6State Diagram (cd)
7State Diagram (cd)
8Flow Control
- Objective Avoid saturating receiver
- Mechanism Receiver advertises window Wrec
W ? Wrec Outstanding where Oustanding Last
sent last Acked
9Congestion Control
- Objective Avoid saturating routers
- Mechanism Loss gt Reduce W No loss gt Increase
W - Details See book.
10Congestion Control (cd)
11Congestion Control (cd)
12Congestion Control (cd)
- Congestion Avoidance ACK gt W W 1/W
13Congestion Control (cd)
- Congestion Avoidance ACK gt W W 1/W
14RTT Estimation
- Timeout if delay gt average 4 deviations
- Average delay and deviation first order filters
Average A(n) calculated when n-th ACK arrives
A(n) a?A(n 1) (1 a)?Delay(n)
Deviation D(n) calculated when n-th ACK arrives
D(n) a?D(n 1) (1 a)?Delay(n) A(n)
Note - Obvious corrections when retransmission
Do not include delays of retransmitted packets
Double timeout after retransmission
15Fast Retransmission
- When 3 duplicated ACKs, retransmit and W W/2
- Motivation 3 dup to avoid retransmission after
misordering
16Fast Recovery
- Objective Keep buffer full after setting W
W/2 - Illustration Window goes from 2K to K
L, L 2K 1, , L 4
L 2K, L, L 2K 1, , L 4 gt W 2K 1
L 2K 1, L 2K, L, L 2K 1, , L 5 gt W
2K 2
. . . . . . . . .
L 3K - 2,, L 2K 1, L 2K, L gt W 3K - 1
L 3K - 1,, L 2K 1, L 2K gt W K