810 likes | 958 Views
5. TRANSPORT LAYER. 2. Reminder: TCP Protocol. Slow Start Congestion Avoidance (Control) Fast Retransmit Fast Recovery. TCP: Slow Start. Used when initiating a connection or after a timeout Set cwnd to 1 segment At each ACK , increase cwnd by 1 segment (exponential increase)
E N D
Reminder:TCP Protocol • Slow Start • Congestion Avoidance (Control) • Fast Retransmit • Fast Recovery
TCP:Slow Start • Used when initiating a connection or after a timeout • Set cwnd to 1 segment • At each ACK, increase cwnd by 1 segment (exponential increase) • Slow start is not slow! • Switch to congestion avoidance once cwnd is one half of what it was when congestion occurred • After each burst, increase cwnd by 1 segment (linear increase)
TCP:Congestion Control • Basic timeout and retransmission • If sender receives no ACK for data sent, timeout and retransmit • Go To Slow Start (Exponential back-off) • cwnd is one half of what it was when congestion occurred • Timeout value based on mean and variance of RTT
TCP:Congestion Avoidance (Control) • Uses congestion window (cwnd) for flow control • Cwnd set to 1/2 of its value when congestion loss occurred • Sender can send up to minimum of advertised window and cwnd • Then, additive increase cwnd (at most 1 at each RTT) • Careful way to approach limit of the network
TCP:Fast Retransmit and Fast Recovery • After three duplicate ACKs, assume packet loss, data still flowing • Sender resends missing segment • Set cwnd to ½ of current cwnd plus 3 segments • For each duplicate ACK, increment cwnd by 1 • When new data ACKed, do regular congestion avoidance
Overview of TCPSolutions for Wireless Networks Focus on eliminating the confusion between congestion loss and all other reasons Many approaches developed for single-hop wireless systems Snoop I-TCP M-TCP End to end SACK Explicit error notification Explicit congestion notification (e.g. RED) Several solutions for multi-hop A-TCP Freeze-TCP Applicability Clean Layering Improvement inEfficiency Layer Violations Trade-off 8
TCPProblems in WMNs Efficiency – TCP assumes that a missing (or late) ACK is due to network congestion and slows down: Rate drops quickly if the missing ACK shows up fast enough Rate drops to zero if it times out Causes for missing ACKs in WMNs: Wireless channel errors Broken routes due to mobility (both users and wireless routers) Delays due to MAC contention Interplay between MAC and TCP back-off mechanisms 9
Wireless Transport Layer Challenges • Low bandwidth: typical in wireless networks High efficiency requirement 10
Wireless Transport Layer Challenges • Large bandwidth-delay product (BDP):large end-to-end delay affects multihop wireless networks (WMNs) BDP requires large buffer at sender/receiver Large congestion window [1]: congestion window = n/4 (n=num of hops) maximizes TCP throughput in ideal conditions [2]: Alternative solution: split-connection protocols (BDP is small in each part) [1] Fu Z, Zerfos P, Luo H, Lu S, Zhang L and Gerla M “The impact of multihop wireless channel on TCP throughput and loss,” In Proc. of IEEE INFOCOM, 2003. [2] Balakrishnan H, Padmanabhan VN and Katz RH, “Network aymmetry: the effects of asymmetry on TCP performance,” ACM MONET Journal, Mobile Networks and Applications, 1999. 11
Wireless Transport Layer Challenges • Frequent Blackouts: such as link/route failures easily occur in wireless environment Differentiate packet losses due to congestion or unreliable link (non-congestion losses) [1]: Classical TCPs do not differentiate the losses throughput quick drop and slow recovery [2]: Mechanism for packet loss differentiation in TCPWMNs: WMNs avoid single-point-of-failure issue but link failures still occur due to wireless channels and mesh client mobility [3]: Explicit Link Failure Notification (ELFN) differentiates congestion losses and link failures [1] Xylomenos G, Polyzos GC, Mahonen P and Saaranen M, “ TCP performance issues over wireless links,”IEEE Communications Mag., 2001 [2] Chandran K, Raghunathan S and Prakash R, “A feedback-based scheme for improving TCP performance in ad hoc wireless networks,”IEEE Personal Communications, 2001. [3] Holland G and Vaidya NH, “Analysis of TCP performance over mobile ad hoc networks,” Proc. ACMMOBICOM, 1999. 12
Wireless Transport Layer Challenges • Dynamic Network Connectivity: • Variable link quality, fluctuating traffic load and user mobility cause large variations in the round-trip-time (RTT) calculations. RTT is critical for transport layer protocols, especially for TCP RTT Value: its measure is heavily affected by the end-to-end packet delay TCP Congestion Control: the timeout mechanism is based on the RTT value 13
Wireless Transport Layer Challenges • Network Asymmetry (BW, losses, latency) • Different paths for data and ACK packets or the same path in different time instants or different directions experience different packet bandwidth, loss rate and latency 14
Wireless Transport Layer Challenges • Possible Solutions for Network Asymmetry [1]: poor TCP performance in MANETs (e.g., ACK packet loss due to poor link in forward direction do not indicate congestion in reverse) [2]: definition of network asymmetry and proposed solutions such as ACK filtering, ACK congestion control, etc. [1] Xu S and Saadawi T, “Does the IEEE 802.11 MAC protocol work well in multihop wireless ad hoc networks,”IEEE Communications Mag., 2001 [2] Balakrishnan H, Padmanabhan VN and Katz RH, “Network asymmetry: the effects of asymmetry on TCP performance,”ACM MONET, Mobile Networks and Applications, 1999. 15
Wireless Transport Layer Challenges • Heterogeneity: - Wired and wireless networks - Network services vary from reliable datatransfer to real-time multimedia such as live video streaming. - Reliable transport for data; Timely delivery and smooth rate variation. • TCP Starvation by UDP traffic 16
Wireless Transport Layer Challenges • Possible Solutions for Heterogeneity Split one connection into two or more connections so that each of them experiences homogeneous network characteristics [1]: Indirect TCP, where one end-to-end connectionis split into a wired connection and a wireless connection and separate mechanism are applied for the transport protocol [2]: Snooping module in the network layer to add timeout or duplicate ACKs designed for one-hop wireless network connected to wired networks) [1] Bakre A and Badrinath BR, “I-TCP: indirect TCP for mobile hosts,” in Proc. 15th IEEEInt. Conf. on Distributed Computing Systems, 1995. [2] Balakrishnan H, Padmanabhan VN and Katz RH. “Network asymmetry: the effects of asymmetry on TCP performance,”ACM MONET, Mobile Networks and Applications, 1999 17
Wireless Transport Layer Challenges Unfairness Due to network layer unfairness Due to variation in round trip delays Likely both will be fixed if network layer fairness is ensured TCP IP DLC Unfair PHY 18
Wireless Transport Layer Challenges Unfair service between short and long flows: In WMNs, as the number of hops on a path increases, the probability of a link failure and consequent packet losses on the path increase. This implies that shorter flows enjoy an unfair advantage in throughput compared to longer flows. 19
Wireless Transport Layer Challenges • Effect of Multi-Channel Operations: • Interference levels or multi-path channel characteristics can be very different, which makes end-to-end rate adaptation and congestion control mechanisms inefficient for WMNs. 20
Network Congestion and Contention: End-to-end congestion control mechanisms cannot react quickly enough to transient congestion conditions because of unpredictable RTT delay between the sender and receiver. Network asymmetry and ACK bunching problem Wireless Transport Layer Challenges 21
Wrap Up: Transport Layer Challenges • Avoid TCP shortcomings while being TCP-compatible • Support real-time traffic in wireless mesh networks • Provide integration with other layers • Infer and react to observations at other layers • Consider the impact of mobility 22
Transport Layer Protocols for Reliable Data Transport • For WMNs same design guidelines and methodologies as in Multihop Ad Hoc networks • Large number of solutions proposed so far for Multihop Ad Hoc networks • Classification into two types • TCP variants • Entirely new transport protocols 23
TCP Variants • Classified intoseveral types: 1.Differentiation between packet losses and congestions 2. Window optimization 3. ACK optimization 4. Adaptive control of transmission rates 24
TCP VARIANTS 1.Differentiation between packet losses and congestions 1. Packet Loss vs Congestion: A packet loss due to congestion or to errors specific of a Multihop Ad Hoc network (e.g., low link quality, route failure, route change due to mobility, etc.) • Classical TCP scheme: • Packet loss always considered due to congestion invoke Congestion Control Mechanism • The frequent usage of the Congestion Control Mechanism degrades severely the performance A differentiation of the packet losses is needed 25
TCP VARIANTS: 1.Differentiation between packet losses and congestions Chandran K, Raghunathan S and Prakash R, “A feedback-based scheme for improving TCP performance in ad hoc wireless networks,” IEEE Personal Communications, 2001 • Solution 1:Detection of error events and feedback to the TCP sender TCP-Feedback (TCP-F) * Congestion/route failure handled separately * In case of route failure TCP-F explicitly informs the source * TCP-F detects the route failure in the networking layer as part of a routing protocol 26
TCP-FMechanism: 1.Differentiation between packet losses and congestions Chandran K, Raghunathan S and Prakash R, “A feedback-based scheme for improving TCP performance in ad hoc wireless networks,” IEEE Personal Communications, 2001 * A node detects a failure sends a route failure notification to the next-hop * When the source node receives the notification it stops sending packets and it enters a snooze state: 1. It freezes all timers and windows 2. It starts a route failure timer(according to the worst case of route re- establishment) * When the source node receives a route re-establishment message It stops the snooze state: 1. It flushes out unacknowledged packets (no wait for ACKs) 2.It falls back to standard TCP 27
TCP VARIANTS: 1.Differentiation between packet losses and congestions Holland G and Vaidya NH, “Analysis of TCP performance over mobile ad hoc networks,”in Proc. ACM MOBICOM, 1999. Explicit Link Failure Notification (ELFN) * Differentiates packet loss for congestion/link failure * In case of route failure ELFN notifies the sender (through ICMP or routing messages) similarly to TCP-F: • The sender disables the transmission timer and it enters the stand-by mode(a probe packet is sent periodically) 1. It sends a probepacket (to check if a new route has been established) 2. If the answer is positive it goes back to normal TCP state 28
TCP VARIANTS: 1.Differentiation between packet losses and congestions Dyer T and Boppana R, “A comparison of TCP performance over three routing protocols for mobile ad hoc networks,” Proc. of ACM MOBIHOC 2001. • Solution 2:Heuristic to distinguish route errors/congestion Fixed Retransmission TimeOut (Fixed RTO) * It does not rely on feedback from the lower layers * When RTOs occur consecutively without receiving ACKs: • The sender assumes that a route error has occurred 1. It transmits again the unacknowledged packet(without doubling the RTO) 2. RTO remains fixed untilthe route is re-established and the retransmitted packet is acknowledged 29
TCP VARIANTS: 1.Differentiation between packet losses and congestions Wang F and Zhang Y, “Improving TCP Performance over Mobile Ad Hoc Networks with Out-of-order Detection and Response,” in Proc. ACM MOBIHOC, 2002 • Solution 3:End-to-End Approach TCP Detection of Out of Order and Response (TCP DOOR) * Detection and response to out-of-order (OOO) delivery events * The detection of OOO events is performed at both ends (sender detects OOO ACK packets and receiver detects OOO data packets) * OOO events can be detected only after a route has been recovered from failures TCP DOOR is less accurate and responsivethan afeedback-based approach 30
TCP VARIANTS: 2. Window Optimization Fu Z, Zerfos P, Luo H, Lu S, Zhang L and Gerla M“The impact of multihop wireless channel on TCP throughput and loss,” Proc. of IEEE INFOCOM, 2003 TCP congestion control window is designed for wired networks no optimal for multihop wireless networks • Classical TCP scheme: • If 802.11 MAC layer in multihop wireless network rare buffer overflow, packet loss mainly by link-layer drops • TCP window usually adapted to the buffer-overflow, much different from link-layer drop behavior An adaptation of the TCP window to the link layer drop behavior is needed 31
TCP VARIANTS: 2. Window Optimization • Classical TCP window vs link-layer drop behavior: • When the TCP window is larger than W* the link-layer drop probability gradually increases • When the TCP window reaches a W > W* the link-layer drop probability saturates • When the TCP window is optimized at W* best TCP throughput • Classical window adaptation keeps increasing until W >> W* Causes much larger link-layer drop probability reduces TCP throughput 32
TCP VARIANTS: 2. Window Optimization Problems in computing an optimal TCP window 1) The window is related to the MAC behavior (multihop wireless network) 2) The optimized window of one flow may be impacted by other flows in the same network 3) The optimal window size is also related to the number of hops, routing paths, and other factors 33
TCP VARIANTS: 2. Window Optimization Fu Z, Meng X and Lu S, “A transport protocol for supporting multimedia streaming in mobile ad hoc networks,” IEEE Journal on Selected Areas in Communications, 2003 • Solution:Do not explicitly derive optimal window use indirect solution Link-Layer Random Early Detection (RED) and adaptive pacing • RED records MAC layer average retries • RED marks packets (dropped/marked) in the buffer accordingly • When average retries are > threshold adaptive pacing increases the backoff timer by the last transmission time of prev. packet • Better coordination among nodes • TCP window is as close to W* as possible 34
TCP VARIANTS: 3. ACK Optimization Tung L-P, Shih W-K, Cho T-C, Sun, YS and Chen MC, “TCP throughput enhancement over wireless mesh networks,” IEEE Communications Magazine, 2007 • In a wireless multihop network, - TCP ACKs interfer TCP data packets - too many TCP ACKs increase collisions (70% of collisions in TCP) • Classical TCP scheme: • If 802.11 MAC layer in multihop wireless network each node on the routing path tries to send one frame at a time • Spurious retransmissions from sender, more ACKs higher packet losses for collisions with ACK’s Limit the number of transmitted ACK’s 35
TCP VARIANTS: 3. ACK Optimization • Solution:Use cumulative ACKs or use a delayed-ACK scheme Scheme 1: Dynamic adaptive acknowledgement * Accumulates many delayed ACKs Scheme 2: Uses a dynamic reaction scheme * The timeout interval is adaptively adjusted by considering packet inter-arrival times • The receiver delays just enough time for ACKs • Avoid spurious retransmissions even with high delay variability (multihop wireless networks) 36
TCP VARIANTS 4. Adaptive control of transmission rates • When cumulative ACKs are used bursty transmissions • Classical TCP scheme: • Cumulative ACKs are desired in multihop wireless network • The congestion control at the sender can invoke bursty ACKs transmissions further contentions in the link layer A solution is needed to control the transmission rate 37
TCP VARIANTS 4. Adaptive Control of Transmission Rates ElRakabawy SM, Klemm A and Lindemann C, “TCP with adaptive pacing for multihop wireless networks”, Proc. ACM MOBIHOC, 2005 • Solution:Adjusts the transmission rate by considering several metrics TCP Adaptive Pacing (TCP-AP) uses three metrics: 1. Congestion window 2. Contention on the end-to-end path based on a co-efficient of RTT variations (cov RTT) 3. Spatial-reuse constraint (FHD) based on the 4-hop propagation delay (FHD) starting from the sender 38
TCP VARIANTS 4. Adaptive Control of Transmission Rates • TCP-AP (Adaptive Pacing) computes the inter-packet Delay (Dip) Dip = FHD(1 + 2 cov RTT ) • Dip becomes the timeout value of the pacing timer when timeout occurs: • Congestion window is checked for transmitting a new packet • A new packet is sent if possible, otherwise the TCP stay idle 39
TCP VARIANTS 4. Adaptive Control of Transmission Rates • TCP-AP: Hybrid scheme sender rate control & congestion control Advantages: • No impact on TCP end-to-end semantics • No changes required on lower layer protocols (routing, MAC) 40
ALTERNATIVE SOLUTION: Separate Sublayer for New TCP Functions Liu J and Singh S, “ATCP: TCP for mobile ad hoc networks,” IEEE Journals on Selected Areas in Communications, 2001 • TCP variants they may need undesired modifications to the standard TCP/IP protocol suite An intermediate protocol between TCP and the network layer Adaptive TCP (ATCP) protocol * Studied for mobile ad hoc network * Protocol between TCP and IP layers 41
ATCP utilizes network layer feedback (from the intermediate nodes) to take appropriate actionsNetwork feedback is:ICMP: The Destination Unreachable ICMP message indicates route disruption ECN: Indicates network congestionWith ECN enabled, time out and 3 dup ACKs are assumed to no longer be due to congestion ATCP Approach 42
RTO or 3rd dup ACK:Retransmits unACKed segmentsACK with ECN flag: Invokes congestion controlDestination Unreachable ICMP message: Stops transmission; Enter Persistent Mode Wait until a new route is found, resume transmissionATCP monitors TCP state and spoofs TCP in such a way to achieve the above behaviors TCP/ATCP Behavior 43
ATCP Liu J and Singh S, “ATCP: TCP for mobile ad hoc networks,” IEEE Journals on Selected Areas in Communications, 2001 * Goal: Avoid standard TCP being impacted by • Re-routing time out • Packet loss due to error • Out-of-order packet due to multipath routing • Network partitions 44
ATCP Functions 1. If network partition persistent state of TCP sender (no timeout start) 2. If packet loss due to error instead of congestion TCP sender retransmits packets (no congestion control) 3. If network congestion regular TCP congestion control * ATCP is supposed to know when a packet is lost for congestion or network errors and when there is network partition or route failure 45
- ATCP improves TCP performance- Maintains high throughput since TCP’s unnecessary congestion control is avoided- Saves network resources by reducing number of unnecessary re-transmissions- End-to-End TCP semantics are maintained ATCP is transparent Nodes with and without ATCP can set up TCP connections normally Advantages of ATCP 46
ALTERNATIVE SOLUTION: Ad hoc Transport Protocol (ATP) Sundaresan K, Anantharaman V, Hsieh H-Y and Sivakumar R, ATP: a reliable transport protocol for ad-hoc networks. Proc. ACM MOBIHOC, 2003 • An entirely new transport protocol compatibility issue for WMNs • E.g., ATP stand-alone wireless network assumption not valid for WMNs • WMNs integration with the Internet and many other wireless networks • Transport protocols for WMNs must be compatible with TCPs in other networks 47
ALTERNATIVE SOLUTION: Ad hoc Transport Protocol (ATP) Sundaresan K, Anantharaman V, Hsieh H-Y and Sivakumar R, ATP: a reliable transport protocol for ad-hoc networks. Proc. ACM MOBIHOC, 2003 • Many fundamental problems exist in TCP develop entirely new transport protocols for ad hoc networks Ad hoc Transport Protocol (ATP) • Rate-based transmission 1) Quick start initial rate estimation 2) Delay-based approach for congestion detection (no ambiguity on congestion/non-congestion losses) 3) No retransmission timeout 4) Decoupled congestion control and reliability • Better performance (e.g., delay, throughput, and fairness) than the TCP variants 48
Layer coordinationUses feedback from network nodes for congestion detection, avoidance, and controlRate based transmissionsAvoids impact of bursty trafficDecoupling of congestion control and reliability Ad Hoc Transport Protocol (ATP) 49
Congestion control uses feedback from the network; - Reliability is ensured through receiver feedback and selective ACK- Assisted congestion control- Adapts sending rate based on feedback from intermediate nodes- TCP friendliness and fairness achieved through feedback from intermediate nodes Ad Hoc Transport Protocol (ATP) 50