Sunteți pe pagina 1din 36

Mobile Transport Layer

Wireless Networks and Mobile Computing (CSI 5169)


Breeson Francis
March 2nd 2011

Outline
1. 2. 3. 4. 5. 6. Introduction to TCP TCP Mechanisms Problems in TCP Classical Approaches Latest Techniques References

Mobile Transport Layer

Introduction to TCP
TCP is a connection oriented protocol
3 way Hand-shake

TCP is a reliable protocol


achieved by means of retransmissions

TCP enables data to be received in an ordered way End-to-end semantics


Acknowledgements sent to TCP sender to confirm delivery of data received by TCP receiver Ack for data sent only after data has reached receiver

TCP detects data duplication TCP provides flow and congestion control

Mobile Transport Layer

Introduction to TCP (ctnd)


TCP Client/Server Connection
Client TCP SYN TCP SYN/ACK TCP ACK HTTP request HTTP response Data transmission HTTP response FIN ACK FIN ACK Connection Termination Connection setup Server

Mobile Transport Layer

TCP Mechanisms
Sliding Window
Offered Window

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Slow Start

Sent and ack received Sent, not acked Usable window Cant send until window moves

Is triggered at the beginning of connection or when a timeout(RTO) occurs Sender calculates congestion window for receiver Congestion window (cwnd) is set to 1 initially cwnd is increased exponentially for every ACK till ssthresh Slow start ends when cwnd reaches ssthresh, congestion avoidance then onwards

Mobile Transport Layer

TCP Mechanisms (ctnd)


Congestion Avoidance
cwnd increased 1 segment for each RTT (additive increase) Multiplicative decrease, cwnd set to 1/2 of its value when congestion loss occurs Sender can send up to minimum of advertised window and cwnd
14 12 10 8 6 4 2 0 0 1 2 3 4 5 6 7 8
Time (round trips)

Congestion Window size (segments)

Congestion avoidance

Slow start threshold


Slow start ssthresh = maximum of { min (cwnd, receivers advertised window)/2 and 2 segment size }

Mobile Transport Layer

TCP Mechanisms (ctnd)


Fast Retransmission and Fast Recovery
Fast retransmit occurs when a packet is lost, but latter packets get through When 3 or more dupacks are received, send the missing segment immediately Start congestion avoidance(Fast Recovery) The receiver got all packets up to the lost packet and is actually receiving packets cwnd not reduced to 1 MSS cwnd = ssthresh = current_cwnd / 2 + dup_acks * MSS

Mobile Transport Layer

Problems in Wireless Networks


Random Losses
Channel fading, high error, interfernce

Higher Link Latencies


Difficult to estimate time-out, RTT, bandwidth limitation Hand-Offs Mobile users switch base stations

Multipath Routing
Multiple paths lead to significant amount of out-of-order packets, which in turn generates duplicate acks

Asymmetric Channel Allocation


sending entity gets more channel time/bandwidth compared to the receiving entity resulting in queuing up of acknowledgements larger RTTs traffic becoming bursty in nature.

Mobile Transport Layer

Problems in Wireless Networks


Route Instability
Leads to OOO packets

Mobile Transport Layer

Problems in Wireless Networks


Network Partitioning
Exponential back off of TCPs RTO mechanism RTO doubled after every timeout Periods of inactivity even when the network is connected

Mobile Transport Layer

Classical Approaches
Split connection approach TCP-Aware link layer (Snooping) Feedback based mechanism

Mobile Transport Layer

Classical Approaches
Split Connection Approach
End-to-end TCP connection is broken into wired part and wireless part Connection between mobile host(MH) and fixed host(FH) through base station(BS) is split into 2 TCP connections

FH-MH = FH-BS + BS-MH


Fixed Host Access Point (Base Station) Mobile Host

Wired Network

Wireless TCP

Mobile Transport Layer

Classical Approaches
Split Connection Approach
Split connection results in independent flow/error control, packet size, timeouts at each part Optimized TCP protocol used in the wireless segment
TCP connection TCP connection

application transport network link physical FH

application transport network link physical BS

rxmt

application transport network link physical MH

wireless

Mobile Transport Layer

Classical Approaches
Split Connection Approach
Buffering at base station During hand-offs BSs should do state transfer along with the buffers
Access Point (BS1)

Fixed Host

Mobile Host

State Transfer

Wired Network

Access Point (BS2)

Mobile Transport Layer

Classical Approaches
Split Connection Approach
No changes to the fixed network Transmission errors on the wireless link do not propagate into the fixed network Retransmission at wireless segment can be done independent of wired segment, Fast

