Test Description:
This test shows the basic behavior of TCP including Slow start,
Congestion avoidance, Fast Retransmission, but no Fast Recovery (generic
Tahoe).
Expected output:
-
After a packet loss, duplicate ACKs are received. When duplicate ACK count
reaches the threshold of 3, the packet which is presumed lost is
retransmitted.
-
Congestion window is set to one packet. ssthresh is set to one half of
number of packets in-flight. In this test, ssthresh is set to 7 packets.
-
After the ACK of the retransmitted packet is received, it acknowledges
all outstanding packets. Slow start is performed.
-
When congestion window is less or equal than ssthresh, one
packet increment is added to congestion window.
-
When congestion window is strictly greater than ssthresh,
congestion avoidance is performed. The congestion window increment is calculated
by formula MSS*MSS/cwnd. Congestion window will increase by one
packet roughly per one round-trip time.
Test topology:
Server ................Router..................Client
8Mbs 5ms 800kbs 100ms
6(0)------------------0(1)0(0)-----------------7(0)
SSF Test Configuration File: f1.dml
send window = receive window = 14 packets
Note that the packet size is 960 + 20 + 20 (sesgment length + IP header
+ TCP header) bytes to be consistent with NS test.
SSF Tcpdump File: f1.tcpdump
Figure 1: sequence plot for the tcpdump at Router
Zoom
in on SSF trace
Server tcpdump, RTT and Congestion window plot
(EPS
format)
Figure 2: sequence plot , RTT plot and cwnd plot for the tcpdump
at Server
NS Test Trace with the same parameters
NS tcpdump trace file: f1.tr
Zoom
in on NS trace
SSF Trace Analysis:
The output is consistent with what we expected.
-
Packet loss and fast retransmission
-
From Figure 2 plot 3, we can see that after 3 duplicate ACKs are received by
the Server, the cwnd is set to 1*MSS, and ssthresh is set
to flight_size/2 (which is 7 packets) for the slow start.
-
From Figure 1 (the sequence plot for Router ) and tcpdump shown below,
packet # 24961 is retransmitted. We can see the retransmission is delayed
for about 11 ms after the 3rd duplicate ACK is received. This is
because of the link delay between Server (data packet sender) and Router.
tcpdump fragment at the Router's bottleneck NIC:
time srcIP srcPort destIP destPort Seq# seglen S F A Ack#
193.933691 5 10 2 100 35521 960 0 0 0 -1
193.942451 2 100 5 10 5 0 0 0 1 24961
193.943691 5 10 2 100 36481 960 0 0 0 -1
193.952451 2 100 5 10 5 0 0 0 1 24961
193.953691 5 10 2 100 37441 960 0 0 0 -1
193.962451 2 100 5 10 5 0 0 0 1 24961
194.064291 2 100 5 10 5 0 0 0 1 24961
194.074291 2 100 5 10 5 0 0 0 1 24961
194.075531 5 10 2 100 24961 960 0 0 0 -1
194.084291 2 100 5 10 5 0 0 0 1 24961
194.094291 2 100 5 10 5 0 0 0 1 24961
194.104291 2 100 5 10 5 0 0 0 1 24961
194.114291 2 100 5 10 5 0 0 0 1 24961
194.124291 2 100 5 10 5 0 0 0 1 24961
194.134291 2 100 5 10 5 0 0 0 1 24961
194.144291 2 100 5 10 5 0 0 0 1 24961
194.154291 2 100 5 10 5 0 0 0 1 24961
194.164291 2 100 5 10 5 0 0 0 1 24961
194.286131 2 100 5 10 5 0 0 0 1 38401
194.297371 5 10 2 100 38401 960 0 0 0 -1
194.298371 5 10 2 100 39361 960 0 0 0 -1
194.507971 2 100 5 10 5 0 0 0 1 39361
194.517971 2 100 5 10 5 0 0 0 1 40321
From the tcpdump we can see:
-
At time 194.064291 second, the third duplicate ACKs was received at the
router.
-
At time 194.075531 the retransmitted packet with sequence #24961 reached
the router.
-
The 11 ms gap between these two packet is because of the 5-ms link delay
between router and server.
-
Slow start:
-
From Figure 1 and the tcpdump fragment shown above, after the new ACK is received,
cwnd is increased by MSS according to slow start algorithm, 2 new packets # 38401
and #39361 are sent.
-
Congestion avoidance:
-
From Figure 2 plot 3, we can see at about 194.8 seconds, cwnd reaches ssthresh
of 7 packets, congestion avoidance is performed, no new packet is
sent after the 7th packets in this flight of window, because the increament
is less than 1 full packet.
-
When cwnd reaches the advertised window of the remote receiver:
-
From Figure2 plot 3, we can see at time about 195.57 seconds cwnd reaches
the advertised remote receive window size, and the send window is restricted
by the advertised window, which is 14 packets.
|