CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered...
Transcript of CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered...
![Page 1: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/1.jpg)
CMPE 257 Winter'11 1
CMPE 257: Wireless and Mobile Networking
Katia Obraczka Computer Engineering
UCSC Baskin Engineering Lecture 9
![Page 2: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/2.jpg)
Student Presentations
• Feb 28: – Mobility
management: Tyler and Niosha.
• March 2: – DTNs: Philip and
Rance. • March 7:
– Hybrid networks: Gregg and Darien.
• March 9: – Energy
management: Mohamed.
– Security: Jim. • March 14:
– Security: Chris and and Seth.
CMPE 257 Winter'11 2
![Page 3: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/3.jpg)
Schedule
• Exam: Feb 23. • Project presentations: March 17.
– Time change: 5-8pm. – Approximately 15 minutes for each
presentation.
CMPE 257 Winter'11 3
![Page 4: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/4.jpg)
CMPE 257 Winter'11 4
Today
• End-to-end protocols.
![Page 5: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/5.jpg)
CMPE 257 Winter'11 5
E2E Protocols
• Reliable point-to-point. • Reliable multipoint.
![Page 6: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/6.jpg)
CMPE 257 Winter'11 6
Reliable Point2Point Transport Layer: Outline
• TCP/IP basics. • Impact of transmission errors on TCP
performance. • Approaches to improve TCP performance on
wireless networks. – Classification.
• TCP on cellular. • TCP on MANETs.
![Page 7: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/7.jpg)
CMPE 257 Winter'11 7
Internet Protocol (IP)
• Best-effort service: – Packets may be delivered out-of-order. – Packets may be lost. – Packets may be duplicated.
![Page 8: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/8.jpg)
CMPE 257 Winter'11 8
Transmission Control Protocol
• Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions. • End-to-end semantics:
– ACKs sent to TCP sender confirm delivery of data by TCP receiver.
– ACK for data sent only after it reached receiver.
![Page 9: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/9.jpg)
CMPE 257 Winter'11 9
TCP Basics • Cumulative acknowledgements.
– ACK i acknowledges receipt of packets through (i-1).
• TCP uses byte sequence numbers. – For simplicity, usually refer to packet
sequence numbers.
![Page 10: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/10.jpg)
CMPE 257 Winter'11 10
40 39 37 38
35 33
Cumulative ACKs • New ACK generated only on receipt of
new in-sequence packet.
41 40 38 39
35 37
36 34
36 34
![Page 11: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/11.jpg)
CMPE 257 Winter'11 11
Delayed ACKs
• ACK delayed until: – Another packet is received, or – Delayed ACK timer expires (200 ms
typical) • Reduces ACK traffic.
![Page 12: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/12.jpg)
CMPE 257 Winter'11 12
Delayed ACKs
40 39 37 38
35 33
41 40 38 39
35 37
New ACK not produced on receipt of packet 36,
but on receipt of 37
![Page 13: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/13.jpg)
CMPE 257 Winter'11 13
Duplicate ACKs
• A dupack is generated whenever an out-of-order segment arrives at the receiver.
![Page 14: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/14.jpg)
CMPE 257 Winter'11 14
Duplicate ACKs
40 39 37 38
36 34
42 41 39 40
36 36
Dupack (Above example assumes delayed acks) On receipt of 38
![Page 15: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/15.jpg)
CMPE 257 Winter'11 15
Duplicate ACKs • Duplicate ACKs are not delayed. • Duplicate ACKs may be generated
when: – a packet is lost, or – a packet is delivered out-of-order (OOO).
![Page 16: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/16.jpg)
CMPE 257 Winter'11 16
Out-of-Order Packets
40 39 38 37
36 34
41 40 37 39
36 36
Dupack On receipt of 37
![Page 17: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/17.jpg)
CMPE 257 Winter'11 17
Number of Dupacks 40 39 38 37
36 34
41 40 37 39
36 36 Dupack
42 41 39 40
36 36 38 New Ack
New Ack New Ack
New Ack 34 New Ack
Dupack New Ack
![Page 18: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/18.jpg)
CMPE 257 Winter'11 18
Window-Based Control
• Sliding window protocol. • Window size minimum of
– receiver’s advertised window – function of available receiver buffer size.
– congestion window - determined by sender; based on feedback from the network
![Page 19: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/19.jpg)
CMPE 257 Winter'11 19
Sliding Window
2 3 4 5 6 7 8 9 10 11 13 1 12
Sender’s window
2 3 4 5 6 7 8 9 10 11 13 1 12
Sender’s window
Ack 5
Acks received Not transmitted
![Page 20: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/20.jpg)
CMPE 257 Winter'11 20
Self-Clocking
• New data sent when old data is ack’d. • Helps maintain “equilibrium”. • Congestion window size bounds the
amount of data that can be sent per round-trip time.
• Throughput <= W / RTT.
![Page 21: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/21.jpg)
CMPE 257 Winter'11 21
Window Size
• Ideal size = delay * bandwidth
• What if window size < delay*bw ? – Inefficiency (wasted bandwidth).
• What if > delay*bw ? – Queuing at intermediate routers. – Potential for packet loss.
![Page 22: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/22.jpg)
CMPE 257 Winter'11 22
TCP Packet Loss Detection
• TCP assumes that packet loss indicates congestion.
• Packet loss detection: – Retransmission timeout (RTO). – Duplicate acknowledgements.
![Page 23: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/23.jpg)
CMPE 257 Winter'11 23
RTO
• For very packet transmitted, TCP sender starts timer.
• If acknowledgement for timed packet not received before timer=RTO, packet assumed lost.
• RTO dynamically calculated.
![Page 24: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/24.jpg)
CMPE 257 Winter'11 24
RTO Calculation
• RTO = mean + 4 mean deviation. • Large variations in the RTT increase the
deviation, leading to larger RTO.
![Page 25: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/25.jpg)
CMPE 257 Winter'11 25
Exponential Backoff
• Double RTO on each timeout
Packet transmitted
Time-out occurs before ack received, packet retransmitted
Timeout interval doubled
T1 T2 = 2 * T1
![Page 26: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/26.jpg)
CMPE 257 Winter'11 26
Duplicate ACKs
• Timeouts can take too long. • How to initiate retransmission sooner?
– Use Duplicate ACKs as loss indicator. • Dupacks may be generated due to:
– Packet loss, or – Out-of-order packet delivery.
• TCP sender assumes packet loss if it receives 3 consecutive dupacks.
![Page 27: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/27.jpg)
CMPE 257 Winter'11 27
Note on Duplicate ACKs
12 8 7 9 10 11 3 dupacks are also generated if a packet is delivered at least 3 places beyond its in-sequence location
![Page 28: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/28.jpg)
CMPE 257 Winter'11 28
TCP Congestion Control
• Slow start. • Congestion avoidance. • Fast retransmit. • Fast recovery. • Selective acknowledgements (SACK).
![Page 29: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/29.jpg)
CMPE 257 Winter'11 29
Slow Start
• Initially, cwnd = 1 MSS (max. segment size). • Increment cwnd by 1 MSS on each new ACK. • Slow start ends when cwnd reaches the slow-
start threshold. • cwnd grows exponentially in slow start.
– Factor of 1.5 per RTT if every other packet ack’d. – Factor of 2 per RTT if every packet ack’d. – Could be less if sender does not always have data
to send.
![Page 30: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/30.jpg)
CMPE 257 Winter'11 30
Congestion Avoidance
• On each new ACK, increase cwnd by 1/cwnd packets.
• cwnd increases linearly with time during congestion avoidance. – 1/2 MSS per RTT if every other packet
ack’d. – 1 MSS per RTT if every packet ack’d.
![Page 31: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/31.jpg)
CMPE 257 Winter'11 31
0
2
4
6
8
10
12
14
0 1 2 3 4 5 6 7 8
Time (round trips)
Co
ng
esti
on
Win
do
w s
ize
(seg
men
ts)
Slow start
Congestion avoidance
Slow start threshold
Assumes acks are not delayed.
![Page 32: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/32.jpg)
CMPE 257 Winter'11 32
Congestion?
• On detecting a packet loss, TCP sender assumes network congestion.
![Page 33: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/33.jpg)
CMPE 257 Winter'11 33
Timeout
• On a timeout, slow start is invoked. – cwnd is reduced to the initial value of 1
MSS. • Slow start threshold is set to half the
window size before packet loss, or: ssthresh = maximum(min(cwnd,receiver’s advertised window)/2,2 MSS).
![Page 34: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/34.jpg)
CMPE 257 Winter'11 34
Timeout (cont’d…)
0
5
10
15
20
25
0 3 6 912
15
20
22
25
Time (round trips)
Con
ges
tion
win
dow
(seg
men
ts)
ssthresh = 8 ssthresh = 10
cwnd = 20
After timeout
![Page 35: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/35.jpg)
CMPE 257 Winter'11 35
Fast Retransmit
• When sender receives multiple (>= 3) duplicate ACKs, assumes packet lost without waiting for timeout. – Retransmits packet.
• TCP Tahoe: slow start, congestion avoidance, fast retransmit.
![Page 36: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/36.jpg)
CMPE 257 Winter'11 36
Fast Recovery • Avoids slow start after single packet loss. • Operates in conjunction with fast retransmit. • After TCP sender receives 3 duplicate ACKs:
– Retransmits one packet. – Reduces cwnd by half. – Every subsequent duplicate ACK clocks transmission. – New ACK causes sender to exit fast recovery.
![Page 37: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/37.jpg)
CMPE 257 Winter'11 37
Fast Recovery • ssthresh =
min(cwnd, receiver’s advertised window)/2 (at least 2 MSS)
• retransmit the missing segment (fast retransmit) • cwnd = ssthresh + number of dupacks • when a new ack comes: cwnd = ssthreh
– Enter congestion avoidance.
Congestion window cut in half.
![Page 38: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/38.jpg)
CMPE 257 Winter'11 38
0
1
2
3
4
5
6
7
8
9
0 2 4 6 8 10 12 14
Time (round trips)
Win
do
w s
ize (
seg
men
ts)
After fast retransmit and fast recovery window size is reduced in half.
After fast recovery
![Page 39: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/39.jpg)
CMPE 257 Winter'11 39
TCP Reno
• Slow-start • Congestion avoidance • Fast retransmit • Fast recovery
![Page 40: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/40.jpg)
CMPE 257 Winter'11 40
Other TCP Variants Reno still suffers when multiple losses per RTT. • TCP New-Reno
– Stay in fast recovery until all packet losses in window are recovered.
– Can recover 1 packet loss per RTT without causing a timeout.
• Selective Acknowledgements (SACK) provides information about out-of-order packets received by receiver. – Can recover multiple packet losses per RTT.
![Page 41: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/41.jpg)
CMPE 257 Winter'11 41
Impact of transmission errors on TCP performance
![Page 42: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/42.jpg)
CMPE 257 Winter'11 42
Random Errors
• If number of errors is small, they may be corrected by an error correcting code.
• Excessive bit errors result in packet being discarded, possibly before it reaches the transport layer.
![Page 43: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/43.jpg)
CMPE 257 Winter'11 43
Random Errors May Cause Fast Retransmit
40 39 37 38
36 34
Example assumes delayed ack - every other packet ack’d
![Page 44: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/44.jpg)
CMPE 257 Winter'11 44
Random Errors May Cause Fast Retransmit
41 40 38 39
36 34
Example assumes delayed ack - every other packet ack’d
![Page 45: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/45.jpg)
CMPE 257 Winter'11 45
Random Errors May Cause Fast Retransmit
42 41 39 40
36
Duplicate acks are not delayed
36
dupack
![Page 46: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/46.jpg)
CMPE 257 Winter'11 46
Random Errors May Cause Fast Retransmit
40
36 36 36
Duplicate acks
41 43 42
![Page 47: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/47.jpg)
CMPE 257 Winter'11 47
Random Errors May Cause Fast Retransmit
41
36 36
3 duplicate acks trigger fast retransmit at sender
42 44 43
36
![Page 48: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/48.jpg)
CMPE 257 Winter'11 48
Random Errors May Cause Fast Retransmit
• Fast retransmit results in: – Retransmission of lost packet. – Reduction in congestion window.
• Reducing congestion window in response to transmission errors is unnecessary.
![Page 49: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/49.jpg)
CMPE 257 Winter'11 49
Observations • Sometimes congestion response may be appropriate in
response to random errors. • Example: errors may occur due to interference from other
users or noise. – Interference due to other users is an indication of
congestion, and thus it is appropriate to reduce congestion window.
– If noise causes errors, it is not appropriate to reduce window. • When a channel is in a bad state for a long duration, it
might be better to let TCP backoff, so that it does not unnecessarily attempt retransmissions.
![Page 50: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/50.jpg)
CMPE 257 Winter'11 50
Burst Errors and Timeouts
• If wireless link remains unavailable for extended duration, multiple packets in a window’s worth of data may be lost. – Driving through a tunnel. – Passing a truck.
• Timeout results in slow start. – Slow start reduces congestion window to 1 MSS.
reducing throughput.
![Page 51: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/51.jpg)
CMPE 257 Winter'11 51
Impact of Transmission Errors
• TCP cannot distinguish between packet losses due to congestion and transmission errors.
• Unnecessarily reduces congestion window.
• Throughput suffers.
![Page 52: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/52.jpg)
CMPE 257 Winter'11 52
Approaches to Improve Performance of TCP in Wireless Networks
![Page 53: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/53.jpg)
CMPE 257 Winter'11 53
Classification • Based on who takes the action and • What kind of action taken.
• E2E versus cross-layer approaches. – E2E approaches: connection end points try
to distinguish between congestion and non-congestion losses.
– Cross-layer approaches: combination of e2e and intermediate node participation.
![Page 54: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/54.jpg)
CMPE 257 Winter'11 54
Infrastructure-Based Wireless
• Earlier efforts to improve TCP’s performance focused on inrastructure-based wireless environments.
![Page 55: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/55.jpg)
CMPE 257 Winter'11 55
Cross-Layer Approaches • Link layer error recovery. • Link layer retransmission.
– TCP-awareness. – TCP-unawareness.
• Split connection.
![Page 56: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/56.jpg)
CMPE 257 Winter'11 56
Link Layer Mechanisms: Error Correction
• Example: Forward Error Correction (FEC) can be used to correct limited number of errors.
• Correctable errors hidden from the TCP sender. • FEC incurs overhead even when errors do not occur
– Adaptive FEC schemes can reduce the overhead by choosing appropriate FEC dynamically.
![Page 57: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/57.jpg)
CMPE 257 Winter'11 57
Link Layer Mechanisms: Link Level Retransmissions
• Link level retransmission schemes retransmit a packet at the link layer, if errors are detected.
• Retransmission overhead incurred only if errors occur.
![Page 58: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/58.jpg)
CMPE 257 Winter'11 58
Link Layer Mechanisms
May combine both FEC and retransmissions:
• Use FEC to correct small number of errors.
• Use link level retransmission when FEC capability is exceeded.
![Page 59: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/59.jpg)
CMPE 257 Winter'11 59
Link Level Retransmissions
wireless
physical
link
network
transport
application
physical
link
network
transport
application
physical
link
network
transport
application
rxmt
TCP connection Link layer state
![Page 60: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/60.jpg)
CMPE 257 Winter'11 60
Link Level Retransmissions Issues
• How many times to retransmit at the link level before giving up? – Finite bound -- semi-reliable link layer – No bound -- reliable link layer
• What triggers link level retransmissions? – Link layer timeout mechanism – Link level acks (negative acks, dupacks,
…)
![Page 61: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/61.jpg)
CMPE 257 Winter'11 61
Link Level Retransmissions Issues
• How much time is required to trigger link layer retransmission? – Small fraction of end-to-end TCP RTT. – Multiple of end-to-end TCP RTT.
• Should link layer deliver packets as they arrive, or deliver them in-order? – Link layer may need to buffer packets and reorder
if necessary so as to deliver packets in-order.
![Page 62: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/62.jpg)
CMPE 257 Winter'11 62
Link Layer Schemes: Summary
When is a reliable link layer beneficial to TCP performance?
• If it provides almost in-order delivery. and • TCP retransmission timeout large
enough to tolerate additional delays due to link level retransmits.
![Page 63: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/63.jpg)
CMPE 257 Winter'11 63
Cross-Layer Approaches • Link layer error recovery. • Link layer retransmission.
– TCP-awareness. – TCP-unawareness.
• Split connection.
![Page 64: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/64.jpg)
CMPE 257 Winter'11 64
TCP-Aware Link Layer
![Page 65: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/65.jpg)
CMPE 257 Winter'11 65
Snoop Protocol [Balakrishnan95]
• Retains local recovery of Split Connection approach.
• Link level retransmissions. • Differs from split connection schemes:
– End-to-end semantics retained – Soft state at base station.
![Page 66: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/66.jpg)
CMPE 257 Winter'11 66
Snoop Protocol
FH MH BS wireless
physical
link
network
transport
application
physical
link
network
transport
application
physical
link
network
transport
application
rxmt
Per TCP-connection state TCP connection
![Page 67: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/67.jpg)
CMPE 257 Winter'11 67
Snoop Protocol
• Buffers data packets at base station. – Data sent by FH not yet ack’d by MH. – Allow link layer retransmission.
• When dupacks received by BS from MH (or local timeout), retransmit on wireless link, if packet in buffer.
• Prevents fast retransmit by TCP sender at FH by suppressing dupacks at BS.
![Page 68: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/68.jpg)
CMPE 257 Winter'11 68
Snoop : Example
FH MH BS 40 39 37 38
36 34
Example assumes delayed ack - every other packet ack’d
36
37
38
35 TCP state maintained at
link layer
![Page 69: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/69.jpg)
CMPE 257 Winter'11 69
Snoop : Example
41 40 38 39
36 34
36
37
38
35 39
![Page 70: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/70.jpg)
CMPE 257 Winter'11 70
Snoop : Example
42 41 39 40
36
Duplicate acks are not delayed
36
dupack
37
38
39
40
![Page 71: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/71.jpg)
CMPE 257 Winter'11 71
Snoop : Example
40
36 36 36
Duplicate acks
41 43 42
37
38
39
40
41
![Page 72: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/72.jpg)
CMPE 257 Winter'11 72
Snoop : Example
FH MH BS 41
36 36
37 44 43
36
37
38
39
40
41
42
Discard dupack
Dupack triggers retransmission of packet 37 from base station
BS needs to be TCP-aware to be able to interpret TCP headers
![Page 73: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/73.jpg)
CMPE 257 Winter'11 73
Snoop : Example
37
36
36
42 45 44
36
37
38
39
40
41
42
43
36
![Page 74: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/74.jpg)
CMPE 257 Winter'11 74
Snoop : Example
42
36
36
43 46 45
36
37
38
39
40
41
42
43
41
36
44
TCP sender does not fast retransmit
![Page 75: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/75.jpg)
CMPE 257 Winter'11 75
Snoop : Example
43
36 36
44 47 46
36
37
38
39
40
41
42
43
41
36
44
TCP sender does not fast retransmit
45
![Page 76: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/76.jpg)
CMPE 257 Winter'11 76
Snoop : Example
FH MH BS 44
36 36
45 48 47
36
42
43
41
36
44
45
43
46
![Page 77: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/77.jpg)
CMPE 257 Winter'11 77
Performance
0
400000
800000
1200000
1600000
2000000
16K
32K
64K
128K
256K
no
erro
r
1/error rate (in bytes)
bit
s/s
ec
base TCP
Snoop
2 Mbps Wireless link
![Page 78: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/78.jpg)
CMPE 257 Winter'11 78
Snoop Protocol: Advantages • Snoop prevents fast retransmit from
sender despite transmission errors and out-of-order delivery on the wireless link.
• If wireless link delay-bandwidth product less than 4 packets: simple (TCP-unaware) link level retransmission scheme can suffice. – Since delay-bandwidth product is small,
retransmission scheme can deliver lost packet without causing MH to send 3 dupacks.
![Page 79: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/79.jpg)
CMPE 257 Winter'11 79
Snoop Protocol: Advantages
• Higher throughput can be achieved. • Local recovery from wireless losses. • Fast retransmit not triggered at sender
despite out-of-order link layer delivery. • End-to-end semantics retained. • Soft state at base station.
– Loss of the soft state affects performance, but not correctness.
![Page 80: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/80.jpg)
CMPE 257 Winter'11 80
Snoop Protocol:Disadvantages
• Link layer at base station needs to be TCP-aware.
• Not useful if TCP headers are encrypted (IPsec).
• Cannot be used if TCP data and TCP ACKs traverse different paths.
![Page 81: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/81.jpg)
CMPE 257 Winter'11 81
Delayed Dupacks Approach
• TCP-unaware approximation of TCP-aware link layer.
• Attempts to imitate Snoop without making BS TCP-aware.
• Snoop implements two features at BS: – Link layer retransmission. – Dupack handling: reduced interference between
TCP and link layer retransmissions (drop dupacks).
![Page 82: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/82.jpg)
CMPE 257 Winter'11 82
Delayed Dupacks
• Implements same two features: – at BS : link layer retransmission. – at MH : reducing interference between TCP
and link layer retransmissions (by delaying dupacks).
![Page 83: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/83.jpg)
CMPE 257 Winter'11 83
Delayed Dupacks Protocols
• TCP receiver delays dupacks (third and subsequent) for interval D, when out-of-order packets received.
• Dupack delay intended to give link level retransmit time to succeed.
• Benefit: Delayed dupacks can result in recovery from a transmission loss without triggering a response from the TCP sender.
• Disadvantage: Recovery from congestion losses delayed.
![Page 84: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/84.jpg)
CMPE 257 Winter'11 84
Delayed Dupacks Protocols
• Delayed dupacks released after interval D, if missing packet not received.
• Link layer maintains state to allow retransmission.
![Page 85: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/85.jpg)
CMPE 257 Winter'11 85
Delayed Dupacks: Example
40 39 37 38
36 34
Example assumes delayed ack - every other packet ack’d Link layer acks are not shown
36
37
38
35 Link layer state
![Page 86: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/86.jpg)
CMPE 257 Winter'11 86
Delayed Dupacks: Example
BS 41 40 38 39
36 34
36
37
38
39
35 Removed from BS link layer buffer on receipt of a link layer ack (LL acks not shown in figure)
![Page 87: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/87.jpg)
CMPE 257 Winter'11 87
Delayed Dupacks: Example
42 41 39 40
36
Duplicate acks are not delayed
36
dupack
37
38
39
40
![Page 88: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/88.jpg)
CMPE 257 Winter'11 88
Delayed Dupacks: Example
40
36 36 36
Duplicate acks
41 43 42
37
38
39
40
41
Original ack
![Page 89: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/89.jpg)
CMPE 257 Winter'11 89
Delayed Dupacks: Example
41
36 36
37 44 43
36
37
39
40
41
42
Base station forwards dupacks
dupack dupacks Delayed dupack
![Page 90: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/90.jpg)
CMPE 257 Winter'11 90
Delayed Dupacks: Example
37
36 36
42 45 44
36
37
40
41
42
36 dupacks
Delayed dupacks
43
![Page 91: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/91.jpg)
CMPE 257 Winter'11 91
Delayed Dupacks : Example
42 43 46 45
36
37
41
42
43
41
TCP sender does not fast retransmit
44
Delayed dupacks are discarded if lost
packet received before delay D expires
![Page 92: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/92.jpg)
CMPE 257 Winter'11 92
Delayed Dupacks [Vaidya99]
0
400000
800000
1200000
1600000
2000000
16
38
4
32
76
8
65
53
6
1E
+0
51/error rate (in bytes)
base TCP
dupack delay80ms + LLRetransmit
Only LLretransmit
2 Mbps wireless duplex link with 20 ms delay No congestion losses
20 ms 20 ms
10 Mbps 2 Mbps
![Page 93: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/93.jpg)
CMPE 257 Winter'11 93
Delayed Dupacks [Vaidya99]
020000400006000080000
100000120000140000160000
16384
32768
65536
1E
+05
1/error rate (in bytes)
base TCP
dupack delay80ms + LLRetransmit
Only LLretransmit
5% packet loss due to congestion
20 ms 20 ms
10 Mbps 2 Mbps
![Page 94: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/94.jpg)
CMPE 257 Winter'11 94
Delayed Dupacks: Advantages
• Link layer need not be TCP-aware. • Can be used even if TCP headers are
encrypted. • Works well for relatively small wireless
RTT (compared to end-to-end RTT). – Relatively small D sufficient in such cases.
![Page 95: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/95.jpg)
CMPE 257 Winter'11 95
Delayed Dupacks: Disadvantages
• Right value of dupack delay D dependent on wireless link properties.
• Mechanisms to determine D needed. • Delays dupacks for congestion losses
too, delaying congestion loss recovery.
![Page 96: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/96.jpg)
CMPE 257 Winter'11 96
Cross-Layer Approaches • Link layer error recovery. • Link layer retransmission.
– TCP-awareness. – TCP-unawareness.
• Split connection.
![Page 97: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/97.jpg)
CMPE 257 Winter'11 97
Split Connection Approach
![Page 98: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/98.jpg)
CMPE 257 Winter'11 98
Split Connection Approach
• End-to-end TCP connection is broken into one connection on the wired part of route and one over wireless part.
![Page 99: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/99.jpg)
CMPE 257 Winter'11 99
Split Connection Approach
• Connection between wireless host MH and fixed host FH goes through base station BS.
• FH-MH = FH-BS + BS-MH
FH MH BS
Base Station Mobile Host Fixed Host
![Page 100: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/100.jpg)
CMPE 257 Winter'11 100
Split Connection Approach
• Split connection results in independent control for the two parts. – Congestion/error control protocols, packet
size, time-outs, may be different for each part.
FH MH BS
Base Station Mobile Host Fixed Host
![Page 101: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/101.jpg)
CMPE 257 Winter'11 101
Split Connection Approach
wireless
physical
link
network
transport
application
physical
link
network
transport
application
physical
link
network
transport
application rxmt
Per-TCP connection state
TCP connection TCP connection
![Page 102: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/102.jpg)
CMPE 257 Winter'11 102
Split Connection Approach : Classification
• Hides transmission errors from sender • Primary responsibility at base station • If specialized transport protocol used on
wireless, then wireless host also needs modification
![Page 103: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/103.jpg)
CMPE 257 Winter'11 103
Split Connection Approach: Example
• Indirect TCP [Bakre94] – FH - BS connection : Standard TCP. – BS - MH connection : Standard TCP.
![Page 104: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/104.jpg)
CMPE 257 Winter'11 104
Split Connection: Advantages • BS-MH connection can be optimized
independent of FH-BS connection. – Different congestion/error control.
• Local recovery of errors. – Faster recovery due to relatively shorter RTT on
wireless link. • Good performance achievable using
appropriate BS-MH protocol. – Standard TCP on BS-MH performs poorly when
multiple packet losses per window. – Selective ACKs improve performance.
![Page 105: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/105.jpg)
CMPE 257 Winter'11 105
Split Connection: Disadvantages
• End-to-end semantics violated. – ACK may be delivered to sender before
data delivered to receiver.
FH MH BS
40
39
37 38
36 40
![Page 106: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/106.jpg)
CMPE 257 Winter'11 106
Split Connection: Disadvantages
• BS retains hard state. – BS failure can result in loss of data.
• If BS fails, packets 39 and 40 will be lost. • Both ack’d to sender;sender does not buffer.
FH MH BS
40
39
37 38
36 40
![Page 107: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/107.jpg)
CMPE 257 Winter'11 107
Split Connection: Disadvantages
• BS retains hard state. Hand-off latency increases due to state transfer – Data that has been ack’d to sender must
be moved to new base station.
![Page 108: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/108.jpg)
CMPE 257 Winter'11 108
Handoff
FH MH BS
40 39
37 38
36 40
MH
New base station
Hand-off
40 39
![Page 109: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/109.jpg)
CMPE 257 Winter'11 109
Split Connection: Disadvantages
• Buffer space needed at BS for each TCP connection. – BS buffers tend to get full, when wireless link slower (one
window worth of data on wired connection could be stored at the base station for each split connection).
• Extra copying of data at BS – Copying from FH-BS socket buffer to BS-MH socket buffer. – Increases end-to-end latency.
![Page 110: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/110.jpg)
CMPE 257 Winter'11 110
Split Connection: Disadvantages
• May not be useful if data and acks traverse different paths. – Example: data on a satellite wireless hop,
acks on a dial-up channel.
FH MH
data
ack
BS
![Page 111: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/111.jpg)
CMPE 257 Winter'11 111
E2E Approaches
• Strict E2E versus E2E with intermediate node involvement.
• E2E with intermediate node involvement: – Explicit notifications.
![Page 112: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/112.jpg)
CMPE 257 Winter'11 112
Explicit Notification Schemes General Philosophy
• Approximate ideal TCP behavior. – Ideally, TCP sender should simply retransmit a
packet lost due to transmission errors without taking any congestion control actions.
• A node determines whether packets are lost due to errors and informs sender using an “explicit notification”.
• Sender, on receiving the notification, does not reduce congestion window, but retransmits lost packet.
![Page 113: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/113.jpg)
CMPE 257 Winter'11 113
Explicit Notification Schemes
• Motivated by Explicit Congestion Notification (ECN) proposals [Floyd94].
Variations proposed in literature differ in: • Who sends explicit notification. • How they decide to send explicit notification. • What sender does on receiving notification.
![Page 114: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/114.jpg)
CMPE 257 Winter'11 114
Explicit Loss Notification [Balakrishnan98]
• MH is the TCP sender. • Wireless link first on path from sender to
receiver. • Base station keeps track of holes in packet
sequence. • When a dupack is received from the receiver,
BS compares the dupack sequence number with recorded holes. – If there is a match, an ELN bit is set in dupack.
Dupack with ELN set
![Page 115: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/115.jpg)
CMPE 257 Winter'11 115
ELN
• When sender receives dupack with ELN set, it retransmits packet, but does not reduce congestion window.
MH FH BS 4 3 2 1 1 3 4 wireless
Record hole at 2
1 1 1 1
![Page 116: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/116.jpg)
CMPE 257 Winter'11 116
Explicit Loss Notification [Biaz99thesis]
• Adapts ELN proposed in [Balakrishnan98] for the case when MH is receiver.
• Caches TCP sequence numbers at base station, similar to Snoop. But does not cache data packets, unlike Snoop.
• Duplicate acks are tagged with ELN bit before being forwarded to sender if sequence number for the lost packet is cached at BS.
• Sender takes appropriate action on receiving ELN.
![Page 117: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/117.jpg)
CMPE 257 Winter'11 117
ELN [Biaz99thesis]
37
36
37
38 39
39
38
Sequence numbers cached at base station
37 37
Dupack with ELN
![Page 118: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/118.jpg)
CMPE 257 Winter'11 118
Explicit Bad State Notification [Bakshi97]
• MH is TCP receiver. • BS attempts to deliver packets to MH using link layer
retransmission scheme. • If packet cannot be delivered using small number of
retransmissions, BS sends a Explicit Bad State Notification (EBSN) message to TCP sender.
• When TCP sender receives EBSN, it resets RTO. – Timeout delayed when wireless channel in bad state.
![Page 119: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/119.jpg)
CMPE 257 Winter'11 119
Partial Ack Protocols [Cobb95][Biaz97]
• Send two types of acknowledgements. • Partial ACK informs sender that a
packet was received by an intermediate host (typically, base station).
• Normal TCP cumulative ACK needed by sender for reliability purposes.
![Page 120: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/120.jpg)
CMPE 257 Winter'11 120
Partial Ack Protocols
• When packet for which partial ack is received detected to be lost, sender does not reduce its congestion window – Loss assumed to be due to wireless errors.
37
36
Partial ack
37
Cumulative ack
![Page 121: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/121.jpg)
CMPE 257 Winter'11 121
Variations
• Base station may or may not locally buffer and retransmit lost packets.
![Page 122: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/122.jpg)
CMPE 257 Winter'11 122
Strict E2E Schemes
![Page 123: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/123.jpg)
CMPE 257 Winter'11 123
Receiver-Based Scheme [Biaz98Asset]
• MH is TCP receiver. • Receiver uses heuristics to guess cause of
packet loss. • When receiver believes that packet loss is
due to errors, it sends notification to sender. • TCP sender, on receiving notification,
retransmits lost packet, without reducing congestion window.
![Page 124: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/124.jpg)
CMPE 257 Winter'11 124
Heuristics
• Receiver uses inter-arrival time between consecutively received packets to guess cause of packet loss.
• On determining a packet loss as being due to errors, the receiver may: – Tag corresponding dupacks with an ELN bit, or – Send an explicit notification to sender.
![Page 125: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/125.jpg)
CMPE 257 Winter'11 125
Receiver-Based Scheme
• Packet loss due to congestion
FH MH BS
10 12 11
FH MH BS
11
10 12
T
Congestion loss
![Page 126: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/126.jpg)
CMPE 257 Winter'11 126
Receiver-Based Scheme
• Packet loss due to transmission error
FH MH BS
10 12 11
FH MH BS
10 11 12 Error loss
2 T
![Page 127: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/127.jpg)
CMPE 257 Winter'11 127
Sender-Based Discrimination Scheme
![Page 128: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/128.jpg)
CMPE 257 Winter'11 128
Sender-Based Discrimination [Biaz98ic3n,Biaz99techrep]
• Sender can attempt to determine cause of a packet loss
• If packet loss determined to be due to errors, do not reduce congestion window
• Sender can only use statistics based on round-trip times, window sizes, and loss pattern. – Unless network provides more information (example: explicit
loss notification)
![Page 129: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/129.jpg)
CMPE 257 Winter'11 129
Heuristics for Congestion Avoidance
• Define condition C as a function of congestion window size and observed RTTs.
• Condition C evaluated for new RTT. • If (C == True) reduce congestion
window.
![Page 130: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/130.jpg)
CMPE 257 Winter'11 130
Heuristics for Congestion Avoidance: Some proposals
• TCP Vegas [Brakmo94]
expected throughput ET = W(i) / RTTmin
actual throughput AT = W(i) / RTT(i)
Condition C = ( ET-AT > beta)
![Page 131: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/131.jpg)
CMPE 257 Winter'11 131
Sender-Based Heuristics
• Record latest value evaluated for condition C • When a packet loss is detected:
– If last evaluation of C is TRUE, assume packet loss due to congestion.
– Else assume packet loss due to transmission errors.
• If packet loss determined to be due to errors, do not reduce congestion window
![Page 132: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/132.jpg)
CMPE 257 Winter'11 132
Sender-Based Heuristics: Disadvantage
• Does not work quite well enough!!
Reason
• Not much correlation between observed short-term statistics, and onset of congestion.
![Page 133: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/133.jpg)
CMPE 257 Winter'11 133
Sender-Based Heuristics: Advantages
• Only sender needs to be modified
Needs further investigation to develop better heuristics – Investigate longer-term heuristics.
![Page 134: CMPE 257: Wireless and Mobile Networking · Transmission Control Protocol • Reliable ordered delivery. • Implements flow and congestion control. • Reliability through retransmissions.](https://reader030.fdocuments.us/reader030/viewer/2022040900/5e6f222f8db7414aee24fabc/html5/thumbnails/134.jpg)
CMPE 257 Winter'11 134
Reliable Point2Point Transport Layer: Outline
TCP/IP basics. Impact of transmission errors on TCP
performance. Approaches to improve TCP performance on
wireless networks. Classification.
TCP on cellular. TCP on MANETs.