Installation

1. ndnSIM Installation

I have used the following procedure to install ndnSIM. It worked well and ran simulations with visualizer.


Resources:

i. http://ndnsim.net/current/getting-started.html

ii. https://atifurrehman.blogspot.com/2018/07/ndnsim-installation-guide-ubuntu-1604.html


1. Download iso image of the Ubuntu version: 16.04.06 (64-bit)

2. Download VMWare Workstation Player and install Ubuntu in it

3. Install VMWare Tools

After installing Ubuntu 16.04 LTE, 64-bit, update your VMWare Tools. You can do this after loading Ubuntu 16.04 and then clicking the following:

VMWare Player > Manage > VMWare Tools Installation

4. Install Pre-requisites:

Copy paste the following four commands (although some of the packages are repeating because they are taken from above two sources). Set terminal to home directory. In my case, it is....... /home/maazrehan

  • sudo apt-get update; sudo apt-get install python-software-properties; sudo add-apt-repository ppa:boost-latest/ppa; sudo apt-get update; sudo apt-get install libboost-all-dev; sudo apt-get install libssl-dev; sudo apt-get install build-essential; sudo apt-get install libsqlite3-dev libcrypto++-dev; sudo apt-get install python-dev python-pygraphviz python-kiwi; sudo apt-get install python-pygoocanvas python-gnome2; sudo apt-get install python-rsvg ipython; sudo -H apt-get install doxygen graphviz python-sphinx python-pip; sudo -H pip install sphinxcontrib-doxylink sphinxcontrib-googleanalytics;

  • sudo apt install build-essential libsqlite3-dev libboost-all-dev libssl-dev git python-setuptools castxml;

  • sudo apt install python-dev python-pygraphviz python-kiwi python-gnome2 ipython libcairo2-dev python3-gi libgirepository1.0-dev python-gi python-gi-cairo gir1.2-gtk-3.0 gir1.2-goocanvas-2.0 python-pip;

  • sudo -H pip install pygraphviz pycairo PyGObject pygccxml;

5. Downloading ndnSIM source:

Copy paste the following command.

  • sudo apt-get install git; mkdir ndnSIM; cd ndnSIM; git clone https://github.com/named-data/ndn-cxx.git ndn-cxx; git clone https://github.com/named-data-ndnSIM/ns-3-dev.git ns-3; git clone https://github.com/named-data-ndnSIM/pybindgen.git pybindgen; git clone --recursive https://github.com/named-data-ndnSIM/ndnSIM.git ns-3/src/ndnSIM;

6. Compiling and running ndnSIM:

Copy paste the following command.

  • cd ndn-cxx; ./waf configure --enable-shared --disable-static; ./waf; sudo ./waf install; sudo ldconfig; cd ../ns-3; ./waf configure --enable-examples; ./waf

7. Simulating using ndnSIM:

Go to the folder /home/maazrehan/ndnSIM/ns-3 to execute the following simulations one by one.

  • ./waf --run=ndn-simple


  • ./waf --run=ndn-simple --vis

( ns-3 PyViz shall visualize you the topology & packet exchange like ns-2 nam, but better in visibility and control.)


  • ./waf --run=ndn-grid --vis


  • ./waf --run=ndn-simple-wifi --vis


  • NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple

(The results shall be logged on the terminal window)

  • NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple --vis

(The results shall be logged on the terminal window along with visualizer showing topology and packet exchange)


  • NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple --vis > output.txt

(The results shall be stored in output.txt file. The file will be placed in the folder where terminal is set. Use pwd command to find the path to that folder.)