tcp behavior inference tool jitendra padhye, sally floyd presented by songjie wei
TRANSCRIPT
TCP Behavior Inference Tool
Jitendra Padhye, Sally Floyd
Presented by Songjie Wei
CISC856 Fall 2005 2
Overview
Motivation
Sample application: initial congestion window
TBIT architecture
Application 1: time wait duration
Application 2: congestion control algorithm
Summary
CISC856 Fall 2005 3
Motivation
TCP carries most of the Internet traffic
TCP is a complex protocol with many parameters and
variations
Understanding TCP behaviors is important for:
OS vendors and customers
Internet-related researchers
Application developers
CISC856 Fall 2005 4
Testing TCP Behavior of Web Servers The overall congestion control behavior of the
Internet is heavily influenced by TCP
implementation in web servers
Web servers are easy to test
No special privileges required to request information from
web servers
CISC856 Fall 2005 5
Example of TBIT Application
Initial value of the congestion window (ICW) Number of bytes sent in a burst after three-way
handshaking, before receiving any ACKs
RFC2581: at most 2*MSS bytes
RFC2414: min(4*MSS, max(2*MSS, 4380))
Some TCP are found to send 8000+ bytes with
MSS of 512
Large bursts of packets: buffering problems, loss,
delay, etc.
TBIT Architecture
Using TBIT to Determine ICW Web server
SYN
“GET / HTTP/1.0” with ACK
SYN+ACK
TCP-PDU n
TCP-PDU 1
TCP-PDU 1
RST
Timeout
TBIT
TCP-PDU 3TCP-PDU 2
No ack to these TPDUs
What is the ICW size measured ?
CISC856 Fall 2005 8
Difficulties in Measuring ICW
Web page too small to fill cwnd Use smaller MSS Use URL of bigger object
TPDUs get lost Repeat test multiple times
Multiple computers answer to the same IP address Repeat test multiple times Non-repeatable results?
Machine to test has no web server no solution
A B
SYN
“GET / HTTP/1.0” + ACK
SYN+ACK
TCP-PDU n
TCP-PDU 1
TCP-PDU 1
RST
Timeout
CISC856 Fall 2005 9
Using TBIT to Determine Time-wait Duration What is Time-wait?
2 MSL time-wait can avoid
the port-reuse problem
Server should retain
sufficient state information
about the connection during
the time-wait
Many major web servers
use a smaller value of MSL2 MSL
Time-wait
Client Server
Closed
Closed
FIN
FIN + ACK
ACK
Data Transfer
Using TBIT to Determine Time-wait DurationTBIT Web Server
2 MSL
Closed
FIN
FIN + ACK
ACK
SYN
SYN
SYN
SYN + ACK
RST
Data Transfer
Estimated time-wait duration
Should this constant time be a big or small value ?
How about the sequence number of these SYNs?
CISC856 Fall 2005 11
Review of TCP Congestion control Tahoe
slow start, congestion avoidance, fast rtx (dupacks)
Reno Tahoe + fast recovery (new acks)
New Reno Reno + modified fast recovery (partial acks)
Using TBIT to Test TCP Congestion ControlTBIT Web Server
Three-way handshake
rwnd=5 MSS
Initial cwnd=2 MSS
TPDU 1TPDU 2
TPDU 3TPDU 4TPDU 5TPDU 6
TPDU 7TPDU 8TPDU 9TPDU 10TPDU 11
TPDU 12TPDU 13TPDU 14TPDU 15TPDU 16
TPDU 17
ACK 1ACK 2
ACK 3ACK 4ACK 5ACK 6
ACK 7ACK 8ACK 9ACK 10ACK 11
ACK 12
ACK 12ACK 12
ACK 12
What happens now ?
“GET /HTTP/1.0”
CISC856 Fall 2005 13
TCP without Fast Retransmit
CISC856 Fall 2005 14
Tahoe
No retransmit timeout before the retransmission of packet 13
Unnecessary retransmission of packet 17
CISC856 Fall 2005 15
Reno
Fast retransmit for packet 13, a retransmit timeout for packet 16
No unnecessary retransmission of packet 17
CISC856 Fall 2005 16
NewReno
Fast retransmit for packet 13, no additional fast retransmits or retransmit timeout
No unnecessary retransmission of packet 17
CISC856 Fall 2005 17
Characteristics of TCP Variationsunder TBIT Tests TCP without fast retransmission
No fast retransmission Timeout for packet 13
Tahoe No retransmit timeout before retransmission of packet 13 Necessary retransmission of packet 17
Reno Fast retransmit of packet 13 Retransmit timeout for packet 16 No unnecessary retransmission of packet 17
NewReno Fast retransmit of packet 13 No additional fast retransmit or retransmit timeout No unnecessary retransmission of packet 17
CISC856 Fall 2005 18
Sample Testing Result (I)
Aug 31, 2003 Total: 439 Error:27 www.joins.com uses 0 www.cnn.com uses 1 www.stoo.com uses 10
Initial window Count
0 4
1 293
2 87
3 17
4 10
10 1
CISC856 Fall 2005 19
Sample Testing Result (II)
Experimental results obtained by testing 84394 web servers (27914 classified): NewReno 76% Tahoe 4% (w/o Fast Retransmit) Reno 15% Other 1% Tahoe 4%
Source: Medina, Allman, and Floyd, “Measuring the Evolution of Transport Protocols in the Internet”, May 2004
CISC856 Fall 2005 20
Summary TBIT is presented for characterizing the
TCP behaviors TBIT can be used to check any web server
without special privileges, in a non-disruptive manner
More information are obtained by TBIT about the congestion control mechanisms
Source code and detailed results at: http://www.aciri.org/tbit
CISC856 Fall 2005 21
References Jitendra Padhye and Sally Floyd,Identifying the TCP Behavior of
Web Servers. June 2001, In Proceedings of SIGCOMM 2001
Alberto Medina, Mark Allman, and Sally Floyd, Measuring
Interactions Between Transport Protocols and Middleboxes.
Internet Measurement Conference 2004, August 2004
Sourabh Ladha, Paul D. Amer, Armando Caro, Jr., Janardhan R.
Iyengar, On the Prevalence and Evaluation of Recent TCP
Enhancements. Globecom 2004, Dallas TX, November 2004
Alberto Medina, Mark Allman, and Sally Floyd, Measuring the
Evolution of Transport Protocols in the Internet. To appear in
Computer Communications Review, April 2005
CISC856 Fall 2005 22
TBIT Homework (due on Nov 22) Design a TBIT test for both of the following:
Whether a web server supports TCP SACK Value and increase of the persistence timer
Requirements Describe the test step by step Draw time time diagram to show what are expected to happen
during the test Consider any possible difficulties in the test, such as
lost/duplicate/reordered packets, etc. State clearly any assumptions made for the local host, the web
server, or the network You don’t really need to install and run TBIT for this homework