Material for home exam 1

Home exam 1 relies on the simulator ns-3. This page points to files to download and collects FAQs.

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 2022 is ns-3.36.1 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. ns3 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.36.1 and you can find the updated version here: dumbbell-sim.cc

In my configuration, I have added it to the ns-3.36.1/scratch folder of my ns3 installation.


FAQ


Why does ns3 not compile on my Ubuntu/Redhat/OpenSUSE/...?

You can download and compile the latest ns3 version on login.ifi.uio.no without any problems. Download, unpack, call build.py, add dumbbell-sim.cc as described and run the simulation. You need less than 5 minutes to get up and running.

No idea why it doesn't work on your setup. Don't waste too much time on this, use ssh.


How to pass command line arguments to a simulation if you start it with "ns3"?

You can use a command like

./ns3 run "scratch/dumbbell-sim --tcpcaa=TcpNewReno"

The quotation marks in this command tell ns3 to pass the arguments to the simulation instead of interpreting them for ns3 itself.

Note: If you use an older version of ns3, this doesn't work. Until at least 3.34, you had to call a script called "waf" instead of a script called "ns3".

 


Why are the results unchanged when I change the random number generator's seed?

There is nothing random in the code unless you change it. You should change it.

More specifically, what happens in the dumbbell-sim is that the complete system is created before the simulation starts. The network topology is created and connected, and the TCP load generators for each sending node is created. When the simulation starts, all the load generators are starting to send packets at simulation time zero. Every single time you start the simulation with the same parameters. The queue will be full at the same simulation time. The first packet will get lost at the same simulation time. The sender will notice that it was lost at the same simulation time. And so ... so nothing can change.

You should fix that. Adding a random variable to change the simulation a little bit will help. For example, you can add a little bit of randomness to the time when the senders send their first packets. Or you can add a little bit of randomness to the latency on each of the links connecting senders to the first router.


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.


How do you grade?

After two weeks, you must present your analysis in class in the form of a presentation. You will receive question and feedback. Do not forget that our feedback for another person may also be important for you - we may provide the same hint repeatedly for several presentations, but you cannot count on that.

This must be done in a format that provides a stand-alone presentation with a clear, linear presentation sequence. That means that a person can watch it all by going forward with repeated clicks on the same button, without making interactive choices. Typical tools are Google Sheets, Powerpoint, Keynote or Beamer (Latex). Presenting interactively from, e.g., Matlab, R og Matplotlib, tends to result in chaos and is essentially impossible to upload to Devilry for grading.

Two weeks after the presentation (but before the lecture), you must upload your final version to Devilry. We have checklists (like this) for the different homeworks. Note the different weighting for the categories.

 

 

Publisert 5. sep. 2022 08:58 - Sist endret 7. sep. 2022 10:01