How to Install NS-3 on Windows 7 with the help of cygwin

The following instructions explain how to install the Network Simulator version of NS3  on windows 7 with the help of cygwin.

Step 1:
Download & install cygwin. ( I install it in the recommended directory “{System Root}/cygwin/”). Make sure you select “install” for python and devel. This will ensure you have python and gcc/g++ as well as all of the dependencies. You can do this by clicking on the word default in the list of packages. I left all of the other package options on default for the install.

Step 2:

Download the most recent version of ns3 from their website.  Save the file to “{System Root}/cygwin/home/{your-username}”. Alternatively, you can try downloading the file directly within cygwin using something like “we get http://www.nsnam.org/releases/” where filename is the name of the release you wish to install.

Step 3:
Start cygwin. At the cygwin prompt type: “tar xvf ns-allinone-3.7.1.tar.bz2″ (or whatever the filename is depending on the version you downloaded). This will unpack the ns3 archive so you can use it.

Step 4:
After it has unpacked, change directory to the new ns3 directory with the following: “cd ns-allinone-3.7.1″. Then build ns3 by typing the following: “./build.py”.

Step 5:
You should be good to go. You can validate the install by changing directory again to the ns-3.7.1 directory (“cd ns-3.7.1″) and running “./test.py”. It will let you know with a PASS / FAIL for each test case. You can now edit the files yourself. The scenario files are located in “” and the source files are located in “”.

Good luck!

7 thoughts on “How to Install NS-3 on Windows 7 with the help of cygwin

  1. “$ ./build.py
    /usr/bin/env: ‘python’: No such file or directory”

    This is the comment i get after extracting the NS 3 package
    Kindly help me

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.