690 likes | 799 Views
TCP for Wireless and Mobile Hosts. Nitin H. Vaidya Computer Science Department Texas A&M University vaidya@cs.tamu.edu http://www.cs.tamu.edu/faculty/vaidya/. Note. This is an overview talk Lot of work discussed in this talk is by other people, not by Vaidya
E N D
TCP for Wireless and Mobile Hosts Nitin H. Vaidya Computer Science Department Texas A&M University vaidya@cs.tamu.edu http://www.cs.tamu.edu/faculty/vaidya/
Note • This is an overview talk • Lot of work discussed in this talk is by other people, not by Vaidya • For a list of references, and a more complete set of slides, see Vaidya’s home page (follow the link to Seminars).
Wireless Local Area Networks • Local area connectivity using wireless communication • IEEE 802.11 WLAN Standard • Example: WaveLan, Aironet • Wireless LAN may be used for • last hop to a wireless host • wireless connectivity between hosts on the LAN
Cellular Wireless • Space divided into cells • A base station is responsible to communicate with hosts in its cell • Mobile hosts can change cells while communicating • Hand-off occurs when a mobile host starts communicating via a new base station
Multi-Hop Wireless • May need to traverse multiple links to reach a destination
Multi-Hop Wireless Mobile Ad Hoc Networks (MANET) • Mobility causes route changes
Multi-Hop Wireless Metricom’s Ricochet Network • Around 28.8 Kbps (128 Kbps to come, may be already there) Wireless hosts modem Poletop radio internet
Satellites • Geostationary Earth Orbit (GEO) Satellites • example: Inmarsat SAT ground stations
Satellites • Low-Earth Orbit (LEO) Satellites • example: Iridium (66 satellites) (2.4 Kbps data) SAT constellation SAT SAT ground stations
Satellites • GEO • long delay - 250-300 ms propagation delay • LEO • relatively low delay - 40 - 200 ms • large variations in delay - multiple hops/route changes, relative motion of satellites, queueing
Wireless Connectivity - Characteristics • Transmission errors • Wireless LANs - 802.11, Hyperlan • Cellular wireless • Multi-hop wireless • Satellites • Low bandwidth • Cellular wireless • Packet radio (e.g., Metricom) • Long or variable latency • GEO, LEO satellites • Packet radio - high variability • Asymmetry in bandwidth, error characteristics • Satellites (example: DirectPC)
Internet Protocol (IP) • Packets may be delivered out-of-order • Packets may be lost • Packets may be duplicated
Transmission Control Protocol (TCP) • Window based protocol • Size of window determines sending rate (data sent per RTT) • Window size based on network state and receive buffer size • Implements congestion avoidance and control • packet loss assumed to be indication of congestion • sending rate reduced drastically on detecting a packet loss • Reliable ordered delivery: reliability by retransmissions • packet loss detected by timeouts and duplicate acks • End-to-end semantics • Acks confirm delivery of data received by TCP receiver • Ack for data sent only after data has reached receiver
1 2 3 4 5 6 7 8 9 10 11 12 13 Sender’s window Window Based Flow Control Sender’s window 1 2 3 4 5 6 7 8 9 10 11 12 13 Ack 5
Cumulative Acknowledgements • A new cumulative acknowledgement is generated only on receipt of a newin-sequence packet 40 39 38 37 33 34 35 36 41 40 39 38 34 35 36 37 i data i ack
40 40 39 39 38 37 38 37 34 34 36 36 Duplicate Acknowledgements • Duplicate ack is generated when a received packet has a larger-than-expected sequence number • Duplicate acks may be generated when • a packet is lost, or • a packet is delivered out-of-order (OOO) out-of-order delivery 38 lost due to congestion 41 40 39 37 36 34 38 lost due to errors
12 11 10 9 8 7 12 8 11 10 9 7 Fast Retransmit Mechanism • TCP sender assumes that a packet loss has occurred if it receives 3 dupacks consecutively • 3 dupacks will be generated if 3 packets are delivered subsequent to a lost packet • 3 dupacks are also generated if a packet is delivered at least 3 places beyond its in-sequence location Fast retransmit useful only if lower layers deliver packets “almost ordered” ---- otherwise, unnecessary fast retransmit
Fast retransmit is followed by fast recovery. After fast recovery, window size is reduced in half. After fast recovery Receiver’s advertized window
Impact of Transmission Errors • Packet loss due to errors can trigger fast retransmit and fast recovery, resulting in • retransmission of lost packet • reduction in congestion window • Reducing congestion window in response to errors is unnecessary • unless errors are caused by congestion • Reduction in congestion window in response to errors can significantly reduce the throughput • TCP cannot distinguish between packet losses due to congestion and those due to transmission errors.
Impact of Errors Exponential error model 2 Mbps wireless full duplex link No congestion losses
Techniques to Improve TCP Performancein Presence of ErrorsClassification 1 Classification based on nature of actions taken to improve performance • Hide error losses from the sender • if sender is unaware of the packet losses due to errors, it will not reduce congestion window • Let sender know, or determine, cause of packet loss • if sender knows that a packet loss is due to errors, it will not reduce congestion window
Techniques to Improve TCP Performancein Presence of ErrorsClassification 2 Classification based on where modifications are needed • At the sender node only • At the receiver node only • At intermediate node(s) only • Combinations of the above
Ideal Behavior • Ideal TCP behavior: Ideally, the TCP sender should simply retransmit a packet lost due to transmission errors, without taking any congestion control actions • Such a TCP referred to as Ideal TCP • Ideal TCP typically not realizable • Ideal network behavior: Transmission errors should be hidden from the sender -- the errors should be recovered transparently and efficiently • Proposed schemes attempt to approximate one of the above two ideals
Proposals to Improve Performance of TCP over Wireless • Split connection approach • Link level mechanisms • TCP-Aware link layer • Explicit notification • TCP-Unaware approximation of TCP-aware link layer • Receiver-based discrimination • Sender-based discrimination
FH BS MH Fixed Host Base Station Mobile Host Split Connection Approach • End-to-end TCP connection is broken into • one connection on the wired part of route, and • one over wireless part of the route • Split connection results in independent flow control for the two parts • Flow/error control protocols, packet size, time-outs, may be different for each part
application application application rxmt transport transport transport network network network link link link physical physical physical wireless Split Connection Approach Per-TCP connection state TCP connection TCP connection
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 performanceachievable 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
39 40 38 37 FH BS MH 36 40 Split Connection Approach : Disadvantages • End-to-end semanticsviolated • 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
39 40 38 37 FH BS MH 36 40 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
39 40 38 37 FH BS MH 36 40 39 Hand-off 40 MH New base station 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
Split Connection Approach : Disadvantages • Buffer spaceneeded 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
Split Connection Approach : Disadvantages • Extra copying of data at BS • copying from FH-BS socket buffer to BS-MH socket buffer • increases end-to-endlatency • 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 data FH MH ack
Snoop Protocol • Retains local recovery of Split Connection approach and link level retransmission schemes • Improves on split connection • end-to-end semantics retained • soft state at base station, instead of hard state
application application application transport transport transport network network network link link link physical physical physical Snoop Protocol Per TCP-connection state TCP connection rxmt FH BS MH wireless
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 FH BS MH
Snoop : Example 35 TCP state maintained at link layer 36 37 38 40 39 38 37 FH BS MH 34 36 Example assumes delayed ack - every other packet ack’d
Snoop : Example 35 39 36 37 38 41 40 39 38 34 36
Snoop : Example 37 40 38 39 42 41 40 39 36 36 dupack Duplicate acks are not delayed
Snoop : Example 37 40 38 41 39 43 42 41 40 36 36 36 Duplicate acks
Snoop : Example 37 40 38 41 39 42 44 43 37 41 FH BS MH 36 36 Discard dupack Dupack triggers retransmission of packet 37 from base station BS needs to be TCP-aware to be able to interpret TCP headers 36
Snoop : Example 37 40 43 38 41 39 42 45 44 42 37 36 36 36 36
Snoop : Example 37 40 43 38 41 44 39 42 46 45 43 42 36 41 TCP sender does not fast retransmit 36 36 36
Snoop : Example 37 40 43 38 41 44 39 42 45 47 46 44 43 41 TCP sender does not fast retransmit 36 36 36 36
Snoop : Example 42 45 43 46 44 48 47 45 44 FH BS MH 41 43 36 36 36 36
Snoop 2 Mbps Wireless link
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
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)
Link Layer Mechanisms • Forward error correction (FEC) • quick recovery • Link level retransmission: Retransmit a packet at the link layer, if errors are detected • Retransmission overhead incurred only if errors occur