-1

I try to emulate a network comprised of 2 host and 1 switch using Mininet. One host is a sender, sending packets continuously to the other host (receiver) by using iperf tool.

H1----------------------------Switch--------------------------H2

-------100Mbps|0.125ms-----------100Mbps|0.125ms------

The link between host and switch has bandwidth of 100Mbps and delay of 0.125ms.

Each packets sent has size of 1.5KB and Switch has buffer of 400 packets.

Delay of each link is 0.125ms so the RTT between H1, H2 is 4*0.125=0.5ms

CWND (congestion window) is the number of packets that sender send in one RTT, so the throughput is computed as: throughput = CWND/RTT.

Because MAX(througput) < bandwidth so CWND < RTT*bandwidth=0.5*10^(-3)*100*10^6=50000b~6KB = 4packets

But when I monitor CWND using tcp_probe tool, it surprisingly display with CWND always bigger than 200KB (~120packets), much bigger than what I expected.

TCP CWND Plot

Even the buffer is 400 packets, but It cannot has CWND so large like that.

Please explain it for me, I'm really stuck at this problem. Thank you!

Tai Nguyen
  • 165
  • 5
  • 13

1 Answers1

3

I don't think you can calculate CWND and RTT the way you do, because you effectively argue that the time a packet stays in the switch and in the network stacks of H1 and H2 is zero.

The congestion window (CWND) is the amount of data which can be transferred without packet loss, e.g. it will be increased as long as everything gets ACKed and decreased on packet loss.

According to your data the CWND gets downgraded at about 600, so the packet loss starts at about 400 packets, which is the buffer size of the switch. So in this moment there are not 4 packets in transit between H1 and H2, but about 400 and the RTT is probably much larger than 0.5ms.

Robin Nabel
  • 2,170
  • 1
  • 21
  • 26
Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172