TCP Over Wireless Network Jinhua Zhu Jie Xu
Overview 1. TCP congestion control scheme 2. ECN scheme 3. Problems with TCP over wireless network 4. ATCP:TCP for mobile ad hoc networks 5. ptcp: a transport layer approach for bandwidth aggregation on multi-homed mobile hosts 6. Conclusions 7. References
TCP Congestion Control Scheme 1. First, set cwnd (congestion window) to one segment and ssthresh(slow start threshold) to 65535. 2. Sender sends at most the minimum of cwnd and the receiver s advertised window. 3. When congestion occurs, retransmit the loss packet and set ssthresh to one half of the current window size. And if congestion is indicated by a timeout, cwnd is set to one segment.
Congestion Control Scheme (2) 4. When new data is acknowledged, increase cwnd. In slow start phase (cwnd<=ssthresh), increase cwnd by one segment for each ACK. In congestion avoidance phase (cwnd>ssthresh), incease cwnd by segsize*segsize/cwnd for each ACK, at most one segment each RTT. Note: for fast retransmit and fast recovery, see[1].
Congestion Control Scheme(3)
ECN (Explicit Congestion Notification) Scheme 1. Most current routers drop the packets to indicate congestion when their buffers are full. 2. ECN Scheme allows routers to use the Congestion Experienced (CE) bit in the package header as an indication for the detection of incipient congestion. 3. ECN needs 2 flag bits in IP layer and Transport layer respectively. IP layer: ECT (ECN-Capable Transport) bit (bit 6) CE bit (bit 7 of TOS flag) TCP layer: ECN-Echo flag (Bit 9 of reserved field) CWR (congestion window reduced) flag (bit 8)
ECN Scheme (2) ECT CE Note: In RFC791, bit 6 and 7 of TOS is reserved. In RFC1349, bit 6 is defined for Minimize Monetary Cost ; bit 7 is defined as MBZ (must be zero).
ECN Scheme (3) CWR ECN-Echo
ECN Scheme (4) (1) IP layer actions When a router detects the incipient congestion, it will set the CE bit in the IP header if ECT bit is set, otherwise drop the packet. When the queue is full, the router has to drop some packet when a new packet arrives. When a CE packet is received by a router, the CE packet is transmitted as usual with CE bit unchanged.
ECN Scheme (5) (2) TCP layer actions Initialization: Sender sends a TCP SYN packet with ECN-Echo and CWR flags (ECN capable) set in the header. Receiver sends a SYN-ACK packet with ONLY ECN- Echo flag (ECN capable) set in the header if it supports ECN.
ECN Scheme (6) TCP sender: Data Packets are transmitted with the ECT bit set in the IP header. When a sender receives an ECN-Echo ACK packet, it will treat it as a congestion control. It does not increase the CWN for ECN-Echo ACK and does not react to congestion more than once every RTT. However, if any retransmitted packets are dropped or have the CE bit set, it will interpreted it as a new instance of congestion. When a sender reduces its congestion, it sets the CWR flag in the TCP header of the first data packet sent after the window reduction.
ECN Scheme (7) TCP receiver: If a receiver receives a CE data packet, it sets the ECN-Echo flag in a series of ACK packets. It stops setting the flag when it receives a ECN-Echo flag.
ECN Scheme (8) Problems: (1) Not compatible with all TCP/IP implementation (2) DOS attacks: (ECT, CE) pair (a) SUBVERTING ECN-BASED CONGESTION CONTROL (1, 1) -> (1, 0); (1, 1) -> (0, *); (0, 1) -> (1, 1); (0, 0) -> (1, 0); (0, 1) -> (1, 0); (0, 0) -> (1, 1); (b) FALSELY REPORTING CONGESTION: (1, 0) -> (1, 1) (c) DISABLING ECN-CAPABILITY: (1, 0) -> (0, *)
Problems With TCP Over Wireless Network 1. Effect of High BER: Bit errors cause TCP data segments or ACKs lost. When ACKs do not return within RTO, the sender retransmits the segment, exponentially backs off its RTO (up to 64 seconds), and slow start again. Repeated errors result in low throughtput. 2. Effect of Disconnections Disconnections can be caused by a handoff, physical obstacles, or call blocking. These disconnections result in lost data segments and lost ACKs, and greatly reduce the efficiency of the connections.
Problems With TCP Over Wireless Network (Cont) 4. Effect of Frequent Disconnections Small cell sizes result in small cell latencies and cause frequent disconnections as a user roams. It may result in a serial timeouts. When the mobile is reconnected, no data is successfully transmitted for as long as 1 minutes!
Problems With TCP Over Wireless Network (cont) 4. Effect of Route Recomputations When an old route is no longer available, the network layer at the sender attempts to find a new route to destination. It is possible that discover a new route is longer than RTO and invokes congestion control.
Problems With TCP Over Wireless Network (cont) 4. Effect of Network Partitions The ad hoc network may periodically get partitioned for several seconds at a time. If the sender and the receiver lie in different partitions, the data packages and ACKs will get dropped and result in congestion control
Problems With TCP Over Wireless Network (cont) 5. Effect of Multipath Routing Some routing protocols maintain multiple routes between source destination pairs to minimize the frequency of route recomputation. This may results in a significant number of out-of-sequence packets arriving at the receiver, the receiver generating duplicate ACKs, and the sender invoking congestion control. S D
Approaches to Improve the TCP performance over wireless network High BER: Use FEC (Forward Error Correction), ARQ (Automatic Repeat request) in link layer or just retransmit lost packets without shrinking the cwnd. Delays due to Route Recomputation: Sender should stop transmitting and resume when a new route has been found. Disconnection: Sender stop transmitting until it is reconnected to the receiver. Multipath Routing: Sender should not invoke congestion control when receiving duplicate ACKS.
ATCP: TCP over Mobile Ad Hoc Network ATCP is a thin layer between IP and TCP that listens to the network state information provided by ECN and ICMP Destination Unreachable message and puts TCP sender into appropriate state.
DESIGN of ATCP ATCP has four possible states-normal, congested, loss and disconnected. When TCP connection is established, ATCP will be in the normal state.
DESIGN of ATCP (1) Lossy channel (high BER). (a) (b) (c) (d) ATCP in normal state counts the number of duplicate ACKs received for any segment. ATCP puts the TCP in persist mode if it receives the third duplicate ACK or finds out that TCP s RTO is about to expire. ATCP enters the loss state and retransmits the unacknowledged segments from TCP s sender buffer. If a new ACK arrive, it will forward the ACK to TCP which remove TCP from persist mode. ATCP returns to its normal state. Note: ATCP discard the probe packet from TCP.
DESIGN of ATCP (2) Congested: If ATCP receives a data packets with ECN-echo flag, it will move into congested state and do nothing. After TCP transmits a new segment, ATCP will return to its normal state.
DESIGN of ATCP (3) Disconnected: (a) (b) When ATCP receives an ICMP destination unreachable message, it puts TCP sender into persist mode and itself enters the disconnected state. When the receiver responds the probe packets, it will remove TCP from persist mode and moves ATCP back into normal state. Note: ATCP sets TCP s cwnd to one segment to force TCP to probe the correct value of CWND for the new route.
Performance of ATCP (1) Simulation Setup: (1) 5 hop network by 5 computers (2) 32kb/s IP data in each channel (3) BER= 10 5 (4) Introduce hop by hop delay by delaying ip_input (5) Network is simulate by intermediate node thinking its next hop is no longer valid. (6) Network congestion is made at the intermediate node by flooding it with spurious packets.
Performance(2): Loss Case
Performance (3): Congestion
Performance (4): Partition
Performance (5): Reordering
Performance (6): General
ATCP: Problems and Open Issues ATCP yields better performance comparatively to TCP, however the simulation scenario was somewhat special. (Neither wireless links nor ad hoc routing protocols were considered.) ECN-capable nodes might be hard to met. CWND value: OLD or NEW? Error detection: network or end node Cross layer design: MAC, routing and TCP Interoperation: mobile ad hoc network, cellular network, and wired network Power conservation in TCP layer
A Transport layer approach for Bandwidth Aggregation on Multihomed Mobile Hosts
Motivation A myriad of options for mobile users GPRS, 3G, 802.11, etc. Make the best out of co-existing technologies Vertical handoffs Bandwidth aggregation through multiple interfaces
Approaches for bandwidth aggregation-application layer (1) Basic mechanism One TCP socket for each interface Application level sequence numbers Application resequencing buffer Data striping based on send_buffer
Approaches for bandwidth aggregation-application layer (2) Key constraints Data rate differential Head-of-line blocking Persist timers Fluctuating data rates Defeating intelligent striping Bandwidth reduction making packets stuck in a pipe Blackouts Blackouts on one or a subset of the pipes stalling the entire aggregate connection Application complexity Resequencing mechanism Bandwidth estimation for intelligent striping Feedback mechanism to fight blackouts Multiple congestion control schemes
Approaches for bandwidth aggregation-link layer Basic mechanism Spreading data onto multiple physical links to present a single high bandwidth logical link Link layer striping Traditional link layer striping Stable link characteristics Adaptive striping for wireless WWANs Not applicable to a scenario of different access networks Generic channel striping Knowledge of channel capacity a priori Packet loss induced loss of synchronization
Approaches for bandwidth aggregation- Transport layer The parallel TCP (ptcp) Congestion window based data striping Mobile hosts with multiple wireless interfaces The Reliable Multiplexing Transport Protocol (R-MTP) Explicit bandwidth based striping Mobile hosts with multiple wireless interfaces
ptcp design Decoupled flow control and congestion control Maintaining and controlling a single send buffer for all the TCP-v pipes Individual congestion control and loss recovery Congestion window based data striping Data given by ptcp to TCP-v only when there is space in its congestion winodw Dynamic reassignment during congestion ptcp unbinding the data bound to the sequence numbers of the concerned pipe with reduced congestion window size Redundant striping for blackouts Redundantly striping the first MSS in a congestion window suffering a timeout to another pipe Selective acknowledgments Faster loss recovery in the face of multiple dropped segments in one window
ptcp (1)- overview and data structure Application write read ptcp Open/close Bindings Established/closed TCP-v Active pipes Send buffer Recv buffer receive send resume Virtual send buffer Virtual recv buffer IP-output shrunk ptcp-recv IP
ptcp (2) basic operations Application data writes served Copied into send_buffer ptcp resumes active TCP-v pipes TCP-v removed from the list of active pipes TCP-v builds regular TCP header Send the header to ptcp ptcp binds the header to an unbounded data segment to the TCP header bindings maintains the data binding information
ptcp (3) basic operations ptcp header appended ptcp is a wrapper ptcp segment sent to IP resumed TCP-v continues to send regular TCP headers While there is space in the congestion window of that TCP-v pipe ptcp binds data or freeze the pipe concerned adds the TCP-v pipe to active-pipes in the latter case
ptcp (4) basic operations ptcp ACK received Strips the ptcp header and application data, TCP-v header remains The regular TCP header received by appropriate TCPv pipes Updating virtual TCP-v buffers Congestion window adjusted TCP-v informs ptcp of the change in congestion window TCP-v reset to active TCP-v has space in congestion window, but no unbound data left in ptcp
ptcp(5) TCP-v interface Open() Close() Established() Closed() Receive() ptcp hands TCP-v header to the pipe Send() TCP-v sends virtual segment to ptcp Resume() ptcp informs TCP-p of available data to send Shrunk() TCP informs ptcp of changes in congestion window size
ptcp(6) ptcp header format 32 bits 15 16 Source Identifier (psrc) Destination Identifier (pdst) Sequence Number (pseq) Acknowledgement Number (pack) Number of Tx Pipes (ntx) Number of Rx Pipes (nrx) IP Address 1 IP Address 2 regular fields extra fields
ptcp(7) regular ptcp header psrc: source connection identifier pdst: destination connection identifier pseq: ptcp sequence number Sequence number at the aggregate connection level pack: ptcp acknowledgement number ptcp reuses TCP window size advertisement field Flow control by ptcp
ptcp(8) extra ptcp header ntx: number of transmitting interfaces nrx: number of receiving interfaces iprx: IP addresses corresponding to nrx iptx: IP addresses corresponding to ntx
ptcp(9) connection establishment open socket Host1 SYN, ntx = nif(tcp-v1) Host2 send data SYN+ACK, nrx = nif(tcp-v1) ACK(TCP-v1) first pipe established/(connect ion established) all pipes established
ptcp (10) congestion control and flow control Congestion control: TCP-v level Multiple congestion control mechanisms allowed ECN Regular TCP congestion control Flow control: ptcp level ptcp controlled receive buffer Shared usage of buffer according to the bandwidth-delay product of individual TCP-v pipes ptcp controlled data transmission Advertised window size of each pipe is the same as the available space of ptcp receive buffer
ptcp simulation results (1) Simulation setting Simple network topology WLAN link WWAN link Comparison The unaware application striping approach The smart application striping approach Striping ratio based on average bandwidths ptcp ideal bandwidth aggregation
ptcp simulation results (2) Scalability with rate differential
ptcp simulation results (3) Scalability with multiple links
ptcp simulation results (4) Impact of fluctuations
ptcp simulation results (5) Impact of fluctuations
ptcp simulation results (6) Comparison of impacts of blackouts
ptcp simulation results (7) Multiple congestion control schemes
Open issues Congestion window based striping Rational behind that approach Congestion window is a tight approximation of the available bandwidth-delay product Complexity Reassignment of data due to change in congestion window size of a TCP-v pipe
Conclusions: TCP congestion Control Scheme ECN Scheme Problems with TCP over wireless network ATCP ptcp
References [1] W. Stevens, TCP slow start, congestion avoidance, fast retransmit, and fast recovery algorithms, IETF RFC 2001, Jan. 1997 [2] George Xylomenos and etc, TCP performance issues over wireless links, IEEE communications magazine, April 2001 [3] V. Paxson and etc, Computing TCP s Retransmission Timer, IETF RFC2988, Nov. 2000 [4] Kevin Brown and Suresh Singh, M-TCP: TCP for Mobile Cellular Networks, ACM comput. Commun. Rev., Vol.27, No.5,1997 [5] Jian Liu and Suresh Singh, ATCP: TCP for Mobile Ad Hoc Networks, IEEE Journal on Selected Areas in Communications, Vol.19, No.7, July 2001 [6] K. Ramakrishnan and S. Floyd, A Proposal to add Explicit Congestion Notification (ECN) to IP, RFC2481, January 1999
References [7] Ruy de Oliveira and Torsten Braun, TCP in Wireless Mobile Ad Hoc Networks, IAM-02-003, July 2002 [8] M. Stemm, R. Katz, Vertical handoffs in wireless overlay networks. Mobile Networks and Applications, 3(4): 335-350, 1998 [9] H.Y. Hsieh, R. Sivakumar, A Transport Layer Approach for Achieving Aggregate Bandwidths on Multi-homed Mobile Hosts, ACM MobiCom 02, 2002, Atlanta, Georgia. [10] L. Magalhaes, R. Kravets, Transport level mechanisms for bandwidth aggregation on mobile hosts, IEEE ICNP, Riverside, CA, 2001 [11] C. B. Traw, and J. Smith, Striping within the network subsystem, IEEE Network Magazine, 9(4): 22-32, July 1995. [12] M. Mathis, J. Mahdavi, S. Floyd, and A. Romanow. TCP selective acknowledgement options, IETF RFC 2018, Oct