Download presentation
Presentation is loading. Please wait.
Published byOwen Goodwin Modified over 8 years ago
1
Tailoring TCP for Wireless Networks
2
Credits Nitin Vaidya –Tutorial on TCP for Wireless and Mobile Hosts, MobiCom ’99 Balakrishnan, et al. –A Comparison of Mechanisms for Improving TCP Performance over Wireless Links, Sigcomm ’96
3
TCP in a nutshell Sliding window –max. n packets unacknowledged at any time Congestion control –packet loss => congestion –cwnd, ssthresh –timeout recover by slowstart + congestion avoidance –fast retransmit (dupack) fast recover
4
Slow start Congestion avoidance Slow start threshold Example assumes that acks are not delayed Nitin Vaidya
5
After fast retransmit and fast recovery window size is reduced in half. Receiver’s advertised window After fast recovery Nitin Vaidya
6
Problems with TCP TCP assumes all losses are due to network congestion –mostly true for wired networks –when packet loss due to unreliable link (transmission error) retransmission was needed throttling was not needed
7
Ideal Behavior Ideal TCP –retransmit without congestion control when loss is due to a transmission error Ideal Network –transmission losses are hidden from sender and recovery in all cases
8
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 18% Done
9
Link Layer Retransmission Forward Error Correction (FEC) Automatic Repeat Request (ARQ) Hybrid (FEC/ARQ) Sacrifice bandwidth for reliability
10
Link Layer Retransmission (contd.) If infrequent errors –RTO will be small, RTT won’t account for LL delay –TCP sender will most probably retransmit –TCP congestion control will take place! If frequent errors –RTO will be large enough, RTT will account for LL delay –TCP sender will most probably not retransmit –congestion response very slow (high RTTs)
11
Link Layer Retransmission (contd.) Out of order delivery –triggers fast retransmit at sender –LL should attempt “almost-FIFO” delivery LL should have a small delay compared to TCP’s RTT –otherwise sender will retransmit (“interference”) LL needs modification at BS and MH
12
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 27% Done
13
Split Connection Assumes first/last hop is wireless FH-MH = FH-BS + BS-MH Independent flow control for both parts Protocols may be different –not necessarily TCP for BS-MH FHMHBS Base StationMobile Host Fixed Host
14
Split Connection (contd.) Indirect TCP (Bakre 97) –FS-BH: Standard TCP –BS-MH: Standard TCP Selective Repeat Protocol (Yavatkar 94) –FS-BH: standard TCP –BS-MH: selective repeat protocol over UDP tuned to wireless behavior
15
Split Connection (contd.) Variations –on/off flow control for BS-MH –no congestion control over wireless hop –go-back-N (less processing at receiver)
16
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
17
Split Connection Approach : Advantages BS-MH connection can be optimized independent of FH-BS connection –Different flow / error control on the two connections 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 occur per window (timeouts can occur on the BS-MH connection, stalling during the timeout interval) –Selective acks improve performance for such cases
18
Split Connection Approach : Disadvantages End-to-end semantics violated –ack may be delivered to sender, before data delivered to the receiver –May not be a problem for applications that do not rely on TCP for the end-to-end semantics FHMHBS 40 39 3738 36 40
19
Split Connection Approach : Disadvantages BS retains hard state BS failure can result in loss of data (unreliability) –If BS fails, packet 40 will be lost –Because it is ack’d to sender, the sender does not buffer 40 FHMHBS 40 39 3738 36 40
20
Split Connection Approach : 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 FHMHBS 40 39 3738 36 40 MH New base station Hand-off 40 39
21
Split Connection Approach : 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) Window on BS-MH connection reduced in response to errors –may not be an issue for wireless links with small delay- bw product
22
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
23
Split Connection Approach : Disadvantages Extra copying of data at BS –copying from FH-BS socket buffer to BS-MH socket buffer –increases end-to-end latency May not be useful if data and acks traverse different paths (both do not go through the base station) –Example: data on a satellite wireless hop, acks on a dial-up channel FHMH data ack
24
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 43% Done
25
TCP-Aware Link Layer Snoop Protocol (Balakrishnan, et al.) –observe TCP ACKs at the BS –discard duplicate ACKs and retransmit prevent fast retransmit at TCP sender –end-to-end reliability –soft state at BS (only buffer packets)
26
TCP-Aware Link Layer (contd.) Snoop Protocol (contd.) –hides wireless losses from sender –only BS needs modification (network centric approach) –advantages high throughput local recovery
27
TCP-Aware Link Layer (contd.) Snoop - disadvantages –LL at BS needs to be TCP-aware –not useful if TCP headers are encrypted (IPsec) –cannot be used for asymmetric channels (data and ACKs do not both go through the BS)
28
Snoop Protocol Buffers data packets at the base station BS –to allow link layer retransmission When dupacks received by BS from MH, retransmit on wireless link, if packet present in buffer Prevents fast retransmit at TCP sender FH by dropping the dupacks at BS FHMHBS
29
Snoop : Example FHMHBS 40393738 3634 Example assumes delayed ack - every other packet ack’d 36 37 38 35 TCP state maintained at link layer
30
Snoop : Example 41403839 3634 36 37 38 3539
31
Snoop : Example 42413940 36 Duplicate acks are not delayed 36 dupack 37 38 39 40
32
Snoop : Example 40 36 Duplicate acks 414342 37 38 39 40 41
33
Snoop : Example FHMHBS 41 36 374443 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
34
Snoop : Example 37 36 424544 36 37 38 39 40 41 42 43 36
35
Snoop : Example 42 36 434645 36 37 38 39 40 41 42 43 41 36 44 TCP sender does not fast retransmit
36
Snoop : Example 43 36 444746 36 37 38 39 40 41 42 43 41 36 44 TCP sender does not fast retransmit 45
37
Snoop : Example FHMHBS 44 36 454847 36 42 43 41 36 44 45 43 46
38
Snoop Protocol When Beneficial? Snoop prevents fast retransmit from sender despite transmission errors, and out-of-order delivery on the wireless link OOO delivery causes fast retransmit only if it results in at least 3 dupacks If wireless link level delay-bandwidth product is less than 4 packets, a simple (TCP-unaware) link level retransmission scheme can suffice –Since delay-bandwidth product is small, the retransmission scheme can deliver the lost packet without resulting in 3 dupacks from the TCP receiver
39
Snoop Protocol : Classification Hides wireless losses from the sender Requires modification to only BS (network- centric approach)
40
Snoop Protocol : Advantages High throughput can be achieved –performance further improved using selective acks 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
41
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 (both do not go through the base station)
42
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 52% Done
43
TCP-Unaware Approximation of TCP-aware Link Layer Delayed Dupacks Protocol (Mehta 97) –BS provides LL retransmission (not TCP aware), hence out-of-order delivery –if out-of-order packets arrive, delay dupacks to prevent fast retransmit –after interval ‘D’ transmit dupack gives LL chance to retransmit
44
Delayed Dupacks Protocol Delayed dupacks released after interval D, if missing packet not received by then Link layer maintains state to allow retransmission Link layer state is not TCP-specific
45
Delayed Dupacks : Example 40393738 3634 Example assumes delayed ack - every other packet ack’d Link layer acks are not shown 36 37 38 35 Link layer state
46
Delayed Dupacks : Example BS 41403839 3634 36 37 38 39 35 Removed from BS link layer buffer on receipt of a link layer ack (LL acks not shown in figure)
47
Delayed Dupacks : Example 42413940 36 Duplicate acks are not delayed 36 dupack 37 38 39 40
48
Delayed Dupacks : Example 40 36 Duplicate acks 414342 37 38 39 40 41 Original ack
49
Delayed Dupacks : Example 41 36 374443 36 37 39 40 41 42 Base station forwards dupacks dupackdupacks Delayed dupack
50
Delayed Dupacks : Example 37 36 424544 36 37 40 41 42 36 dupacks Delayed dupacks 43
51
Delayed Dupacks : Example 42434645 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
52
Delayed Dupacks Scheme : 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 delay D sufficient in such cases
53
Delayed Dupacks Scheme : Disadvantages Right value of dupack delay D dependent on the wireless link properties Mechanisms to automatically choose D needed Delays dupacks for congestion losses too, delaying congestion loss recovery
54
TCP-Unaware approximation of TCP-aware link layer (contd.) Delayed Dupacks Protocol (contd.) –Advantages LL is not TCP aware TCP headers can be encrypted only TCP receiver needs to be modified –Disadvantages calculation of ‘D’ delays dupacks for congestion related losses
55
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 59% Done
56
Explicit Notification Approximate Ideal TCP –no congestion control after retransmission related to transmission error Wireless node somehow knows whether loss was due to transmission error or congestion
57
Explicit Notification (contd.) Explicit Loss Notification, MH is sender (Balakrishnan 98) –BS keeps track of holes in the data –when dupack arrives, compare with hole –if there is a match, ELN bit is set dupack was for packet lost due to transmission error MH retransmits without congestion control
58
Space Communication Protocol Standards- Transport Protocol (SCPS-TP ) The receiving ground station keeps track of how many packets with errors are received (their checksums failed) When the error rate exceeds a threshold, the ground station sends corruption experienced messages to destinations of recent error-free TCP packets –destinations are cached The TCP destinations tag acks with corruption-experienced bit TCP sender, after receiving an ack with corruption- experienced bit, does not back off until it receives an ack without that bit (even if timeout or fast retransmit occurs)
59
Explicit Loss Notification [Balakrishnan98] when MH is the TCP sender Wireless link first on the path from sender to receiver The base station keeps track of holes in the packet sequence received from the sender When a dupack is received from the receiver, the base station compares the dupack sequence number with the recorded holes –if there is a match, an ELN bit is set in the dupack When sender receives dupack with ELN set, it retransmits packet, but does not reduce congestion window MHFHBS 4321134 wireless Record hole at 2 11 11 Dupack with ELN set
60
Explicit Bad State Notification [Bakshi97] when MH is TCP receiver Base station attempts to deliver packets to the MH using a link layer retransmission scheme If packet cannot be delivered using a small number of retransmissions, BS sends a Explicit Bad State Notification (EBSN) message to TCP sender When TCP sender receives EBSN, it resets its timer –timeout delayed, when wireless channel in bad state
61
Explicit Notification (contd.) Explicit Loss Notification, MH is receiver (Bakshi 97) –BS uses LL retransmissions –if failure after a few attempts, Explicit Bad State Notification (EBSN) to TCP sender –TCP sender resets timer
62
Explicit Notification (contd.) Explicit Loss Notification (contd.) –Advantages sender can make decisions with transmission losses –Disadvantages sender must be modified BS must also be aware (not a true end-to-end solution) data and acks must pass through BS
63
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 70% Done
64
Receiver-Based Discrimination Receiver-based scheme (Biaz 98) –MH is TCP receiver –receiver “guesses” cause of packet loss –transmission error notification sent to TCP sender sender retransmits packet, does not reduce congestion window
65
Receiver-Based Scheme Packet loss due to congestion FHMHBS 101211 FHMHBS 11 1012 T Congestion loss Nitin Vaidya
66
Receiver-Based Scheme Packet loss due to transmission error FHMHBS 101211 FHMHBS 101112 Error loss 2 T Nitin Vaidya
67
Receiver-Based Discrimination (contd.) Receiver-based scheme (contd.) –Disadvantages limited applicability slowest link must be slowest to ensure queuing queuing delays for all packets should be uniform –Advantages no modification to BS (end-to-end scheme) can be used with encryption data and acks can traverse different paths
68
Solution Schemes Link-layer Split-connection TCP-Aware link layer TCP-Unaware approximation of TCP-aware link layer Explicit notification Receiver-based discrimination Sender-based discrimination 82% Done
69
Sender-Based Discrimination Sender tries to determine cause of packet loss Can use statistics based on RTT, window sizes and loss pattern Most schemes detect upcoming congestion and avoid it Not very promising for detecting transmission errors
70
Sender-Based Discrimination Scheme [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)
71
Heuristics for Congestion Avoidance load RTT throughput knee cliff
72
Heuristics for Congestion Avoidance Define condition C as a function of congestion window size and observed RTTs Condition C evaluated when a new RTT is calculated –condition C typically evaluates to 2 or 3 possible values –for now assume 2 values: TRUE or FALSE If (C == True) reduce congestion window Several proposals for condition C
73
Heuristics for Congestion Avoidance Some proposals Normalized Delay Gradient [jain89] r = [RTT(i)-RTT(i-1)] / [RTT(i)+RTT(i-1)] w = [W(i)-W(i-1)] / [W(i)+W(i-1)] Condition C = (r/w > 0)
74
Heuristics for Congestion Avoidance Some proposals Normalized Throughput Gradient [Wang91] Throughput gradient TG(i) = [T(i) - T(i-1) ] / [ W(i)- W(i-1)] Normalized Throughout Gradient NTG = TG(i) / TG(1) Condition C = (NTG < 0.5)
75
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)
76
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 is due to congestion –else assume that packet loss is due to transmission errors If packet loss determined to be due to errors, do not reduce congestion window
77
Impact of Mobility Handoffs –Split connection approach hard state at BS must be moved to new BS –Snoop protocol soft state can be discarded new BS builds state (packet losses cannot be recovered locally for a short period)
78
Improving TCP Performance in Presence of Mobility Hide mobility from TCP Sender Using fast retransmits after handoff –time wasted until sender times out –after handoff MH sends 3 dupacks to trigger fast retransmit –if MH is sender, go into fast retransmit mode after completion of handoff
79
Phew... Now you know – what TCP lacks mechanism for reacting to transmission errors, handoffs –some schemes to improve TCP’s performance LL, split connection, snoop, end-to-end, hybrid –the impact of mobility handoffs, inherently lossy links, etc.
80
Conclusion We have the Big Picture Now we can study individual schemes 100% Done!
81
References Nitin Vaidya –Tutorial on TCP for Wireless and Mobile Hosts, MobiCom ’99 –http://www.crhc.uiuc.edu/wireless/talks/tcp- wireless-tutorial.ppthttp://www.crhc.uiuc.edu/wireless/talks/tcp- wireless-tutorial.ppt –more references here
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.