21 Congestion Avoidance 22-03-2024
21 Congestion Avoidance 22-03-2024
21 Congestion Avoidance 22-03-2024
• Discard policy: prevent congestion and at the same time may not harm the integrity
of the transmission
• Admission policy: Switch first check the resource requirement of a flow before
admitting it to the network
• FIFO queuing
• Many variations
• With cute names like “Blue” and “FRED”…
Random Early Detection (RED)
• Notification is implicit
• just drop the packet (TCP will timeout)
• could make explicit by marking the packet
• Early random drop
• rather than wait for queue to become full, drop each arriving packet with
some drop probability whenever the queue length exceeds some drop level
RED Details
• Compute average queue length
AvgLen = (1 - Weight) * AvgLen +
Weight * SampleLen
0 < Weight < 1 (usually 0.002)
SampleLen is queue length each time a packet arrives
MaxThreshold MinThreshold
AvgLen
RED Details (cont
)
• Two queue length thresholds
P(drop)
1.0
MaxP
AvgLen
MinThresh MaxThresh
Explicit Congestion Notification
How?
Through IP and TCP headers
TCP treats ECN signals exactly the same as when a single dropped packet is
detected – but packets are not actually dropped
ECN bits in IP head
er
Differentiated Services Codepoints Reserved
ECN
6 bits 22 bits
bit
s
Data
ECN bits in IP header (cont’
d)
ECN Field
ECT: ECN
ECT CE Capable Transport
CE: Congestion
2 bits = 4 ECN Experienced
Codepoints
ECT CE Names for the ECN bits
0 0 Not-ECT (Not ECN Capable Transport)
1 1 CE (Congestion Experienced)
ECN bits in TCP head
er
Reserved 4 C
Reserved
E U A P R S F
W CR K C S S Y I
bits6 bits R E H T N N
G
Data
Advantages of ECN
Prevents unnecessary packet drops at routers less retransmissions
• improvement in the “GOODPUT”
Avoids timeouts by getting faster notification to end hosts
Less time to identify congestion
Non-ECN flows infer congestion from 3 duplicate ACKs or even worse from timeouts as opposed
to ECN flows that get congestion notification in the first ACK
Fewer retransmissions also means less traffic on the network
REFERENCES