Loss of end-to-end semantics, an acknowledgement to a sender does not any longer mean that the intended receiver really got the packet Higher latency due to buffering at base station Increased hand-off latency BS Failure results in loss of data Buffers tend to get full due to slower wireless link

Mobile Transport Layer

Classical Approaches
Split Connection in multihop wireless network
Many short TCP connections between proxies along the connection

Mobile Transport Layer

Classical Approaches
Split Connection in multihop wireless network
Proxies buffer packets from the previous proxy or the source and acknowledges their receipt with Local Acknowledgements (LACKs) Any dropped packets are recovered from the most recent proxy but not from the source Enhance parallelism. Reduce bandwidth consumption on retransmission Optimal frequency of proxy placement is not clear

Mobile Transport Layer

Classical Approaches
TCP Aware Link Layer
Retains local recovery of Split Connection approach Improves on split connection end-to-end semantics retained soft state at base station, instead of hard state
TCP connection

application transport network link physical

application transport network link physical rxmt

application transport network link physical MH

FH

BS

wireless

Mobile Transport Layer

Classical Approaches
TCP Aware Link Layer
Buffers data at BS for link layer retransmission till ACK received When dupacks received by BS from MH, retransmit on wireless link Hides wireless losses from sender Prevents fast retransmit at sender TCP by dropping dupacks at BS Requires modification at BS only 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 same base station)

Mobile Transport Layer

Classical Approaches
Feedback based scheme in multihop wireless network

S A

Intermediate MH detects mobility of next MH along the path to destination Triggers Route Failure Notification(RFN) to source Each intermediate MH validates RFN and propagates to the source On receiving RFN, source Stops sending further packets Freezes all its timers Stores Window size and packets to be sent

Mobile Transport Layer

Classical Approaches
Feedback based scheme in multihop wireless network

S A

B E

C F

Source remains in the snoozed state until it receives Route Re-establishment(RRN) message A RRN is generated either by the node which generated RFN or an intermediate node which learned a new route to destination Source starts from the frozen state rather than restarting

Mobile Transport Layer

Classical Approaches
Feedback based scheme in multihop wireless network
TCP has to be modified Requires support from intermediate nodes Requires support from underlying routing protocol

Mobile Transport Layer

Latest Techniques

Modified Fast Retransmission Modified Congestion Control Mechanism Reduced Control Traffic

Mobile Transport Layer

Latest Techniques
Modified Fast Retransmission [1]
For detecting retransmission packet loss Max_Seq be the highest sequence number of packets sent by the sender Dupack_Lost be the duplicate ack of the packet that was lost. The outstanding number of packets in the network which were not acknowledged Net_Outstand = Max_Seq Dupack_Lost The sender retransmits the packet only after receiving three duplicate acks Loss detection point Loss_Detect_Point = Net_Outstand Three_Dupacks For every additional duplicate acknowledgement (Add_Dupacks) cwnd is increased by one mss and packet send if the new value of cwnd allows it.

Mobile Transport Layer

Latest Techniques
Modified Fast Retransmission [1]
If Add_Dupacks is greater than Loss_Detect_point, then that indicates that a new packet sent has reached the destination, whereas the retransmitted packet is lost. The TCP sender can retransmit the lost packet without waiting for the retransmission timeout.

Simple and efficient Requires changes at sending side only

Mobile Transport Layer

Latest Techniques
Modifying Congestion Control [3]
Bandwidth-Delay product, product of Link Bandwidth and Round Trip Time (RTT) It gives a clear picture of the network load Sender side continuously computes BandWidth Estimate (BWE) from Acks received Based on the packet loss indication ssthresh and cwnd are set as follows: If packet loss is detected by three duplicate ACKs then ssthresh = (BWE * RTTmin) / segment size cwnd = ssthresh if (cwnd > ssthresh) If packet loss is detected by timeout then cwnd = 1 ssthresh = max{(BWE*RTTmin) / segment size, 2}

Mobile Transport Layer

Latest Techniques
Modifying Congestion Control [3]
Instead of blindly reducing cwnd and ssthresh, current network condition taken into consideration Changes at sender side only

Mobile Transport Layer

Latest Techniques
Reducing Control Traffic [5]
To avoid hidden/exposed terminal problem 802.11 introduced RTS/CTS mechanism Considering basic rate of 1 Mbps for and data rate of 11 Mbps the overhead is 3SIFS+RTS+CTS+ACKmac = 414ms. Based on the above calculation time to send a 40 byte ACKtcp and 1040 byte data packets are 443 ms and 1170 ms Reduce ACKs! The receiver waits for ACK delay timeout to send the ACK leading to underutilization of the network.

