The ns-3 Network Simulator Project

Modify first.cc to support IPv6 addressing

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 support IPv6 addresses. Do not remove the support of IPv4 address. Instead, provide the support of command line arguments so that the user can choose IPv4 or IPv6 addresses as desired. Let the string to pass the command line argument for IPv4 be 'v4' and for IPv6 be 'v6'.
  3. Run the modified first.cc by passing v4 and v6 as command line arguments. Attach the terminal snapshot for both the cases and send for evaluation.
  4. Make a patch with the modifications made in first.cc and send it for evaluation.

Task tags

  • c++
  • ipv6

Students who completed this task

Parth Pratim, Asanali, Victor Hu, sikfeng, Parth Pandya, bartekche

Task type

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

2018