The ns-3 Network Simulator Project

Modify first.cc to use CSMA links

examples/tutorial/first.cc is a basic C++ program provided for ns-3 beginners. A line by line explanation of first.cc is provided in the ns-3 tutorial. Understand the working of first.cc from the tutorial, and then proceed with the following steps:

  1. Copy first.cc from examples/tutorial and paste it in scratch directory.
  2. Modify first.cc in scratch directory to use CSMA links instead of PointToPoint links. Use examples/tutorial/second.cc as a reference. Set the bandwidth to 100Mbps and delay to 1ms.
  3. Ensure that the modified code compiles successfully.
  4. Submit the patch and a screenshot of program execution for evaluation.

Task tags

  • csma
  • c++

Students who completed this task

Kr0n0s, SaiMyGuy, hax0kartik, howie

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
  • assessment Outreach / Research
close

2019