Test Description:
This test shows the behavior of TCP Reno with one and two packet drops.
Expected output:
  • For the link between 5(0) and 0(1):
    • 1 packet will be dropped when cwnd size reaches 16 packets. A fast retransmission will happen when 3 duplicate ACKs are received.
    • cwnd increases by one packet size with each additional duplicate ACK. However, no packets are sent during fast recovery because cwnd isn't big enough.
    • When the ACK for the fast retransmission acknowledges all the packets received before the fast retransmission, cwnd is set to ssthresh of 8 packets. A burst of 8 packets is sent because of the empty pipe.
  • For the link between 6(0) and 0(2):
    • 2 packets will be dropped when window size reaches 4 packets. A fast retransmission will happen when 3 duplicate ACKs received. The ACK for the fast retransmission doesn't acknowledge all the the packets sent before the fast retransmission. TCP has to wait for a timeout to recover from the loss of the second packet.
Test Topology:
Server ................Router..................Client

        8Mbs 5ms
5(0)------------------0(1)       800kbs 100ms
                           0(0)-----------------7(0)
6(0)------------------0(2)
        8Mbs 5ms

SSF Test Configuration File: f18.dml

send window = receive window  =  16 packets

SSF Tcpdump File:

f18.tcpdump
f18serv1.tcpdump
f18serv2.tcpdump

Router tcpdump plots:

Figure 1: Sequence number plot for tcpdump at router.

Server tcpdump, RTT and Congestion window plots:

Figure 2: Sequence number plot, RTT plot and cwnd plot for tcpdump at server 1 (EPS format)

Figure 3: Sequence number plot, RTT plot and cwnd plot for tcpdump at server 2 (EPS format)


NS Test with the same parameters


Trace Analysis:

The output is consistent with expected output.
 

For the top connection:

  • Packet loss, fast retransmission/fast recovery:
    • One packet is dropped when cwnd size reaches 16 packets. A fast retransmission happens when 3 duplicate ACKs are received. The sshtresh is set to max(flight-size/2, 2*MSS) for congestion avoidance. The cwnd is set to ssthresh + 3 * MSS for fast recovery. From Figure 2 plot 3 we can see that the new value of ssthresh is 8*MSS, and the new value of cwnd is 11*MSS.
    • Each duplicate ACK after the 3rd increases the cwnd by 1 MSS during fast recovery. It is supposed to trigger the sending of one new packet, but only if allowed by the new value of usable window, min(cwnd, rwnd).
    • No new packet is sent during fast recovery because of the window limitation:
      • According to the send window management algorithm (see SSF TCP Implementation), the usable window is:
      •  D = snd_una + snd_wnd - snd_nxt
         
        In SSF TCP a new data packet can be sent only when D >= MSS, implying the condition:
         D = min(cwnd, rwnd) - (snd_nxt - snd_una) >= MSS
         
      • For the fast retransmission snd_nxt = snd_una. However, (in TCP Reno) after the fast retransmission snd_nxt returns to the immediately preceding value:
        snd_nxt = snd_max.
        Therefore, due to the reduction of cwnd after fast retransmission, the usable window size D may become zero or negative, preventing packet transmission during fast recovery until enough dup ACKs are received to open the window.
      • In this test TCP Reno is used. From Figure 2 plot 3 we can see that after fast retransmission:
           min(cwnd, rwnd) = 16 MSS
         snd_nxt - snd_una = 16 MSS
         
        thus the usable window is zero, and from Figure 1 plot 1 we see that indeed no new packet is sent during fast recovery.
  • When new ACK is received, 8 packets are sent back to back:
    • After fast recovery, the cwnd is reset to ssthresh which is 8 MSS now, and TCP enters congestion avoidance. All outstanding packets are ACKed. Thus
        min(cwnd, rwnd) = 8*MSS
      snd_nxt - snd.una = 0. 
       
      and 8 new packets can be sent.
  • Congesion avoidance:
    • The cwnd will keep increasing roughly by one MSS per roundtrip time. The usable window will keep increasing only until it reaches the upper bound of rwnd.
For the bottom connection:
  • Packet loss, fast retransmission/fast recovery:
    • Two packets are dropped at the bottleneck router when cwnd size reaches 4 packets. A fast retransmission happens when 3 duplicate ACKs received. The sshtresh is set to max(flight_size/2, 2*MSS) for congestion avoidance. The cwnd is set to ssthresh + 3 * MSS for fast recovery. From Figure 2 plot 3 we can see the new value for ssthresh is 2*MSS, and the new value for cwnd is 5*MSS.
    • When a new data ACK comes, cwnd is reset to ssthresh and increased by MSS*MSS/cwnd for congestion avoidance. From the formula:
    •     min(cwnd, rwnd) = 2.5*MSS
       snd_nxt - snd.una  = 4*MSS
      
      and no packet can be sent.
  • Timeout retransmission:
    • When timeout happens, the lost packet is retransmitted and cwnd is set to 1 MSS, ssthresh is set to max(flight_size/2, 2*MSS) = 2*MSS.
  • Congesion avoidance:
    • When cwnd reaches ssthresh of 2 packets, the congestion avoidance takes over. The cwnd will increase roughly 1 MSS per RTT. The usable window will keep increasing only until it reaches the upper bound of rwnd.