The ns-3 Network Simulator Project

Ping a real host by using the emulation feature of ns-3

ns-3 provides an emulation feature through its FdNetDevice. Example programs for FdNetDevice are available in src/fd-net-device/examples directory. Follow the steps given below to complete this task:

  1. Copy fd-emu-ping.cc from the above mentioned directory and paste it in scratch directory.
  2. Edit the fd-emu-ping.cc file by adding your machine's IP address, MAC address and device name (e.g., eth0), your gateway address and subnet mask, and remote host's IP address (e.g., take Google Server's IP address). Read the comments provided in fd-emu-ping.cc for better understanding of the code.
  3. Run fd-emu-ping.cc (see the commands given in fd-emu-ping.cc) and upload a snapshot wherein it shows the terminal output when ping is successful.

Task tags

  • ping
  • emulation
  • remote host

Students who completed this task

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

Task type

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

2018