Professional Documents
Culture Documents
Lecture Objectives
Describe TCPs flow control mechanism Describe operation of TCP Reno and TCP Vegas,
including congestion avoidance (congestion control), slow start, and fast retransmission and recovery mechanisms Describe performance problems of TCP in wireless networks Summarize proposed schemes to overcome performance limitations of TCP in wireless networks
Agenda
TCP overview Flow control Congestion avoidance, slow start, and retransmission TCP Reno and TCP Vegas TCP in wireless networks Solutions to TCP performance problems in wireless networks
acknowledgements returned to the sender Sender cannot send more than wnd unacknowledged bytes to the receiver
Src Dest Limits amount of data that destination must buffer
Mobile Networks: TCP in Wireless Networks 4
200 bytes
wnd = 500 500 bytes
sending a segment until an acknowledgement (ACK) is received Let t = wnd/b be the time to transmit a full window of data, where b is link bandwidth
Sender Receiver
t rtt
wnd bytes
the flow control window can limit throughput for the connection
In this case, t rtt Throughput is wnd/rtt
Sender
Receiver
t rtt
wnd bytes
Implemented at sender
Src
TCP Operation
Flow control (already discussed) Congestion avoidance Introduce a congestion window (cwnd), in addition to flow control window (wnd) Need to manage size of congestion window Slow start Aggressively grow congestion window until congestion is detected In Reno, aggressively reduce rate when invoked Loss detection and retransmission Fast retransmission and recovery Less severe adjustment congestion window size
Mobile Networks: TCP in Wireless Networks 10
the sender
Sender can transmit up to minimum of cwnd and wnd bytes
network congestion
Most packet loss occurs due to congestion at intermediate
routers since IP has no congestion control mechanism Packet losses due to bit errors are rare
TCP Reno is reactive with respect to congestion Responds to loss of packets indicated by timeout or duplicate ACKs
11
reduced
Due to timeout: cwnd = 1 and enter slow start Due to duplicate ACKs: cwnd = cwnd/2 + 3segment_size
successfully acknowledged
Slow start
Slow start active if cwnd ssthresh (threshold) During slow start, congestion window increased by
segment_size for every ACK received opens the window exponentially Congestion avoidance cwnd = cwnd + (1/cwnd) + segment_size/8 for every ACK received additive growth in window size (about one segment every round trip time)
Mobile Networks: TCP in Wireless Networks 12
G. Xylomenos, G. C. Polyzos, P. Mahonen, and M. Saaranen, TCP Performance Issues over Wireless Links, IEEE Communications Magazine, Vol. 39, No. 4, pp. 52-58, April 2001. Mobile Networks: TCP in Wireless Networks 13
Current congestion window size Minimum (congestion-free) round-trip time Actual (with congestion) round-trip time Estimated backlog in queue low threshold for diff (want diff > ) high threshold for diff (want diff < )
congestion
Congestion window changed gradually as observed backlog
(delay) changes
15
/rtt
C
/rtt
Actual Throughput
congestion is detected Slow start is active if cwnd ssthresh Initially, cwnd = 1 segment
round-trip time if no loss occurs TCP Vegas doubles the congestion window every other round-trip time if no loss occurs
17
19
Timeout SS
Duplicate ACK CA
cwnd 1
cwnd cwnd/2 + 3
SS
CA
SS
CA
CA
time
20
SS
CA
time
large buffers
21
TCP Reno problems Constantly updates window size Can lead to periodic oscillation in window size Can lead to oscillation in round trip times, causing delay jitter and inefficient bandwidth utilization Can have many retransmissions of the same packets after a packet is dropped
Mobile Networks: TCP in Wireless Networks 22
23
homogeneous environment
TCP Vegas achieves between 40% and 70% better
throughput TCP Vegas has 20% to 50% of the losses compared to the TCP Reno
Factors Slow-start and congestion avoidance have the greatest influence on throughput Congestion detection mechanism during congestion avoidance has only minor or negative effect on throughput Congestion detection mechanism may exhibit problems related to fairness among competing connections
Mobile Networks: TCP in Wireless Networks 25
Agenda
TCP overview Flow control Congestion avoidance, slow start, and retransmission TCP Reno and TCP Vegas
26
Delay is often very high Round-trip time can be very long and variable TCPs timeout mechanisms may not work well Problem exacerbated by link-level retransmission Links may be asymmetric Delayed ACKs in the slow direction can limit throughput in the fast direction
28
29
Agenda
TCP overview Flow control Congestion avoidance, slow start, and retransmission TCP Reno and TCP Vegas TCP in wireless networks
wireless networks
30
31
Advantages Requires no change to existing sender behavior Matches layered protocol model Problem Interactions with TCP, e.g., fast retransmission by TCP can be triggered by delays due to link-level timeout and retransmission
Mobile Networks: TCP in Wireless Networks 32
acknowledgements State is soft, so handoff is simplified Disadvantage May not completely shield TCP from the effects of mobility and the wireless link
33
34
Host AP
Split Connection TCP*
35
to congestion and, thus, avoid congestion control when not needed Use selective acknowledgement (SACKs) for finegrained error recovery
SACK RFC SMART
36
37
foreign agent and as the TCP proxy for Indirect TCP (I-TCP) If the mobile host moves to a different foreign agent, a handoff is needed for Mobile IP If the mobile host moves to a different proxy, a handoff of the full TCP state is needed for I-TCP
Buffered data Sequence numbers
Port
39
fixed network Errors from the wireless link are corrected at the TCP proxy and, thus, do not propagate through the fixed network New protocol affects only a limited part of the Internet Optimizations possible over wireless link
Variance in delay between proxy and mobile host may be
small, permitting optimized TCP Opportunity for header compression, etc. Opportunity for a different transport protocol
Mobile Networks: TCP in Wireless Networks 40
TCP proxy must be trusted Obvious opportunities for snooping and denial of service End-to-end IP-level privacy and authentication (e.g., using IPSec) must terminate at the proxy
41
42
Standard TCP
Fixed Host
Wired Network
Snoop Agent
Mobile Host
43
fixed network to mobile host Snoop agent monitors ACKs from the mobile host
Can discard buffer data when acknowledged Can retransmit data when Delayed ACK, or Duplicate ACK Timeout can be relatively short leading to a fast
retransmission
host
44
been sent by the agent and acknowledged Snoop agent cannot generate ACKs that are sent back to the fixed host
Unlike split-connection schemes, Snoop TCP preserves end-
45
host and detects missing segments A negative ACK (NACK) is sent immediately to the mobile host Mobile host can retransmit missing segment, hopefully in time to avoid a TCP timeout at the fixed host
46
but reverse direction traffic can benefit from changes at mobile host There is no need for handoff Automatic fallback to standard TCP
No need to ensure that all foreign networks provide a Snoop
agent
47
fixed network Mobile host must be modified to handle NACKs for reverse (mobile to fixed) traffic Cannot snoop encrypted datagrams
Cannot use with privacy
48
Summary
TCP is a complex protocol Minimal support from underlying protocols Indirect observation of network environment Large number of competing flows from different hosts Congestion avoidance is still a research issue TCP does not perform well in a wireless environment
where packets are usually lost due to bit errors, not congestion Schemes have been proposed to address TCP performance problems
Link-level recovery Split protocols End-to-end protocols
Mobile Networks: TCP in Wireless Networks 49