ns3 has an actively maintained documentation on the web, which can be found here: https://www.nsnam.org/doxygen/index.html
You can download the simulator from here: https://www.nsnam.org/releases/
The latest release in autumn 2021 is ns-3.34 and we are using this in the course. Several interesting variations of TCP have only recently been added to ns3 and are now available in this version. We are using these in the course. ns-3.34 has been used on many operating systems and distributions. It compiles and runs without any changes on login.ifi.uio.no.
A reasonable basis for discovering TCP senders and receivers that communicate in the so-called dumbbell-topology was created by the Github user josch. We have modified this small simulation for ns-3.34 and you can find the updated version here: dumbbell-sim.cc
In my configuration, I have added it to the ns-3.34/scratch folder of my ns3 installation.
FAQ
- How to pass command line arguments to a simulation if you start it with "waf"?
- How are the objects in the dumbbell simulation connected with each other?
How to pass command line arguments to a simulation if you start it with "waf"?
You can use a command like
./waf --run "scratch/dumbbell-sim --tcpcaa=TcpBbr"
The quotation marks in this command tell waf to pass the arguments to the simulation instead of interpreting them for waf itself.
How are the objects in the dumbbell simulation connected with each other?
The following figure illustrates the basic relations of the objects that you find in the dumbbell-sim.cc source code.
The figure above shows a red queue as well as several blue queues. I want to illustrate with this that there are queues in the reverse direction for every pair of connected NetDevices. So, there is actually a queue in the reverse direction for every single one of those links, and TCP does require that other direction for sending acknowledgements. It's just not terribly important for us because there is no bottleneck in the reverse direction.