tcp.ppt
DESCRIPTION
TRANSCRIPT
Transport Layer Improvements in 802.11 Networks
Eryk Schiller
Bartosz Wieczorek
Outline
• Wireless technologies• TCP basics• Impact of transmission errors on TCP
performance• Approaches to improve TCP
performance in Wireless networksClassificationDiscussion of selected approaches
Protocol Stack
source: 802.11-1999
Wireless Technologies
• Wireless local area networksIEEE 802.11 WLAN Standardlast hop to a wireless hostwireless connectivity between hosts on the
LAN
Wireless Technologies (2)
• Multi-Hop Wireless May need to traverse multiple links to
reach a destinationMobility causes route changes (MANETs)
IP – Internet Protocol
• IP – Best effort deliveryPackets may be delivered out-of-orderPackets may be lostPackets may be duplicated
TCP – Transmission Control Protocol
• TCP – Reliability Reliable ordered deliveryImplements congestion avoidance and
controlReliability achieved by means of
retransmissions if necessary
TCP acknowledgments
• Acknowledgments sent to TCP sender confirm delivery of data received by TCP receiver
• ACK for data is sent only after data has reached receiver
• TCP assigns byte sequence numbers• ACK indicates the next expected byte that
receiver wants to receive
TCP acknowledgments (2)
• Single
S Rdata:n
ACK:n+1
data:n+1
ACK:n+2
S Rdata:n
data:n+2
ACK:n+3
data:n+1
• Cumulative
S Rdata:n
data:n+2
ACK:n
data:n+1
• Duplicate
ACK:n
Window Based Flow Control
• Sliding Window size determines how many segments can travel at the moment (can be unacknowledged)
• Prevents from overflowing receiver’s buffer• Window size minimum of
receiver’s advertised window - determined by available buffer space at the receiver
congestion window CWND - determined by the sender, based on feedback from the network, bounds the amount of data that can be sent per round-trip time RTT, actual throughput depending on CWND/RTT
Sliding Window - example
•Window size = 6
Sent and already acknowledged
Sent but not yet acknowledged
Already allowed to be sent
Not yet allowed to be sent
Slow Start and Congestion Avoidance
• Slow Startinitially, cwnd = 1 MSS (Max. segment size)increment window size by 1 MSS on each new
ACK (exponential growth)slow start phase ends when window size
reaches the slow-start threshold
• Congestion AvoidanceOn each new ACK, increase cwnd by 1/cwnd
packets (linear increase of 1 MSS per RTT)
Slow Start and Congestion Avoidance (2)
time [RTTs]
CW
ND
[seg
men
ts]
Slow start
Congestion avoidance
Slow start threshold
Congestion Control
• On detecting a packet loss, TCP sender assumes that network congestion has occurred and drastically reduces the congestion window
• Reducing congestion window reduces amount of data that can be sent per RTT - throughput may decrease
Congestion Control - Packet losses
• Causes of packet losses:• packet corruption (less probable)• buffer overflows on the network
• Detecting losses:• exceeding RTO (Retransmission Time-Out)
RTO is dynamically calculated, based on RTT (Round Trip Time) changes, RTO > RTT
• receiving duplicate acknowledgments (dupacks)
Congestion Control - Timeout
• SSThresh = ½ CWND (Slow Start Threshold)• CWND = 1 MSS• The slow start is initiated
0
5
10
15
20
25
0 5 10 15 21 26
Time [RTTs]
CW
ND
[se
gmen
ts]
SSThresh = 8SSThresh = 10
CWND = 20After timeout
Congestion Control - Fast Retransmit
• Fast retransmit [RFC 2001]• Initiated after receiving 3 dupacks• The lost packet is immediately
retransmitted • No need to wait for RTO to expire• Often followed by Fast Recovery
Congestion Control - Fast Recovery
• Fast recovery [RFC 2001]• SSThresh = ½ cwnd• cwnd = SSThresh + number of dupacks• cwnd = SSThresh (avoiding Slow-start Stage)
0
5
10
15
20
0 2 4 6 8 10 12 14
Time [RTTs]
CW
ND
[se
gmen
ts]
3 dupacks receivces dupacks
ACK new data
TCP Reno / TCP New Reno
• TCP Reno• Slow-start• Congestion avoidance regimen• Fast retransmit [RFC 2001]• Fast recovery [RFC 2001]
• Improvement of TCP Reno TCP New RenoIn TCP New Reno case Partial ACK indicates
another packets losses. Algorithm stay in Fast Recovery stage until cumulative ACK. Multiple losses/RTT may cause RTO. Motivation to create extension that will tell more about losses.
TCP Vegas
• Modifications of TCP Reno• Linearly adjust TCP’s cwnd upwards/downwards• Detect packet loss after first dupack and decrease
cwnd to ¾ instead of ½ • Halves SS to avoid packet losses
• TCP Vegas was created to avoid congestion so the impact on TCP performance in 802.11 Networks is not so significant
TCP Westwood
• Westwood improves TCP performance in wired and wireless networks
• TCP Westwood relies on end-to-end bandwidth estimation to discriminate cause of packet loss
• Bandwidth estimation is calculated by a measure of returning ACK flow
• Bandwidth estimation is then used to correctly set SSThresh and cwnd after timeout or dupacks.
SACK – Selective Acknowledgments
• SACK [RFC 2018]• Advertised in the option field during the
handshake• Must be approved by two sides • Every dupack should bear SACK option• SACK contains information about
unacknowledged, out of order contiguous block of data
• Only three blocks are announced in 1 SACK option (length of TCP header is limited)
• Recent block should be announced in SACK• Each block should be announced 3 times
SACK – Selective Acknowledgments (2)
S R
data
data
data
data
data
ACK
ACK
ACK
SEQ = 0
SEQ = n
SEQ = 2n
SEQ = 3n
SEQ = 4n
ACK = n
ACK = n, SACK = { [2n, 3n) }
ACK = n, SACK = { [2n, 3n), [4n, 5n) }
SACK – Selective Acknowledgments (3)
• Hardware• Celeron 2,4 GHz Linux 2.6.12 (Workstation)
with Ethernet Adapter• AMD 64-bit 1,8 GHz Linux 2.6.12 (Notebook)
with Wi-Fi 802.11g Network Adapter• Linksys WAP54G
• Conditions• Signal Level: -84dBm• Rate: 54Mbps• 64-bit WEP
SACK – Selective Acknowledgments (4)
SPLIT CONNECTION APPROACH
• End-to-end TCP connection is broken into two TCP connections - one on the wired part of route and the other over wireless part of the route
• If wireless link is not last on route, then more than two TCP connections may be needed
• Connection between wireless mobile host MH and fixed host FH goes through base station BS
FH MHBS
Base Station Mobile HostFixed Host
SPLIT CONNECTION APPROACH
• Split connection results in independent flow control for the two parts
• Flow/error control protocols, packet size, time-outs, may be different for each part
wireless
physical
link
network
transport
application
physical
link
network
transport
application
physical
link
network
transport
application rxmt
TCP connection TCP connection
SPLIT CONNECTION - Advantages
• BS-MH connection can be optimized independent of FH-BS connection
• Different flow / error control on the two connections
• Local recovery enables faster recovery due to relatively shorter RTT on wireless link
• Good performance achievable using selective acks when multiple packet losses occur per window (preventing from timeouts stalling BS-MH connection)
SPLIT CONNECTION - Disadvantages
• Ack may be delivered to sender, before data delivered to the receiver
• BS failure can result in loss of data (unreliability):
• BS fails to send a packet to MH
• BS acks successful receipt to FH
• FH deletes the ack’d packet from the buffer
• The packet will not be restored by MH
• Buffer space needed at BS for each TCP connection (overload for many slow connections)
• May not be useful if data and acks traverse different paths (both do not go through the base station)
SNOOP PROTOCOL• Retains local recovery of the Split Connection approach
• Buffers data packets at the base station BS to allow link layer retransmission
• When dupacks received by BS from MH, retransmit on wireless link, if packet present in buffer
0
400
800
1200
1600
2000
16
K
32
K
64
K
12
8K
25
6K
no
erro
r
1/error rate
kb
its
/se
c
base TCP
Snoop
2 Mbps Wireless link