The ns-3 Network Simulator Project

Modify first.py to support IPv6 addressing

examples/tutorial/first.py is a basic Python program provided for ns-3 beginners. A line by line explanation of first.cc (same as first.py, but in C++) 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.py from examples/tutorial and paste it in scratch directory.
  2. Modify first.py 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.py 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.py and send it for evaluation.

Task tags

  • python
  • ipv4
  • ipv6

Students who completed this task

Kr0n0s, hax0kartik, howie

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
close

2019