TCP over Wireless Networks CS 653, Fall 2010 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP over Wireless: Problems Disambiguating wireless bit-errors from congestion Frequent window reduction due to errors Frequent timeout due to burst losses High variability Contention + channel errors high loss Contention + link-layer retransmission high RTT variance Need end-to-end connection all the time Wireless links have intermittent connectivity UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Link-layer based Schemes: ARQ Automatic Repeat reQuest (ARQ) Widely used in wireless link-layer protocols Uses retransmissions and acks to cover wireless errors FH BS MH Link-Layer ARQ Internet Packet 1 Link-Ack 1 Packet 2 Link-Ack 2 Packet 3 Timeout Packet 3 Link-Ack 3 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Link-layer based Schemes: ARQ Pros No modification to upper layers Cons Fast retransmission due to message lost and out-of-order delivery —redundant retransmission and window reduction Interacts with TCP retransmissions —redundant retransmission H. Balakrishnan, et al. A comparison of mechanisms for improving TCP performance over wireless links, Sigcomm96 Large RTT variance —long timeout Head-of-line blocking due to large #retransmission —slow link blocks fast link UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Split TCP: Indirect TCP I-TCP splits end-to-end TCP connection into two connections Fixed host to BS BS to mobile host Two TCP connections with independent flow/congestion control contexts Packets buffered at BS TCP TCP Buffer FH BS Internet UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science MH Split TCP: Indirect TCP Pros Separates flow and congestion control of wireless and wired --higher throughput at sender Cons Breaks TCP end-to-end semantics Ack at FH does not mean MH has received the packet BS failure causes loss of data Neither FH nor MH can recover the data On path change, data has to be forwarded to new BS Wireless part is the bottleneck UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Split TCP: Selective Repeat Protocol Similar to I-TCP but uses SRP/UDP over wireless link Raj Yavatkar, Namrata Bhagawat, Improving End-to-End Performance of TCP over Mobile Internetworks, 1994 Pros Better performance over wireless links Cons All cons of I-TCP except last one TCP SRP/UDP Buffer FH BS Internet UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science MH Split-TCP: Mobile TCP Similar to I-TCP but tries to keep TCP end-to-end semantics BS only acks the last packet after it is received by MH Kevin Brown and Suresh Singh. A network architecture for mobile computing. In Proc. IEEE INFOCOM'96, March 1996 Pros Data will be recovered eventually after BS failure BS buffer does not overflow Cons Worse performance Still not exactly the TCP semantics UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP-aware Link Layers: Snoop Link layer is aware of TCP traffic BS caches data and monitors acks. Retransmits on duplicate acks and drops duplicate acks H. Balakrishnan, et al. Improving TCP/IP Performance over Wireless Networks, 1995 FH BS MH Internet Packet 1 Packet 2 Packet 3 Packet 4 Packet 1 Packet 2 Ack 1 Ack 2 Ack 1 Ack 2 Packet 3 Packet 4 Ack 2 Blocks Dup-Ack Packet 3 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP-aware Link Layers: Snoop Pros No modification to FH and MH BS only keeps soft state—BS failure does not break TCP Cons Does not work with encrypted packets Does not work if data packets and acks traverse different paths Increases RTT—high timeout UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP-aware Link Layers: WTCP Similar to Snoop WTCP corrects RTT by modifying the timestamp in return acks K. Ratnam and I. Matta ,WTCP: An Efficient Transmission Control Protocol for Networks with Wireless Links, 1998 FH BS MH Internet Packet 3 Packet 4 Log Arrival Time Delay Packet 3 Packet 4 Ack 2 Packet 3 Ack 3 Arrival Time+=Delay Ack’ 3 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP-aware Link Layers: Delayed DupAcks Protocol Similar to Snoop, BS does link-layer retrans but does not drop dup-acks MH delays the third duplicate ack—will not trigger fast retransmissions on FH Miten N. Mehta, Nitin H. Vaidva, Delayed Duplicate-Acknowledgements: A proposal to Improve Performance of TCP on Wireless Links, 1997 Pros: Works with encrypted TCP Cons: Unnecessary delay during congestion loss UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Backpressure-based approaches Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Explicit Notification: Explicit Loss Notification ELN works with MH is the sender BS monitors TCP segments from MH and logs down holes BS tags a dup-ack’s ELN bit if corresponds to a logged hole No congestion control on MH if an ELN-ack is received Hari Balakrishnan and Randy H. Katz, Explicit Loss Notification and Wireless Web Performance, 1998 FH BS MH Internet Log Hole(Pkt 2) Packet 1 Ack 1 Ack 1 Ack 1 Packet 3 Packet 4 Ack 1 Ack 1(ELN) Ack 1(ELN) UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Packet 1 Packet 2 Packet 3 Packet 4 Explicit Notification: ELN2 Similar to ELN but works when FH is the sender BS monitors TCP segments from FH and logs down holes BS tags a dup-ack’s ELN bit if not corresponds to any hole No congestion control on FH if an ELN-ack is received S. Biaz and N. Vaidya, Discriminating Congestion Losses from Wireless Losses using Inter-Arrival Times at the Receiver, 1998 FH BS Internet UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science MH Outline TCP over Wireless: Problems TCP over Wireless: Solutions Link-layer based Split TCP TCP-aware link layer Explicit notification Network-assisted congestion control Summary Hop: a Reliable Hop-by-hop Block Transfer Protocol UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Backpressure Approaches: RAIN RAIN—Reliable Wireless Network Architecture Small buffer and Adaptive FrEeze(SAFE) link layer Congestion control: backpressure w/ small buffer size Contention control: off-the-shelf CSMA/CA, link-layer ARQ Simple transport layer Pros: Pushes congestion and contention control in-network—prompt and accurate info Cons: Link-layer ARQ does not completely solve link-layer contention Small buffer does not utilize the bursty-sending feature of wireless links Chaegwon Lim, et.al, RAIN: A Reliable Wireless Network Architecture, 2006 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Summary Most above protocols focus on “the last mile” problem— single wireless hop Multi-hop wireless mesh networks are blooming, e.g., Roofnet, Wildnet, … None of above protocols works during network partitions UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science Review slides UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Flow Control Sliding Window Keeps the sender from sending too fast Receiver specifies window size Sender only sends a window before waiting for acks UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Flow Control Cumulative Ack Receiver acks back expecting sequence number Sends duplicate acks when “holes” are detected Sender Receiver Packet 1 Window=4 Packet 2 Ack 1 Packet 3 Ack 2 Packet 4 Ack 3 Ack 4 Packet 5 Packet 6 Packet 7 Ack 4 Packet 8 Ack 4 Duplicate Acks Ack 4 Timeout Packet 5 Window=2 Packet 6 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Flow Control Selective Ack Receiver can indicate missing segments Handles “holes” efficiently Co-exists with cumulative acks TCP SACK 0-99 100-199 200-299 300-399 400-499 UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Congestion Control Slow Start Actually grows exponentially Starts from small window size(2KB) Multiplicatively increases window until threshold reached or loss Congestion Window Slow Start Time UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Congestion Control Congestion Avoidance Incrementally increases window after threshold reached Congestion Window Congestion Avoidance Slow Start Time UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Congestion Control Timeout Decreases window size to 1 Halves threshold Timeout value = f(Mean_RTT, Dev_RTT) Congestion Window Congestion Avoidance Timeout Congestion Avoidance Slow Start Slow Start Time UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science TCP Review: Congestion Control Fast Retransmits (TCP-Reno) Don’t timeout or reduce window to one on single loss On three duplicate acks Retransmits the lost segment right away Reduces window size to 0.5xWindow+#dup-acks Enters congestion avoidance phase Cons: Can’t handle bursty (3+) acks; Dup-acks are also sent if pkts out of order. Congestion Window Three Dup-Acks Congestion Avoidance Congestion Avoidance Slow Start Time UNIVERSITY OF MASSACHUSETTS, AMHERST • Department of Computer Science