TCP over
Wireless Networks
Raj Jain
Professor of Computer Science and Engineering
Washington University in Saint Louis
Saint Louis, MO 63130
Audio/Video recordings of this lecture are available at:
http://www.cse.wustl.edu/~jain/cse574-10/
Washington University in St. Louis
CSE574s
20-1
2010 Raj Jain
Overview
TCP Congestion Mechanisms
Our Initial Research on TCP Congestion
TCP Over Wireless: Issues and Solutions
TCP over Satellite
Our research on TCP over Satellite and Wireless
Washington University in St. Louis
CSE574s
20-2
2010 Raj Jain
Research on Congestion Control
1Mbps 1Mbps 1Mbps
Time=6 minutes
1Mbps 10Mbps 1Mbps
Time=6 hours
Bit in header
Early 1980s Digital Equipment Corporation (DEC) introduced Ethernet
products
Noticed that throughput goes down with a higher-speed link in middle
(because no congestion mechanisms in TCP)
Results:
1. Timeout Congestion
Reduce the TCP window to one on a timeout [Jain 1986]
2. Routers should set a bit when congested (DECbit).
[Jain, Ramakrishnan, Chiu 1988]
3. Introduced the term Congestion Avoidance
4. Additive increase and multiplicative decrease (AIMD principle)
[Chiu and Jain 1989]
There were presented to IETF in 1986.
Slow-start based on Timeout and AIMD [Van Jacobson 1988]
Washington University in St. Louis
CSE574s
20-3
2010 Raj Jain
AIMD Principle
Additive Increase, Multiplicative
Decrease
W1+W2 = Capacity
Efficiency,
C
W1=W2 Fairness
(W1,W2) to (W1+DW,W2+DW)
Linear increase (45 line)
(W1,W2) to (kW1,kW2)
Multiplicative decrease
(line through origin)
W2
Efficient
W1
Fair
Capacity
Ref: D. Chiu and Raj Jain, "Analysis of the Increase/Decrease Algorithms for
Congestion Avoidance in Computer Networks," Journal of Computer
Networks and ISDN, Vol. 17, No. 1, June 1989, pp. 1-14,
http://www.cse.wustl.edu/~jain/papers/cong_av.htm
Washington University in St. Louis
CSE574s
20-4
2010 Raj Jain
Slow Start Congestion Control
Window = Flow Control Avoids receiver overrun
Need congestion control to avoid network overrun
The sender maintains two windows:
Credits from the receiver
Congestion window from the network
Congestion window is always less than the receiver window
Starts with a congestion window (CWND) of 1 segment (one
max segment size)
Do not disturb existing connections too much.
Increase CWND by 1 MSS every time an ack is received
Washington University in St. Louis
CSE574s
20-5
2010 Raj Jain
Slow Start (Cont)
If segments lost, remember slow start threshold
(SSThresh) to CWND/2
Set CWND to 1 MSS
Increment by 1 per ack until SSthresh
Increment by 1 MSS/CWND per ack afterwards
Congestion
Window
CWND
Timeout
SSThresh
Receiver Window
Idle
Interval
1
Washington University in St. Louis
CSE574s
20-6
Time
2010 Raj Jain
Slow Start (Cont)
At the beginning, SSThresh = Receiver window
After a long idle period (exceeding one round-trip
time), reset the congestion window to one.
Exponential growth phase is also known as Slow
start phase
The linear growth phase is known as congestion
avoidance phase
Washington University in St. Louis
CSE574s
20-7
2010 Raj Jain
Fast Recovery
Optional implemented in TCP Reno
(Earlier version was TCP Tahoe)
Duplicate Ack indicates a lost/out-of-order segment
On receiving 3 duplicate acks:
Enter Fast Recovery mode
Retransmit missing segment
Set SSTHRESH=CWND/2
Set CWND=SSTHRESH+3 MSS
Every subsequent duplicate ack: CWND=CWND+1MSS
Washington University in St. Louis
CSE574s
20-8
2010 Raj Jain
Problems of Current TCP
TCP cannot distinguish wireless errors from congestion.
Frequent errors Frequent window reductions
Low throughput
On CDMA, Overload Errors. Otherwise no relationship.
Sender
Receiver
Error or Congestion
Duplicate acks
Reduced window
Washington University in St. Louis
CSE574s
20-9
2010 Raj Jain
TCP Over Wireless
1.
2.
3.
4.
5.
6.
Link Layer Mechanisms
Split TCP Solutions
TCP Aware Link Layer Protocols
Explicit Notification Schemes
TCP Over Satellite
Our Results for Satellite and Wireless Networks
Washington University in St. Louis
CSE574s
20-10
2010 Raj Jain
1. Link Layer Mechanisms
Forward Error Correction (FEC):
Reduces loss due to errors.
Reduced link throughput even if no errors.
Automatic Repeat Request (ARQ):
Link layer retransmission and acknowledgement
No reduction in throughput if no errors
Reduced throughput and increased delay at link layer
May cause congestion
May increase variance of RTT Increased RTO
Receiver 1
May cause head-of-line blocking
Receiver 2
Adaptive Link layer strategies:
Dynamically vary FEC code, retransmission limit, frame size
Washington University in St. Louis
CSE574s
20-11
2010 Raj Jain
2. Split TCP Solutions
Indirect TCP
Selective Repeat Protocol (SRP)
Mobile TCP
Mobile-End Transport Protocol
Washington University in St. Louis
CSE574s
20-12
2010 Raj Jain
Indirect TCP
Fixed
Host
Base
Station
Mobile
Host
Two TCP connections:
Fixed host to Base
Base to Mobile
Independent flow control on two connections
Packets buffered in the base
Ack at sender MH has received
Violates TCPs end-to-end semantics
BS retains hard state. BS failure loss of data
On handoff, stored packets must be sent to new BS
Does not work if connection not bi-directional. E.g.,
satellites
Reference: Bakre95, Bakre 97
Washington University in St. Louis
CSE574s
20-13
2010 Raj Jain
3. TCP Aware Link Layer Protocols
Snoop Protocol
WTCP
Delayed DupAcks Protocol
SCPS-TP
Washington University in St. Louis
CSE574s
20-14
2010 Raj Jain
Snoop Protocol
Split connection and link level retransmission
Base monitors returning acks. Retransmits on duplicate acks
and drops the duplicate ack
Advantages: Only soft state at BS. Only BS modified. No
changes to FH or MH.
If wireless link delay is less than 4 packets, 3 duplicate acks
will not happen and a simple link-level retransmission without
dropping duplicate ack will also work.
Disadvantages: Does not work with encrypted packets
Does not work on asymmetric paths
Ref: Balakrishnan95
Washington University in St. Louis
CSE574s
20-15
2010 Raj Jain
4. Explicit Notification Schemes
Explicit Loss Notification
Explicit Loss Notification 2
Explicit Bad State Notification
Partial Ack Protocols
Washington University in St. Louis
CSE574s
20-16
2010 Raj Jain
Explicit Loss Notification
Works with Mobile host sources
First link on the path is wireless
BS keeps track of missing packets from mobile
When DupAcks is received, BS sets ELN bit in the DupAcks
When mobile receives the DupAcks with ELN bit, it does not
back off. Simply retransmits.
Reference: Balakrishnan98
Washington University in St. Louis
CSE574s
20-17
2010 Raj Jain
5. TCP Over Satellite
IETF TCPSAT
Satellite Transport Protocol (STP)
Early Acks: ACKprime
Washington University in St. Louis
CSE574s
20-18
2010 Raj Jain
IETF TCPSAT
Large propagation delays => Large bandwidth delay product
=> Large windows => Use window scaling option
Window = window * 2 Scaling factor
Use Selective acknowledgements
=> Allows multiple packets to recovered in one RTT
Do not delay acks => Ack every packet
Use larger initial window size (suggested 4kB)
Byte Counting: Increase window by number of bytes acked
rather than just 1 MSS per RTT
Reduce bursts from the sender
Ref: RFC 2488, 2760
Washington University in St. Louis
CSE574s
20-19
2010 Raj Jain
6. Our Results for Satellite Networks
End System Improvements:
Slow start
Fast Retransmit and Recovery
New Reno
SACK
Intermediate System Improvements: Drop policies
For satellite paths, end system improvements have more impact
than intermediate-system based improvements
SACK helps significantly
Fairness depends upon the drop policies in the intermediate
systems and not on end system policies
Washington University in St. Louis
CSE574s
20-20
2010 Raj Jain
Wireless Networks: Our Solution
sender
receiver
router
Desired Attributes of the Solution:
1. Must maintain TCPs end-to-end semantics: A packet is acked
only after received by the final destination.
2. Modifications must be local: Only Base Station (BS) and
Mobile Host (MH) are in the control of wireless service
provider. Cannot change all locations that MH visits.
3. Must apply to two-way traffic: MH can be both a sender and a
receiver.
4. Wireless links can be at the end or in the middle (satellite
links)
Ref: Liu and Jain 2003
Washington University in St. Louis
CSE574s
20-21
2010 Raj Jain
Congestion Coherence
Congestion does not happens nor disappear suddenly:
Before congestion reaches the point where a packet has to be
dropped, some packets must have been marked.
After a packet is lost, some packets will be marked.
Lost
sender
receiver
router
Marked congestion
Unmarked Error
Q_len
Q_len
Drop
Drop
Mark
Mark
time
Washington University in St. Louis
CSE574s
20-22
time
2010 Raj Jain
Congestion Coherence Algorithm
Link layer acks and retransmissions at all wireless nodes.
Receiver:
Out-of-order packets received check ECN bits.
If any packet marked, send duplicate acks Otherwise, defer the duplicate
acks.
If expected packet arrives, drop deferred dupacks.
If the packet times out, release all deferred dupacks.
Sender:
When the third duplicate acks arrives, MH checks the ECN-ECHO bits.
If any of thee duplicate acks carry an ECN-ECHO, MH retransmits the
lost packet and reduces the window. Otherwise, TCP defers the
retransmission.
When the expected ack arrives, cancel the deferred retransmission.
If the expected ack does not arrive in certain period of time then MH
starts the deferred retransmission.
Washington University in St. Louis
CSE574s
20-23
2010 Raj Jain
Goodput
80000
Number of Packets Acked
70000
60000
TCP
50000
DDA
40000
ECN
30000
Snoop
CC
20000
10000
0
0.001
0.01
0.1
Packet Error Rate
Congestion Coherence provides the highest
throughput
Washington University in St. Louis
CSE574s
20-24
2010 Raj Jain
Summary
Frequent errors on wireless links trigger the congestion
mechanism in TCP resulting in low throughput
Key mechanisms are link level schemes to reduce/hide error
losses, split TCP, TCP modification in base, receiver, or sender
Since congestion builds up slowly, coherence of ECN bits
provides a good distinction of congestion vs. errors
On satellite links, window scaling, large initial windows, and
SACK are helpful
Washington University in St. Louis
CSE574s
20-25
2010 Raj Jain
Homework 20
Exercise: A TCP entity opens a connection and uses slow start.
Approximately how many round-trip times are required before
TCP can send N segments.
Hint: Write down what the CWND and total segments
will be after 1 round trips, 2 round trips, 3 round trips,
Washington University in St. Louis
CSE574s
20-26
2010 Raj Jain
Related Wikipedia Articles
http://en.wikipedia.org/wiki/Explicit_Congestion_Notification
http://en.wikipedia.org/wiki/FAST_TCP
http://en.wikipedia.org/wiki/Network_congestion_avoidance
http://en.wikipedia.org/wiki/Slow-start
http://en.wikipedia.org/wiki/Space_Communications_Protocol_
Specifications
http://en.wikipedia.org/wiki/TCP_Westwood_plus
http://en.wikipedia.org/wiki/TCP_congestion_avoidance_algori
thm
http://en.wikipedia.org/wiki/TCP_window_scale_option
http://en.wikipedia.org/wiki/Taxonomy_of_congestion_control
http://en.wikipedia.org/wiki/Transmission_Control_Protocol
http://en.wikipedia.org/wiki/WTCP
Washington University in St. Louis
CSE574s
20-27
2010 Raj Jain
References
C. Liu and R. Jain, "Approaches of Wireless TCP Enhancement and A New
Proposal Based on Congestion Coherence", the 36th Hawaii International
Conference on System Sciences, Quality of Service in Mobile and Wireless
Network minitrack, Big Island, Hawaii, January 5-9, 2003, pp. 307a,
http://www.cse.wustl.edu/~jain/papers/hicss.htm
This paper also has references to several other papers on wireless.
Nitin Vaidya, TCP for Mobile and Wireless Hosts, a comprehensive
tutorial presentation, 291 pp., http://www.crhc.uiuc.edu/~nhv/seminars/tcpwireless-tutorial.ppt
Annika Wennstrom, Stefan Alfredsson, and Anna Brunstrom, TCP over
Wireless Networks, http://kau.divaportal.org/smash/get/diva2:5466/FULLTEXT01
Read sections 9.1 through 9.6 of Murthy and Manoj
Washington University in St. Louis
CSE574s
20-28
2010 Raj Jain
List of Acronyms
AIMD
ARQ
BS
CDMA
CWND
EBSN
ECN
ELN
FEC
FRR
IETF
LAN
MH
MSS
RFC
Additive increase and multiplicative decrease
Automatic Repeat Request
Base Station
Code Division Multiple Access
Congestion Window
Explicit bad state notification
Explicit Congestion Notification
Explicit Loss Notification
Forward Error Correction
Fast Retransmit and Recovery
Internet Engineering Task Force
Local Area Network
Mobility Header
Maximum Segement Size
Request for Comments
Washington University in St. Louis
CSE574s
20-29
2010 Raj Jain
List of Acronyms (Cont)
RTT
SACK
SCPS
SRP
STP
TCP
WTCP
Round Trip Time
Selective Acknowledgement
Space Communications Transport Protocol
Selective Repeat Protocol
Satellite Transport Protocol
Transmission Control Protocol
Wireless Transmission Control Protocol
Washington University in St. Louis
CSE574s
20-30
2010 Raj Jain