Download Congestion and ECN - Internetwork Programming | ECE 4110 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!
ECE 4110
Congestion & ECN
Stevens, Chapter 21.1 – 21.
RTT estimate
• RTT
new
= (a)RTT
old
+ (1-a)RTT
pkt
• Enhanced scheme, Van Jacobson, 1988• Uses “enhanced measurement”
– Accounts for
average
plus
variance
• RTT
pkt
often measured at 500ms precision
Slow Start
• Recall: Slow Start
– Uses congestion window (CWND)
- Measured in bytes, • Incremented in segment size (MSS)
– CWND initialized to one MSS
- Grows by MSS for each packet that is received and
acknowledged before RTO
– Attempting to approximate:
Indication of Lost packet
CONGESTION
• Note that not every successfully sent packet
is ack’d^ – If 4 packets sent (ie, CWND >= 4 MSS), and
they are all received, then the receiver mayacknowledge only the last packet.
• Therefore, packet is lost if:
– 1) RTO timeout occurs (this could be a lost ack
also, but is treated as lost packet)
– 2) A duplicate ack (previously sent packet) is
received
Fast Retransmit & Fast Recovery
-^
More modifications (proposed 1990, VJ), “duplicate acks”^ –
Indicates a packet was lost but later packets arrived (CWND >>MSS) ,OR packets were reordered along the way
-^
Receiver must “ack” immediately for incorrect packet (cannot delay)
-^
If three or more “duplicate” acks received:^ –
“Mild” congestion, one packet was lost, others flowing …
-^
Don’t overreact:
- Set SSTHRESH = ½ CWND • Retransmit the missing packet • Set CWND = SSTHRESH + 3 segments
- Add one segment to CWND for any more duplicate acks
- On next non-duplicate ack, set CWND = SSTHRESH from above
- Continue with normal CWND>SSTHRESH congestion avoidance
Network Implications: Fairness
• In Internet backbone:,
– congestion occurs when a large number of hosts
exceed the link capacity.
- Verses finding “modem speed” in a single user
perspective
– Each active sender dynamically seeks to
achieve the same level of packet loss
– More loss -> slower throughput – Less loss -> faster throughput
Explicit Congestion Notification
•^
RFC 3168 (Sept 2001):
http://www.ietf.org/rfc/rfc3168.txt
- Instead of dropping a packet, set a “congestion” bit in
the packet header
- Negotiate ECN capable sender/receiver
IP
header (NOT TCP header)
- Set bit pair to 10 or 01 to indication ECN capable – Leave at 00 for not ecn capable
- Queues set congestion bit pair to 11 when consistently near
full
- This is a notification to the receiver that the sender-> receiver
link was full
- Receiver sets new bit from RESERVED field in TCP header
(receiver tells sender) called ECN-Echo (ECE)
Sender reacts to ECE bit in ack packet as if a packet was lost (congestion avoidance),
without resending
- Sender replies with TCP RESERVED field CWR bit to let
receiver know that it is responding to congestion
Comments:
•^
Many things can change:^ – Sender doesn’t have to “retransmit” identical packets
(ie, it may group data into larger packet)
- TCP “Sender” and “Receiver” are intermediate
processing. TCP does not generate or use data.Applications can generate/use data in sporadic ways.TCP must accommodate …
- TCP does not normally “monitor” the connection, ie,
and idle connection sends no packets.