This document discusses various TCP flavors and congestion control mechanisms. It begins with an overview of TCP functions like connection orientation, flow control, retransmission, and congestion control. It then covers retransmission mechanisms including timeout-based retransmission and fast retransmission. TCP congestion control mechanisms like slow start and additive increase multiplicative decrease are explained. The document summarizes TCP Tahoe, Reno, New Reno, Vegas, and Freeze flavors and how they implement congestion control algorithms. It provides state diagrams and examples to illustrate the differences between these TCP variants.
3. Main Function of TCP(recap)
• Connection –orientation mech
• Ensure presence of receiver before Tx
• Seq and ACK
• Ensure proper order of segments
• Flow control
• To handle the slow receiver pbm
• Retransmission control
• Take care of lost or error packets
• Congestion control
• Take care of network bottlenecks
4. Retransmission Mechanism (recap)
Lack of ack is an indication that the packet is lost and
retransmission is required.
Retransmission Mechanism
• Time out based retransmission
• Fast retransmission
5. Timeout
• Packet is retransmitted if ack is not received within Timeout
• In TCP timeout is a function of RTT.
• How RTT is calculated ?
• Measure sample_RTT for each seg- ack pair
• Compute weighted average of RTT(Est_RTT)
Est_RTT = a Est_RTT + b sample_RTT
a + b=1
• Set timeout= 2 X Est_RTT
6. Fast Retransmission
• If packet n is lost but packet n+1,n+2,n+3 ……… reached
the destination, the receiver will keep on sending ack
indicating that nth packet is awaited
• nth packet is lost
• All packets after nth packets were received
• In Fast Retransmission, only the nth packet is
retransmitted before timeout
IN TCP SENDER RETRANSMIT DATA AFTER 3 DUP ACK
7. TCP Congestion Control
TCP requires to have some mech of congestion control
TCP assumes that if there is an ACK loss then it is due to congestion
TCP starts taking steps for congestion control
TCP starts taking steps for congestion control
9. Slow Start
Idea
• Start with congestion window = 1
packet
• Double congestion window each RTT
• Till reaching ss_th or packet loss
10. AIMD
• TCP maintain a congestion window for each connection
• Congestion window is used to limit how much data can be
transmitted to prevent congestion
Algo –
• Inc cwnd by one packet per RTT (Linear Inc)
• Divide cwnd by 2 whenever a timeout occurs (Multiplicative dec)
11. Fast Recovery
This tech possible to quickly recover lost data
packets
Idea
• After receiving 3 duplicate ACKs in a row:
. Set ss_thresh to one-half of the current
congestion window.
. Retransmit the missing segment.
. set cwnd = ss_thresh + 3.
. Each time another duplicate ACK arrives, set
cwnd = cwnd + 1.
. Once receive a new ACK, exit fast
recovery. Set cwnd to ssthresh. Then,
continue with linear increasing.
19. TCP RENO
Slow start + Additive Inc + Fast
transmission + Fast Recovery
Idea: In case of Dup Ack , 3 Dup Ack
indicates the network capability of
delivering seg so . Cwnd is cut to half (
instead of 1 as in Tahoe) and then it
increase linearly
20. Congestion avoidance
Fast Retransmission
Start
cwnd = cwnd +1/cwnd
cwnd = cwnd +1
Slow Start
ACK DATA
Dup ack >=3
Dup ack >=3
Fast Recovery
cwnd >= ss_th
Send missing packet
ss_th= cwnd/2
cwnd =ss_th
cwnd = cwnd +1
ACK DATA
cwnd = ss_th
Non dup
ack> x
cwnd = cwnd +1
cwnd = 1
All ack
Retransmission timeout
TCP Reno
21. Cwnd = 8
Sender Receiver
1.
Cwnd = 8
2.
Cwnd = 11
3.
Cwnd = 4
4.
Comments
31
32
33
34
35
36
37
38
Sender sent segment 31 - 38
30
30
30
30
30
31
30
30
Receiver replied seven duplicate ACKs
of segment 30
Sender received three dupacks and
cwnd is changed to (8/2)+3 packets.
The lost segment 31 is retransmitted
39
32
Receiver replied the ACK of 38 when
it received the retransmitted packet
31.
32
Pkts 31 get
lost
07 Dupacks
On 3 DuPacks
Retx 31
Send 3 new pkts Ack 38 for re tx
Back to ai cwnd =4
Sender exist fast retx cwnd=4
25. Multiple Packet loss problem
Cwnd = 8
Sender Receiver
1.
Cwnd = 8
2.
Cwnd = 7
3.
Cwnd = 9
4.
Comments
31
32
33
34
35
36
37
38
Sender sent segment 31 - 38
30
30
30
30
30
31
30
30
Receiver replied five duplicate ACKs
of segment 30
Sender received three dupacks and
cwnd is changed to (8/2)+3 packets.
The lost segment 31 is retransmitted
39
32
Receiver replied the ACK of packet 32
when it received the retransmitted
packet 31. This is Partial ACK
32
Pkts 31, 33 &
34 lost
05 Dupacks
On 3 DuPacks
Retx 31
Partial ACK
26. Multiple Packet loss problem
Sender Receiver
5. Cwnd = 4
Cwnd = 4
6.
Comments
Sender exits from Fast Recovery and
entered the congestion avoidance
state after receiving the Partial ACK.
Cwnd is changed to 4 MSS
Sender waited until timeout
32
Exit FastRecovery
Cwnd = 4
Sender Timeout
27. Limitation of Reno
• Multiple Packet Loss
• Partial ack will be received when first packet is retransmitted
• Ack causes moving out of Fast Recovery state
• Cwnd halved – wait for timeout
• Affects Reno performance
• Solution : TCP New Reno
• Extend fast recovery Phase – Do not exit Fast recovery Phase after getting Partial
acknowledgement
• Alternate Solution
• TCP SACK : Explicitly ACK lost segments
• TCP Vegas : Using RTT to Signal Congestion
28. TCP NewReno
Cwnd = 8
Sender Receiver
1.
Cwnd = 8
2.
Cwnd = 7
3.
Cwnd = 9
4.
Comments
31
32
33
34
35
36
37
38
Sender sent segment 31 - 38
30
30
30
30
30
31
30
30
Receiver replied five duplicate ACKs
of segment 30
Sender received three dupacks and
cwnd is changed to (8/2)+3 packets.
The lost segment 31 is retransmitted
39
32
Receiver replied the ACK of packet 32
when it received the retransmitted
packet 31. This is Partial ACK
32
Pkts 31, 33 &
34 lost
05 Dupacks
On 3 DuPacks
Retx 31
Partial ACK
29. TCP NewReno
Cwnd = 8
Sender Receiver
5.
Cwnd = 9
6.
Cwnd = 9
7.
Cwnd = 10
8.
Comments
33
40
Sender receives the partial Ack of pkt 32
and immediately retransmitted the lost
segment 33. Cwnd is changed to 9-2+1
33
33
41
33
Sender receivesed a DupAck and added
Cwnd by 1, thus segment 41 is kicked
out. Receiver replied a partial ACK and
a duplicate ACK of pkt 33
The partial ACK triggered the sender
Re-Tx pkt 34. Receiver replied an ACK
of pkt 33 upon receiving segment 34
34
ReTX 33
Tx 40
32
32
34
33
Cwnd ++
Tx 41
Partial +
Duplicate ACK 33
ReTx 34
42
43
33
Cwnd ++
Tx 42,43
Upon receiving the duplicate ACK of pkt
33, Cwnd was advanced by 1. Two new
pkts were also sent.
(since Awnd < Cwnd)
30. TCP NewReno
Cwnd = 11
Sender Receiver
9.
Cwnd = 11
10.
Cwnd = 4
11.
Comments
34
42
43
On receiving the duplicate ACK of pkt
33, Cwnd was advanced by 1 and thus
pkt 44 was Triggered out
43
42
41 44
Receiver replied ACKs of Pkt 30, 42,
43 & 44
Sender Exited Fast recovery upon
receiving the ACK pkt 40.
Cwnd = 4
44
43 44
42
32. TCP : VEGAS
• Totally different approach
• Emphasizes pkt delay, rather than packet loss, as a signal to help determine
the rate at which to send packets
• Change in triggering Fast Retransmit
• On receiving first dupAck check the following:-
If((Current_time – Sending_time ) + MinRTT > Timeoutvalue)
Trigger Fast-Retransmit without 3 dupAcks
• Use of fine-grained RTT to improve congestion control
• Anticipate Congestion based on minimum RTT
33. TCP VEGAS – Anticipating Congestion Control
• Base RTT = Minimum RTT
• Expected sending rate & Actual sending rate
• Expected = Cwnd/BaseRTT
• Diff = Expected – Actual
• If Diff < a, Cwnd ++ per RTT
else if Diff > b, Cwnd --
(a and b are two thresholds that control utilization of bandwidth without overloading)
• Implementation with Runo ???
Performance of Vegas degrades because Vegas reduces its sending rate before Reno, as it
detects congestion early and hence gives greater bandwidth to co-existing TCP Reno flows
35. SNOOP TCP
• SNOOP Agent : TCP aware with limited powers
• SNOOP can buffer TCP Segments
• Upto certain numbers of lost ACKs are allowed
SH/FH SNOOP MH
Effective
Not much effective
Congestion Window will be controlled by mobile host in this case
37. TCP : FREEZE
• Involve MH as TCP receiver
• During handoff, ZWA is sent by MH to FH
• On reconnection FWA is sent by MH to FH
How MH will get to know that Handoff is initiated ?
When Antenna Signal strength is getting down and pkt loss
increases consequtively. It implies that handoff has been initiated
• On reconnection, FWA along with three Dupacks will be
forwarded by MH to BS as well. From three Dupacks BS will send
buffered data to MH
SH/FH BS MH
MH
ZWA
FWA