The ns-3 Network Simulator Project
Enable packet capture (PCAP) in first.cc and display PCAP files in tcpdump
Tracing helps the users to understand the set of events that take place during a simulation run. ns-3 allows trace files can be generated in .pcap format which can then be opened in tcpdump for further analysis.
The student is expected to do the following:
- Refer to 'examples/tutorial/second.cc' to understand how to enable PCAP in ns-3 programs.
- Copy ‘examples/tutorial/first.cc’ to 'scratch'.
- Modify 'scratch/first.cc' to enable PCAP support.
- Run the modified program: ./waf --run scratch/first
- Verify whether you have two PCAP files generated in the ns-3 root directory: first-0-0.pcap and first-1-0.pcap
- Open the PCAP files in tcpdump: 'tcpdump -nn -tt -r first-0-0.pcap' and then 'tcpdump -nn -tt -r first-1-0.pcap'
- Send the screenshot of tcpdump for evaluation.
Task tags
Students who completed this task
ra1nst0rm3d, howie