Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Wireless & Mobile Networking CS 752/852 - Spring 2011 PowerPoint Presentation
Download Presentation
Wireless & Mobile Networking CS 752/852 - Spring 2011

Wireless & Mobile Networking CS 752/852 - Spring 2011

117 Vues Download Presentation
Télécharger la présentation

Wireless & Mobile Networking CS 752/852 - Spring 2011

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Wireless & Mobile NetworkingCS 752/852 - Spring 2011 Wireless TCP Tamer Nadeem Dept. of Computer Science

  2. The OSI Communication Model

  3. Recall 1: PHY and MAC MAC MAC PHY PHY • Spread Spectrum radios (DS and FH) • RTS/CTS and Carrier Sensing for Hidden Terminals • Directional antennas to reduce interference • Rate control to extract max capacity from available SINR • Power control for spatial reuse & energy savings – topology control • TDMA scheduling, multi-channel use, encryption security • … and many more

  4. Routing Routing Routing Routing Routing Recall 2: Network Layer • The first view of the network • Coping up with (uncontrolled) user mobility • Flooding the network reactively, or proactive updation • Mobile IP, coping with handoffs, etc. • Ad hoc routing – discovery, optimal metric, maintenance, caching • Secure routing – Routes bypassing malicious nodes

  5. TCP TCP Role of Transport Layer Data NETWORK Data Data • Transport packets quickly and reliably over this network • Network properties often unknown (or difficult to track) • Where is the congestion ? How much cross traffic ? • What is the bottleneck bandwidth ? • How much buffers at intermediate nodes ? •  Motivation for end to end TCP

  6. Stop & Wait Pipelined Go Back N Selective Repeat Some transmission methods

  7. Stop-and-wait operation sender receiver first packet bit transmitted, t = 0 last packet bit transmitted, t = L / R first packet bit arrives RTT last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R

  8. Pipelining: sender allows multiple, “in-flight”, yet-to-be-acknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver Two generic forms of pipelined protocols: go-Back-N, selective repeat Pipelined protocols

  9. Pipelining: increased utilization sender receiver first packet bit transmitted, t = 0 last bit transmitted, t = L / R first packet bit arrives RTT last packet bit arrives, send ACK last bit of 2nd packet arrives, send ACK last bit of 3rd packet arrives, send ACK ACK arrives, send next packet, t = RTT + L / R Increase utilization by a factor of 3!

  10. Sender: k-bit seq # in pkt header “window” of up to N, consecutive unack’ed pkts allowed Go-Back-N • ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK” • may receive duplicate ACKs • timer for each in-flight pkt • timeout(n): retransmit pkt n and all higher seq # pkts in window

  11. GBN inaction

  12. receiver individually acknowledges all correctly received pkts buffers pkts, as needed, for eventual in-order delivery to upper layer sender only resends pkts for which ACK not received sender timer for each unACKed pkt sender window N consecutive seq #’s again limits seq #s of sent, unACKed pkts Selective Repeat

  13. Selective repeat: sender, receiver windows

  14. data from above : if next available seq # in window, send pkt timeout(n): resend pkt n, restart timer ACK(n) in [sendbase,sendbase+N]: mark pkt n as received if n smallest unACKed pkt, advance window base to next unACKed seq # receiver sender Selective repeat pkt n in [rcvbase, rcvbase+N-1] • send ACK(n) • out-of-order: buffer • in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt pkt n in [rcvbase-N,rcvbase-1] • ACK(n) otherwise: • ignore

  15. Selective repeat in action

  16. TCP

  17. TCP Congestion Control • Problem Definition • How much data should I pump into the network to ensure • Intermediate router queues not filling up • Fairness achieved among multiple TCP flows • Why is this problem difficult? • TCP cannot have information about the network • Only TCP receiver can give some feedbacks

  18. The Control Problem • Two main components in TCP • Flow Control and Congestion Control • Flow Control • If receiver’s bucket filling up, pour less water • Congestion Control • Don’t pour too much if there are leaks in intermediate pipes • Regulate your flow based on how much is leaking out • Aggressive pouring  calls for retransmission of lost packets • Conservative pouring  lower e2e capacity • Challenge: At what rate(t) should you pour ?

  19. The TCP Protocol (in a nutshell) • T transmits few packets, waits for ACK • Called slow start • R acknowledges all packet till seq #i by ACK i (optimizations possible) • ACK sent out only on receiving a packet • Can be Duplicate ACK if expected packet not received • ACK reaches T  indicator of more capacity • T transmits larger burst of packets (self clocking) … so on • Burst size increased until packet drops (i.e., DupACK) • When T gets DupACK or waits for longer than RTO • Assumes congestion  reduces burst size (congestion window)

  20. time TCP Timeline Host A Host B Think of a blind person trying to stand up in a low ceiling room Objective: Don’t bang your head, but stand up quickly one segment RTT two segments four segments

  21. When waited for > RTO After RTO timeout cwnd = 20 ssthresh = 10 ssthresh = 8

  22. The TCP Protocol (in a nutshell) • DupACK not necessarily indicator of congestion • Can happen due to out of order (OOO) delivery of packets • If 3 OOO pkts, then CW need not be cut drastically • The DupACK packet retransmitted • Continue with same pace of transmission as before (fast recovery) • R advertizes its receiver window in ACKs • If filling up, T reduces congestion window

  23. Fast Recovery on 3 OOO DupACKs After fast recovery Receiver’s advertized window

  24. TCP Round Trip Time and Timeout EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT • Exponential weighted moving average • influence of past sample decreases exponentially fast • typical value:  = 0.125

  25. Example RTT estimation:

  26. Setting the timeout EstimtedRTT plus “safety margin” large variation in EstimatedRTT -> larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: TCP Round Trip Time and Timeout DevRTT = (1-)*DevRTT + *|SampleRTT-EstimatedRTT| (typically,  = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT

  27. Several flavors of TCP: combines options / optimizations Reno, Vegas, Eifel, Westwood … Overall TCP has worked well – proven on the internet Then why study it again for wireless networks ?

  28. Renewed Challenge • Key assumption in TCP • A packet loss is indicative of network congestion • Source needs to regulate flow by reducing CW • Assumption closely true for wired networks • BER ~ 10 -6 • With wireless, errors due to fading, fluctuations • Need not reduce CW in response … • But, TCP is e2e  CANNOT see the network • Thus, TCP cannot classify the cause of loss  CHALLENGE

  29. application application application transport transport transport network network network rxmt link link link physical physical physical wireless The Problem Model TCP connection Wireline

  30. Impact of Misclassification Best possible TCP with no errors (1.30 Mbps) TCP Reno (280 Kbps) Sequence number (bytes) Time (s) 2 MB wide-area TCP transfer over 2 Mbps WaveLAN

  31. The Solution Space • Much research on TCP over wireless • Difficult to cover complete ground • We peek into some of the key ideas • Link layer mechanisms • Split connection approach • TCP-Aware link layer • TCP-Unaware approximation of TCP-aware link layer • Explicit notification • Receiver-based discrimination • Sender-based discrimination

  32. Link Layer Mechanisms

  33. 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 require no change in TCP Is that breaking e2e argument ??

  34. Issues with Link Layer Mechanisms • Link layer cannot guarantee reliability • Have to drop packets after some finite limit • What is the retransmission limit (??) • Retransmission can take quite 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

  35. Findings • Link layer retransmission good • When channel errors infrequent • When retransmit time << RTO • When modifying TCP is not an acceptable solution

  36. Split Connection Approach

  37. application application application rxmt transport transport transport network network network link link link physical physical physical wireless 1 TCP = ½ TCP + ½ (TCP or XXX) Per-TCP connection state TCP connection TCP connection Base Station

  38. 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

  39. Issues with Splitting • E2E totally broken • 2 separate connections • 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 • What if Data and ACK travel on different routes ? • BS will not see the ACK at all – splitting not feasible

  40. TCP-Aware Link Layer

  41. Snoop • Link layer at BS buffers un-acknowledged packets • Now, BS peeks into every returning TCP ACK from MH • If DupACK • Retransmits the necessary packet • Drops the DupACK • DupACK does not reach sender • Prevents fast retransmit

  42. 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

  43. Snoop : Example 35 39 36 37 38 41 40 39 38 34 36

  44. Snoop : Example 37 40 38 39 42 41 40 39 36 36 dupack Duplicate acks are not delayed

  45. Snoop : Example 37 40 38 41 39 43 42 41 40 36 36 36 Duplicate acks

  46. 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

  47. Snoop : Example 37 40 43 38 41 39 42 45 44 42 37 36 36 36 36

  48. 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

  49. 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

  50. Snoop : Example 42 45 43 46 44 48 47 45 44 FH BS MH 41 43 36 36 36 36