COMP 635: WIRELESS & MOBILE COMMUNICATIONS TRANSMISSION CONTROL PROTOCOL Jasleen Kaur Fall 2017 1 Impact of Wireless on Protocol Layers Application layer Transport layer Network layer Data link layer Physical layer service location new/adaptive applications multimedia congestion/flow control uality of service addressing, routing device location hand-over authentication media access/control multiplexing encryption modulation interference attenuation freuency 2 1
Outline TCP Congestion Control Ø Issues in wireless networks Link-layer approaches Ø Reliability through retransmissions Splitting Ø Proxy-based solutions Snooping Ø TCP-aware link layers Making TCP smarter TCP-unaware approaches 3 TCP Congestion Control Goal: Ø Maintain transfer rate at the maximum that all involved resources can handle (max-min fairness) Approach: Ø Ramp up sending rate till congestion detected Rapid ramp up initially (Slow-Start) Cautious ramp-up subseuently (Congestion Avoidance) Ø If congestion, reduce sending rate and resume ramp-up Mechanisms: maintain congestion-window (Cwin) Ø Increasing Cwin: Slow Start, Congestion Avoidance Ø Decreasing Cwin: Retransmission Timeouts, Fast Retransmit/Recovery 4 2
Congestion Avoidance Source Destination Additive Increase: Ø Increment cwin by 1 MSS per RTT Multiplicative Decrease: Ø Shrink cwin by at least 50% on packet loss KB 70 60 50 40 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 Time (seconds) 10.0 5 Slow Start Behavior Goal: Ø Hastening up initial bandwidth discovery Source Destination For every new ACK received: Ø Increase exponentially (not linearly), when cwin < SSThresh Double the number of packets-in-transit every RTT After recovery from timeout: SSThresh = cwin/2 cwin = 1 6 3
Fast Retransmit/Recovery (FR/R) Fast Retransmit: Ø Goal: Triggering retransmissions sooner than timeouts Ø Exploit: Receivers send ACKs (when data received) even if they are duplicates of earlier ACKs Ø Heuristic: Use receipt of 3 duplicate ACKs as indicator that next segment was lost Fast Recovery: Ø Decrease cwin to SSThresh after fast retransmit Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Retransmit packet 3 Sender Receiver ACK 1 ACK 2 ACK 2 ACK 2 ACK 2 ACK 6 7 AIMD Why is increase additive and decrease multiplicative? Ø Willingness to reduce congestion window greater than willingness to increase it Ø Necessary condition for stability Ø Conseuences of having too large a window are worse than having too small a window 8 4
Challenge in Wireless Networks TCP congestion-detection mechanisms assume: Ø A packet loss is indicative of network congestion Ø Hence, source needs to regulate flow by reducing Cwin Assumption closely true for wired networks (BER ~10-6 ) But with wireless, Ø Losses due to: Errors (due to fading, fluctuations) Mobility (user changes network) Ø Need not reduce CW in response Ø But, TCP is e2e à CANNOT see the network Thus, TCP cannot classify the cause of loss à CHALLENGE Dilemma: End-to-end interpretation of link-local metric 9 The Problem TCP connection application application application transport transport transport network link network link lossy network link physical physical physical Wireline wireless 10 5
Impact of Misclassification Seuence number (bytes) 2.0E+06 1.5E+06 1.0E+06 5.0E+05 Best possible TCP with no errors (1.30 Mbps) TCP Reno (280 Kbps) 0.0E+00 0 10 20 30 40 50 60 Time (s) 2 MB wide-area TCP transfer over 2 Mbps WaveLAN 11 SPLIT CONNECTION APPROACHES No Changes To Wired Internet 12 6
1 TCP = ½ TCP + ½ (TCP or XXX) Per-TCP connection state TCP connection TCP connection application transport application transport rxmt application transport network network network link link link physical physical physical Base Station wireless 13 Splitting Approaches Indirect TCP [Baker97] Ø Fixed host (FH) to base station (BS) uses TCP Ø BS to mobile host (MH) uses another TCP connection Selective Repeat [Yavatkar94] Ø Over FH to BS: Use TCP Ø Over BS to MH: Use selective repeat on top of UDP No congestion control over wireless [Haas97] Ø Also use less headers over wireless Header compression 14 7
Indirect TCP (I-TCP) Splitting of the TCP connection (at, e.g., the foreign agent) into 2 TCP connections Ø Optimized TCP protocol for mobile hosts Ø No changes to the TCP protocol for wired-internet hosts mobile host access point (foreign agent) wired Internet wireless TCP standard TCP 15 I-TCP Socket and State Migration access point 1 socket migration and state transfer Internet mobile host access point 2 16 8
Advantages: Indirect TCP No changes to the fixed network necessary Ø No changes for the hosts (TCP protocol) necessary Millions of computers use (variants of) this protocol Ø All current optimizations to TCP still work Wireless transmission errors contained Ø Do not propagate into wired network Simple to control Ø Mobile TCP is used only for one hop (FA à MH) Very fast retransmission of packets is possible Ø The short delay on the mobile hop is known 17 Issues With Splitting E2E semantics totally broken Ø 2 separate connections Ø An ACK no longer means that receiver got packet Foreign agents might crash BS maintains hard state for each connection Ø What if MH disconnected from BS? Ø Huge buffer reuirements at BS Ø What if BS fails? Ø Handoff between BS reuires state transfer Ø Higher latency possible (buffering, forwarding) What if Data and ACK travel on different routes? Ø BS will not see the ACK at all splitting not feasible 18 9
LINK LAYER APPROACHES Snooping 19 Link Layer Mechanisms Forward error corrections Ø Add redundancy in the packets to correct bit-errors Ø TCP retransmissions can be alleviated Link layer retransmissions Ø MAC layer ACKnowledgments Ø Overhead only when errors occur (unlike FEC) Such mechanisms reuire no change in TCP Is that breaking e2e argument?? 20 10
Issues with Link Layer Mechanisms Link layer cannot guarantee reliability Ø Have to drop packets after some finite limit Retransmission can take uite long Ø Can be significant fraction of RTT TCP can timeout and retransmit the same packet again Ø Increasing RTO can avoid this But that impacts TCP s recovery from congestion Head of the line blocking Ø Link layer has to keep retransmitting even if bad channel Ø Blocks other streams 21 Findings Link layer retransmission good Ø When channel errors infreuent Ø When retransmit time << RTO Ø When modifying TCP is not an acceptable solution 22 11
Early approach: Snooping TCP Transparent extension of TCP within the foreign agent Ø Buffering of packets sent to the mobile host Ø Local retransmission: Lost packets on wireless link (both directions!) retransmitted immediately by the mobile host or foreign agent Ø Foreign agent snoops the packet flow Recognizes and filters ACKs in both directions Ø Changes to TCP only within the foreign agent local retransmission foreign agent correspondent host wired Internet mobile host snooping of ACKs buffering of data end-to-end TCP connection 23 Snooping TCP Data transfer to the mobile host Ø FA buffers data until it receives ACK of the MH Ø FA detects packet loss via duplicated ACKs or time-out Ø Fast retransmission possible, transparent for the fixed network Data transfer from the mobile host Ø FA detects packet loss on wireless link via seuence numbers Ø FA answers directly with a NACK to the MH Ø MH can now retransmit data with only a very short delay Integration of the MAC layer Ø MAC layer often has similar mechanisms to those of TCP Ø It can discard duplicated packets due to retransmissions 24 12
Snoop [Balakrishnan95acm] 1600000 bits/sec 1200000 800000 400000 base TCP Snoop 0 2 Mbps Wireless link 16K 32K 1/error rate 64K 128K (in bytes) 256K no error 25 Issues with Snoop Link layer needs to be TCP aware Ø Smelling cross layer Ø Link layer needs to buffer and perform sliding window Snooping does not isolate the wireless link as good as I-TCP Not useful when TCP headers encrypted Not feasible when Data and ACK travel different routes RTT estimates can go up with link layer retransmissions Ø Affects performance of Snoop 26 13
SOME OTHER APPROACHES 27 TCP-Unaware, ELN Delayed DupACKs Ø Receiver waits for sometime before sending DupACK Ø If link retransmission solves problem Then TCP sender does not send redundant packet Explicit Loss Notification (ELN) Ø BS remembers only packet s seuence numbers Ø When DupACKs return through them, they check Ø If packet was received by BS, then colors the DupACK Ø Sender realizes that packet lost on wireless link Does not cut down CW, just retransmits that packet 29 14
Receiver-Based TCP Receiver estimates cause of packet loss Ø If estimate == wireless loss, sets ELN bit FH 12 11 10 BS MH FH BS T 12 10 MH 11 Congestion loss FH BS 2 T 12 11 Error loss 10 MH 30 TCP Westwood Sender uses packet pairs to estimate available bandwidth Ø After a packet loss, sets SSThresh according to this estimate Estimate likely to yield in a fast (yet safe) recovery after packet loss Ø Packet loss made less expensive Issues: Ø AB estimation non-trivial, even in wired networks Ø Loss detection can still be expensive 31 15
Summary Reliable and in-order packet delivery important Ø TCP aims to support these features Ø Implements congestion control and flow control TCP widely tuned for wireline networks Ø Observed to be efficient on the internet When network periphery has wireless last mile Ø TCP exhibits myriad problems Ø Mainly because of: misclassification between congestion and channel errors Invalidity of FIFO ueuing models Several solution approaches Ø à but many open problems 32 16