Mobile Transport Layer

Latest Techniques
Reducing Control Traffic [5]
TCP sender to put the current value of cwnd in the option field of TCP header The receiver calculates the received-but-unacknowledged packets If equal to cwnd, it knows that the sender is waiting for an ACK to proceed with sending the remaining packets Sends an ACK immediately Self-triggered ACKs lessen the control traffic Leads to increased TCP throughput performance

Mobile Transport Layer

Conclusions
Scheme Sender Support Receiver Support Intermediate Node Support Routing Protocol Support

Split Connection TCP Aware Link Level Retransmission Feedback Mechanism Modified Fast Retransmission Modified Congestion Control Reduced Control Traffic

No No

No No

Yes. Transport Level Yes. Link Level

No No

Yes Yes Yes

No No No

Yes No No

Yes No No

Yes

Yes

No

No

Mobile Transport Layer

Questions
1. At time t, a TCP connection has a congestion window of 4000 bytes. The maximum segment size used by the connection is 1000 bytes. What is the congestion window after it sends out 4 packets and receives acks for all of them in one time window? Suppose there is one ack per packet. (a) If the connection is in slow-start? Ans. 8000 bytes. In slow start, the sender increases its window for each ack successfully received, in this case 4 acks are received. Therefore, congestion window = 4000 + 4 * 1000 = 8000 bytes. (b) If the connection is in congestion avoidance (linear mode)? Ans. 5000 bytes. The sender increases its window by one segment each time window, in this its once. Therefore, congestion window = 4000 + 1 * 1000 = 5000 bytes.

Mobile Transport Layer

Questions
2. A TCP machine is sending window of 10000 bytes over a 100 Mbps channel that has a 10 ms one-way delay. What is the maximum throughput achievable? What is the line efficiency? Ans. One window can be sent every 20 msec. This gives 50 windows/sec. Throughput achieved = 50 * 10000 bytes / sec = 500000 bytes / sec = 4 Mbps Line efficieny = 4 Mbps / 100 Mbps = 4 percent

Mobile Transport Layer

Questions
3. While it takes three segments to establish a TCP connection, it takes four to terminate a connection. Why? Ans. This is caused by TCP's half-close. Since a TCP connection is full-duplex (that is, data can be flowing in each direction independent of the other direction), each direction must be shut down independently. The rule is that either end can send a FIN when it is done sending data. When a TCP receives a FIN, it must notify the application that the other end has terminated that direction of data flow. The sending of a FIN is normally the result of the application issuing a close.

Mobile Transport Layer

[1] S. Prasanthi, S. Chung, C. Ahn, "An Enhanced TCP Mechanism for Detecting and Differentiating the Loss of Retransmissions over Wireless Networks", International Conference on Advanced Information Networking and Applications, 2011. [2] S. Prasanthi, S. Chung, An Efficient Algorithm for the Performance of TCP over Multi-hop Wireless Mesh Networks, Seventh International Conference on Information Technology 2010. [3] L. Yongmei, J. Zhigang, Z. Ximan, A New Protocol to Improve Wireless TCP Performance and Its Implementation, 5th International Conference on Wireless Communications, Networking and Mobile Computing, 2009. [4] I.A. Rai, T. Hellen, "On improving the TCP performance in asymmetric wireless mesh networks", International Conference on Communications, Computing and Control Applications (CCCA), 2011. [5] B. Chen, I. Marsic, R. Miller, Issues and Improvements in TCP Performance over Multihop Wireless Networks, IEEE Sarnoff Symposium, 2008. [6] T. Shikama, "Mitigation of Bursty Packets by a TCP Proxy improving TCP Performance in a Wired and Wireless Network", IEEE Globecom 2010 Workshop on Complex Communication Networks. [7] Nitin H. Vaidya, TCP for Wireless and Mobile Hosts. [8] Syed Natif Nawaz, Joseph Toney, Protocols for Improving Performance of TCP over Wireless Links. [9] Baruch Awerbuch, Dr. Amitabh Mishra, Transport Layer for Mobile Ad hoc Networks.

References

Mobile Transport Layer

Questions

Mobile Transport Layer

Alex

Bob

Casual Greeting

Thank You !
bfran097@uottawa.ca

Mobile Transport Layer

S-ar putea să vă placă și