COMP 635: WIRELESS NETWORKS TRANSMISSION CONTROL PROTOCOL Jasleen Kaur Fall 2015 1 Impact of Wireless on Protocol Layers Application layer Transport layer Network layer Data layer Physical layer service location new/adaptive s multimedia congestion/flow control quality of service addressing, routing device location hand-over authentication media access/control multiplexing encryption modulation interference attenuation frequency 2 1
Outline TCP Congestion Control Ø Issues in wireless s Link-layer approaches Ø Reliability through retransmissions Splitting Ø Proxy-based solutions Snooping Ø TCP-aware 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 subsequently (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 Source Destination Goal: Ø Hastening up initial bandwidth discovery 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 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 Fast Recovery: Ø Decrease cwin to SSThresh after fast retransmit 7 AIMD Why is increase additive and decrease multiplicative? Ø Willingness to reduce congestion window greater than willingness to increase it Ø Necessary condition for stability Ø Consequences 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 congestion Ø Hence, source needs to regulate flow by reducing Cwin Assumption closely true for wired s (BER ~10-6 ) But with wireless, Ø Losses due to: Errors (due to fading, fluctuations) Mobility (user changes ) Ø Need not reduce CW in response Ø But, TCP is e2e à CANNOT see the Thus, TCP cannot classify the cause of loss à CHALLENGE Dilemma: End-to-end interpretation of -local metric 9 The Problem TCP connection lossy Wireline wireless 10 5
Impact of Misclassification Sequence 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 rxmt Base StaKon 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 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 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 requirements at BS Ø What if BS fails? Ø Handoff between BS requires 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