in-flight cwnd TCP ACK cwnd > 0 overcs.hac.ac.il/staff/martin/Networks_MSc/slide06.pdf · Protocols...
Transcript of in-flight cwnd TCP ACK cwnd > 0 overcs.hac.ac.il/staff/martin/Networks_MSc/slide06.pdf · Protocols...
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 1
TCPover
Wireless
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 2
Classic TCP-RenoIdeal operation
in-flight segments = cwnd (send cwnd without stopping)
Cumulative ACK for each 2 or 3 segments
cwnd > 0 for most time ⇒ near-continuous transmission
Finite buffers in routersCollision avoidance
cwnd ← cwnd + 1 until buffers fill ⇒ cwnd ← cwnd / 2
RouterBuffer
TCPBuffer
cwnd
time
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 3
RTT and Buffer ErrorsRound Trip Time
RTT = data transmit time + send buffer times+ ACK transmit time + ACK buffer times
Buffer time ~ typical service time × buffer levelRTT = random variable (rise / fall sharply)
Buffer time in TCPTimeout
Buffer level ⎯→ RTT > RTO (retransmit timeout)Packet considered lost
Out-of-order packetBuffer level ⎯→ RTT(packet k) > RTT(packet k+1)Receiver will send cumulative ACK if OOO packet not lost
Sender Receiver
SEQRTT
ACK
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 4
RTT and CongestionBuffer error condition
Buffer level ⎯→ RTT > RTO for time Terror
Isolated errorTerror < time between packetsBuffer empties before next packetNo need to lower transmission rate
CongestionTerror > time between packets Multiple buffer errorsLower transmission rate to prevent buffer errors
Sender Receiver
SEQRTT
ACK
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 5
Congestion ControlAverage transmission rate
R ↓ if cwnd ↓ or RTT ↑
Isolated buffer errorTerror < time between packets RTT ↑ ⇒ R ↓ for Terror
Buffer corrects itselfNo need to change cwnd
CongestionTerror > time between packetsRTT ↑ ⇒ R ↓Buffer still too fullSenders: cwnd ↓ ⇒ R ↓
= =packets sent cwnd
Rtime to ACK RTT
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 6
Classic TCP-Reno — No Congestion in Collision Avoidance
Sender Receiver
SEQ = 1000SEQ = 2000 in-flight = 2
SEQ = 3000SEQ = 4000
SEQ = 5000
SEQ = 6000
RouterBuffers
in-flight = 3
SEQ = 7000SEQ = 8000
SEQ = 9000
SEQ = 10000
ACK = 3000 cwnd = 3
ACK = 1000 cwnd = 2
ACK = 5000 cwnd = 4
in-flight = 3ACK = 7000 cwnd = 5
ACK = 9000 cwnd = 6 in-flight = 3
( )segment size bytesB/s
segment transmission time=
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 7
Error-Free Transmission
0
20
40
60
80
100
0 1 2 3
ACKSEQcwnd
Slow Start CollisionAvoidance
Latency = 2.77Utilization = 34.2%goodput = 34.2%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 8
Classic TCP-Reno — Steady State in Collision AvoidanceSelf-Clocking
in-flight ≈ cwnd
cwnd
time
new ACKs new segments←⎧ ⎫
⇒ ⇒⎨ ⎬←⎩ ⎭
in-flight in-flight - nn n+1
cwnw cwnd + 1
Sender Receiver
SEQ = 1000SEQ = 2000
in-flight = cwnd = 2 ACK
in-flight = cwnd = 3SEQ = 4000SEQ = 5000
ACK = 3000
RouterBuffers
ACK = 6000
SEQ = 3000
cwnd = 8
cwnd segment sizeB/s
RTT
Congestion RTT and cwnd B/s
×=
⇒ ⇒↑ ↓ ↓
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 9
Congestion ⎯→ Longer RTT
0
20
40
60
80
100
0 1 2 3 4
ACK (no congestion)SEQ (no congestion)cwnd (no congestion)ACKSEQcwnd
Latency = 3.70Latency (lossless) = 2.77Excess latency = 33.57%Utilization = 25.6%goodput = 25.6%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 10
Steady State
0
20
40
60
80
100
0 2 4 6
ACKSEQcwnd
Packet 9 lost3 dupACKs
Packet 29 lost3 dupACKs
Packet 49 lost3 dupACKs
Packet 69 lost3 dupACKs
Packet 89 lost3 dupACKs
Latency = 5.32Latency (lossless) = 2.77Excess latency = 92.06%Utilization = 20.8%goodput = 17.8%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 11
Classic TCP-Reno — 1 Lost Packet
cwnd
time
Sender Receiver
SEQ = 7000SEQ = 8000
in-flight = cwnd = 4
Resend 1 and Wait 1 RTT while
buffers empty
SEQ = 9000SEQ = 10000
SEQ = 7000
SEQ = 11000
RouterBuffers
ACK = 11000
cwnd = 2
SEQ = 12000SEQ = 13000
in-flight = cwnd = 3
X
ACK = 7000
dupACK = 7000dupACK = 7000dupACK = 7000
RTT and cwnd B/s⇒↑ ↓ ↓
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 12
1 Lost Packet
0
20
40
60
80
100
0 1 2 3 4 5
ACKSEQcwnd
Packet 37 lost3 dupACKs
Latency = 4.46Latency (lossless) = 2.77Excess latency = 61.01%Utilization = 26.0%goodput = 21.3%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 13
Classic TCP-Reno — Serious Congestion
cwnd
time
Sender Receiver
SEQ = 7000SEQ = 8000in-flight = cwnd = 4
resend 1
SEQ = 9000SEQ = 10000
SEQ = 7000
RouterBuffers
RTO
in-flight = cwnd = 1
XXXX
ACK = 7000
ACK = 7000
cwnd segment sizeB/s
RTT
Congestion RTT and cwnd B/s
×=
⇒ ⇒↑ ↓ ↓
No packets arrive ⇒ no dupACKs ⇒ timeout
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 14
0
20
40
60
80
100
0 2 4 6 8
ACKSEQcwnd
1 Lost Packet — Early
Packet 3 lostTimeout
Latency = 6.87Latency (lossless) = 2.77Excess latency = 148.01%Utilization = 14.0%goodput = 13.8%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 15
0
20
40
60
80
100
0 2 4 6 8
ACKSEQcwnd
Lost Packet + Lost Retransmit
Packet 7 lost3 dupACKs
Retransmit Packet 7
Retransmit losttimeout
Latency = 6.89Latency (lossless) = 2.77Excess latency = 148.74%Utilization = 14.1%goodput = 13.8%
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 16
Classic TCP-Reno — 1 Packet Error
Reno assumes lost packet ⇒ congestion Low packet error on wired Ethernet — BER ≈ 10-5
Moderate response Lose 1 RTT + time to recover cwnd
RouterBuffers
No congestionNetwork supports
large cwnd
Sender sees 3dupACKS
Lowers cwnd
Sender Receiver
SEQ = 7000SEQ = 8000
in-flight = cwnd = 4
SEQ = 9000SEQ = 10000
SEQ = 7000
SEQ = 11000
ACK = 11000
cwnd = 2
SEQ = 12000SEQ = 13000
in-flight = cwnd = 3
X
ACK = 7000
dupACK = 7000dupACK = 7000dupACK = 7000
RTT and cwnd B/s⇒↑ ↓ ↓
Resend 1 and Wait 1 RTT
cwnd
time
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 17
Classic TCP-Reno — Multiple Packet Errors
RouterBuffers
No congestionNetwork supports
large cwnd
Sender timeoutLowers cwnd
Sender Receiver
SEQ = 7000SEQ = 8000
in-flight = cwnd = 4
resend 1
SEQ = 9000SEQ = 10000
SEQ = 7000
RTO
in-flight = cwnd = 1
XXXX
ACK = 7000
ACK = 7000
cwnd segment sizeB/s
RTT
Errors RTT and cwnd B/s
×=
⇒ ⇒↑ ↓ ↓
Reno assumes multiple lost packets ⇒ serious congestion P(k consecutive packet errors on Ethernet) ≈ (10-5)k
Extreme response Lose RTO + time to recover cwnd in slow start
cwnd
time
No packets arrive ⇒ no dupACKs ⇒ timeout
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 18
The Trouble with Wireless — 1Variations in transmission medium
Multiple correlated packet losses + bit errors TCP interprets as serious congestion — timeouts + slow start
Fading channelsRefractionReflectionAbsorptionMultipath
EMI (electromagnetic interference)Other usersOther radio equipmentOther radiating equipment
absorption
reflection
refraction
medium
station
station
station
station
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 19
The Trouble with Wireless — 2Mobility drops
User moves between wireless domainsAdds delays + buffers + dupACKs + timeouts
MSC
RNC-1 RNC-2
1 2 3 4
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
Clusters
TCP response in cell 4TCP request in cell 1
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 20
The Trouble with Wireless — 3Link asymmetry
Upstream channel slower than downstream channelLarger buffer ⇒ longer buffer delay ⇒ lower average B/s
ACK compression
Base Mobile
ACKs delayed in upstream buffer RTT ↑ ⇒ B/s ↓
All ACKs arrive together
cwnd ↑ sharplySender floods forward
channel buffer
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 21
The Trouble with Wireless — 4MACA in WiFi
Required to prevent hidden node problem
MACA overheadRTS+CTS+ACKMAC time ≈ TCP ACK timeTCP WiFi ACK delay = 2 × wired TCP ACK delay ⇒ RTT ↑Timeouts ⇒ cwnd ↓
RTS
CTS
DATA
ACKMAC
A B C D
RTS CTS
E F
cwnd segment sizeB/s
RTT
RTT and cwnd B/s
×=
⇒↑ ↓ ↓Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 22
Typology of Approaches to Wireless TCPSplit mode
MS / BSS — specialized TCPBSS / server — standard TCPProposed in 1990s
End-to-endRefinements to TCP-Reno
Better handling of non-congestion packet lossExample — TCP → TCP-Tahoe → TCP-Reno
Infrastructure-awarenessUse IP and infrastructure layer information at TCP layerExample — ECN provides IP router information to TCP
Reactive congestion controlReact to congestion lossExample — Reno cuts cwnd after 3 dupACKs
Proactive congestion controlPredict available bandwidth from ACK rates
Mobile ReceiverBSS
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 23
Multiple Losses in RenoExample — 3 consecutive lost packets of 16
cwnd in-flight
16 16
26 6
13 6
14 5
14 14
7 14
13 14
14 13
14 14
1 14
15 0
X
3 dupACK = 26
26
ACK = 26
ACK = 27
32 – 40 3 dupACK = 27
27 ACK = 28
28Timeout on 28
cumACK = 42
6 more dupACK = 27
41 dupACK = 28
16 – 2526 – 2829 – 31
SEQ
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 24
New Reno — RFC 6582Maintain fast recovery until all in-flight ACKed
cwnd in-flight
16 16
26 6
13 6
14 5
14 4
15 0
15 15
16
16 – 25
26 – 28
29 – 31X
3 dupACK = 26
26
ACK = 26
ACK = 27
27
28
ACK = 28
cumACK = 31
45ACK = 46
Send next on partial
ACK of resend
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 25
TCP-NCL (Non-Congestive Loss)Heuristic
Timeout could be errorRetransmission timeout probably congestion
Enhancement to Reno Treat first timeout as errorTreat long timeout as congestion
Two timeoutsRetransmission Decision (RD)
Cancel on ACKRetransmit on timeout
Congestion Decision (CD)Cancel on ACKCongestion control on timeout
C. Lai, K. Leung, V.O.K. Li, “Enhancing Wireless TCP: A Serialized-Timer Approach”, IEEE INFOCOM, 2010.
Send PacketStart RD
RD
Resend PacketStart CD
Start CongestionControl
CD
Update RTT
ACK
ACK
timeout
timeout
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 26
TCP VegasStandard Reno slow start
cwnd = 1
cwnd ← cwnd + size of data ACKed
Base expectationexpected throughput = cwnd / RTTminDefine thresholds α, β
Enhanced Reno congestion avoidanceMeasure RTT for distinguished (special) segment of some sizeactual throughput = size of ACK received / RTT
diff = expected throughput – actual throughput
if (diff < α) then cwnd++ on each ACKif (diff > β) then cwnd-- on each ACK
dupACKsRetransmit on 1 dupACK if RTT > RTTVegas-timeout
L. Brakmo and L. Peterson, “TCP Vegas: End to End Congestion Avoidance on a Global Internet,” IEEE JSAC, vol. 13, no. 8, Oct. 1995, pp. 1465-80.
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 27
TCP — Modified Fast Retransmission (MFR)Reno
Transmit cwnd packetsPacket n lost → k dupACKs → retransmit on k ≥ 3 dupACKs Wait for ACK of n ⇒ no dupACKs if retransmit lost ⇒ timeout
Enhancement to Reno fast retransmitk dupACKs ⇒ k packets arrived
k dupACKs + 1 lost packet = k+1 packets accounted cwnd – (k+1) unaccounted
If (k > 3) cwnd = cwnd + (k – 3) → send more packetsCumulative ACK ⇒ retransmitted packet + more arrivedIf (dupACKs – 3 > unaccounted)
New packets arrived but retransmitted n lostRetransmit n again — no timeout
S. Prasanthi, S. Chung, "An Efficient Algorithm for the Performance ofTCP over Multi-hop Wireless Mesh Networks", Seventh InternationalConference on Information Technology, pp. 816 – 821, 2010.
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 28
Modified Fast Retransmission — ExamplePrevents timeout on repeated loss
cwnd in-flight
21 16
26 11
13 11
18 11
18 18
9 18
18 18
18 18
19 0
X3 dupACK = 215 more dupACK = 21 (8 of 10)
21
ACK = 21
32 – 38
16 – 20
2122 – 31
SEQ
X 16 sent – 5 ACK – 8 dupACK – 1 lost = 2 ???
3 dupACK = 21 (late or new?)6 more dupACK = 21
6 more dupACKS > 2 ???Resend 21*
21cumACK = 39
* If more dupACKS = 2 either:21 lost againLate dupACKs from 22 – 31
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 29
Modified Congestion Control (MCC)Reno congestion control
ssthresh = cwndcwnd = cwnd / 2
Bandwidth Estimate (BWE)
Modified congestion control3 dupACKs
ssthresh = (BWE * ΔRTTmin) / segment size cwnd = ssthresh if (cwnd > ssthresh)
Timeoutcwnd = 1 ssthresh = max{(BWE*ΔRTTmin) / segment size, 2}
Approach: Oops! Went to far. Cut back half.
L. Yongmei, J. Zhigang, Z. Ximan, “A New Protocol to Improve Wireless TCP Performance and Its Implementation”, 5th International Conference on Wireless Communications, Networking and Mobile Computing, 2009.
=Δ
×=
−
= −β × +β×
bytes ACKedBWE weighted average of
RTT for bytes_to_ACK
packets ACKed bytes per packetBWE_s[k]
now last_ACK_time
BWE_s[k] + BWE_s[k-1]BWE[k] (1 ) BWE[k-1]
2
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 30
Proposed Solutions for WiFi OverheadProblem: MACA overhead
Each TCP ACK ⇒ RTS+CTS+ACKMAC
RTS+CTS+ACKMAC time ≈ TCP ACK time
Solution: reduce control trafficIncrease TCP ACK delayBuffer more TCP ACKs in receiver
ACK 4 TCP segments instead of 2Reduce ACK traffic by 50%
BWE not changedBits ACKed ↑ and RTT ↑
Problem: longer ACK delay ⇒ lower utilizationSender waits longer for ACKs
Solution: infrastructure awarenessSender writes cwnd in TCP option fieldImmediate ACK if unACKed data in receiver ACK buffer ≈ cwnd
RTS
CTS
DATA
ACKMAC
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 31
Freeze-TCPHandles mobility drops
Handoff disconnect / reconnectTemporary fading by obstacles
Mobile station monitors radio signal strengthPredicts impending disconnectionsFreeze-TCP receiver proactively sets window = 0TCP sender enters persist mode
On reconnectReceiver sends multiple ACKs of last received packetPrevents exponential back off of cwnd in sender
Infrastructure awarenessTCP layer exposed to details handled by lower layersRoaming / handoff at layers 2 / 3Radio signal quality at layers 1 and 2
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 32
TCP-JerseyAvailable Bandwidth Estimation (ABE)
Similar to BWE expressed in segmentsCongestion Warning (CW)
Requires explicit congestion notification (ECN) support in routersIP routers mark packets on congested linkTCP receiver returns ECN warning to TCP sender
CW without loss cwnd = ABE
3 dupACKsRetransmit If (CW in dupACK segment) cwnd = ABEElse no change to cwnd
TimeoutRetransmit If (CW in dupACK segment) cwnd = 1Else no change to cwnd
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 33
TCP-Jersey Results
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 34
TCP Westwood
Modifies TCP sender
Not dependent on negotiation with TCP receiver
Not dependent on ECN support
Estimates available bandwidth
Counts ACKs and dupACKs as successful traffic
On packet loss set cwnd = available bandwidth
Improves on Reno cwnd = cwnd / 2
Performance almost as good as Jersey
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 35
Westwood Packet CountingReno enhancement
Standard slow startStandard congestion avoidance
Calculate bandwidth estimate (BWE) on each ACK
Handling isolated error Out-of-order packets ⎯→ dupACKsdupACK ⇒ some packets ARRIVED at receiverCount dupACKs in bandwidth estimateOn ACK of lost packet — treat dupACK as already counted
Serious congestionCauses timeouts instead of dupACKs
( )
k kk
k k-1
k k 1k k k
d number of bytes ACKed at time tBWE
t - t time of ACK time of previous ACK
BWE BWEBWE α BWE 1 α
2−
= =−+
= + −
Bandwidth sample
Bandwidth estimate
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 36
Westwood Packet Counting ExamplePacket transmission times
Time ACKArrived at Receiver
Packets for BWE
Counted
dupACKBWE
t1 2 1 1 0 1 / (t1 – t0)
t2 4 2 + 3 2 0 2 / (t2 – t1)
t3 5 4 1 0 1 / (t3 – t2)
t4 5 6 1 1 1 / (t4 – t3)
t5 5 7 1 2 1 / (t5 – t4)
t6 5 8 1 3 1 / (t6 – t5)
t7 10 5 + 9 2 0 2 / (t7 – t6)
1 2 3 4 5 6 7 8 5 9
t0 t1 t2 t3 t6
ACK jumps to 10 from 5 but 3 ACKs (6, 7, 8) already counted as dupACKs
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 37
Westwood ACK Counter (for BWE)
newACK = ACK – prevACK ; Packets ACKed by new ACK
// if (newACK = 1) do nothing No error condition — report 1 ACK
if (newACK = 0)
count++ ;
newACK = 1 ;
ACK "stuck" on old value (dupACK)
Increment dupACK counter
Count 1 dupACK
if (newACK > 1) ACK advances
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
Not all arrived packets ACKed
Remove ACKed from dupACK count
Count as additional dupACK
else if (count < newACK)
newACK = newACK - count ;
count = 0;
All packets ACKed in order
Report ACKed – counted (new ACKs)
Zero dupACK counter
prevACK = ACK ;
return(newACK);
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 38
Westwood Scenario 1 — No ErrorsReceive 1 — 2,3 — 4,5,6,7 — 8,9,10,11,12,13,14,15ACK 2 — 4 — 8 — 12 — 16 ⎯→ newACK = 1 — 2 — 4 — 4 — 4
newACK = ACK – prevACK ; 1 2 4 4 4
if (newACK = 0)
count++ ;
newACK = 1 ;
— — — — —
if (newACK > 1)
—
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
— — — —
else if (count < newACK)
newACK = newACK - count ;
count = 0;
20
40
40
40
prevACK = ACK ; 2 4 8 12 16
return(newACK); 1 2 4 4 4Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 39
Westwood Scenario 2 — 1 Packet Out-of-OrderReceive 1 — 2,3 — 5,4,6,7 — 8,9,10,11,12,13,14,15ACK 2 — 4 — 4 — 6 — 10 — 14 — 16
newACK = ACK – prevACK ; 1 2 0 2 4 4 2
if (newACK = 0)
count++ ;
newACK = 1 ;
— — 11
— — — —
if (newACK > 1)
— —
if (count >= newACK)
count = count – newACK + 1;
newACK = 1 ;
— — — — —
else if (count < newACK)
newACK = newACK - count ;
count = 0;
20
10
40
40
20
prevACK = ACK ; 2 4 4 6 10 14 16
return(newACK); 1 2 1 1 4 4 2Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 40
Westwood Scenario 3 — 1 Packet Very Out-of-OrderReceive 1 — 2,3 — 5,6,7,4 — 8,9,10,11,12,13,14,15ACK 2 — 4 — 4 — 4 — 4 — 8 — 12 — 16
newACK = ACK – prevACK ; 1 2 0 0 0 4 4 4
if (newACK = 0)
count++ ;
newACK = 1 ;
— — 11
21
31
— — —
if (newACK > 1)
— — — —
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
— — — —
else if (count < newACK)
newACK = newACK - count ;
count = 0;
20
10
40
40
prevACK = ACK ; 2 4 4 4 4 8 12 16
return(newACK); 1 2 1 1 1 1 4 4Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 41
Westwood Scenario 4 — Variation of Scenario 3Receive 1 — 2,3 — 5,6,7,4 — 8,9,10,11,12,13,14,15ACK 2 — 4 — 4 — 4 — 4 — 5 — 9 — 13 — 16
newACK = ACK – prevACK ; 1 2 0 0 0 1 4 4 3
if (newACK = 0)
count++ ;
newACK = 1 ;
— — 11
21
31
— — — —
if (newACK > 1)
— — — — —
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
— — — —
else if (count < newACK)
newACK = newACK - count ;
count = 0;
20
10
40
30
prevACK = ACK ; 2 4 4 4 4 5 9 13 16
return(newACK); 1 2 1 1 1 1 1 4 3Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 42
Westwood Scenario 5 — Another Variation of Scenario 3Receive 1 — 2,3 — 5,6,7,4 — 8,9,10,11,12,13,14,15ACK 2 — 4 — 4 — 4 — 4 — 6 — 10 — 14 — 16
newACK = ACK – prevACK ; 1 2 0 0 0 2 4 4 2
if (newACK = 0)
count++ ;
newACK = 1 ;
— — 11
21
31
— — — —
if (newACK > 1)
— — — —
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
— 21
— — —
else if (count < newACK)
newACK = newACK - count ;
count = 0;
20
— 20
40
20
prevACK = ACK ; 2 4 4 4 4 5 10 14 16
return(newACK); 1 2 1 1 1 1 2 4 2Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 43
Westwood Scenario 6 — 2 Packets Out-of-OrderReceive 9,10,11,13,14,15,8,12 (after ACK = 8)ACK 8 — 8 — 8 — 8 — 8 — 8 — 12 — 16
newACK = ACK – prevACK ; 0 0 0 0 0 0 4 4
if (newACK = 0)
count++ ;
newACK = 1 ;
11
21
31
41
51
61
— —
if (newACK > 1)
— — — — — —
if (count >= newACK)
count = count – newACK + 1 ;
newACK = 1 ;
31
—
else if (count < newACK)
newACK = newACK - count ;
count = 0;
— 10
prevACK = ACK ; 7 7 7 7 7 7 11 15
return(newACK); 1 1 1 1 1 1 1 1Total = 15
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 44
Westwind Congestion ControlReno slow start
On (ACK && cwnd < ssthresh)
cwnd ← cwnd + size of data ACKed
Reno congestion avoidanceOn (ACK && cwnd > ssthresh)
cwnd ← cwnd + 1
Modified fast recoveryOn n dupACKs
ssthresh = BWE * RTT_min / segment_size
if (cwnd > ssthresh) cwnd = ssthresh
Modified timeoutssthresh = BWE * RTT_min / segment_size
if (ssthresh < 2) ssthresh = 2
cwnd = 1
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 45
Westwood Performance — Throughput
Protocols and Networks — Hadassah College — Fall 2019 Wireless Dr. Martin Land 46
Westwood — cwnd and ssthreshWestwood versus Reno
0
20
40
60
80
100
0 2 4 6
ACKSEQcwnd
Steady state cwnd (slide 10)