![]() |
Tutorial: Install ns-3 in Windows 7 using cygwin |
Ns-3 is one of the most popular simulation tools for network simulation. See the website: http://www.nsnam.org/. It is the successor to the popular ns-2 simulator. The tool is written in c++ / python, but I manage to get by using mostly only c++ (as opposed to ns-2 which uses c/c++ and tcl). One major difference between ns-3 and ns-2 is that this version has been designed for wireless network simulation from the ground up. (There is support for many types of 802.11 networks including 802.11s mesh networks which interest me).
The following instructions explain how to install the latest stable version of ns3 (as of April 14th, 2010 as of March 22nd 2011 with ns-3.10) on windows 7 with cygwin. It should work with newer releases as they come out, but if not leave me a message and I will update the instructions. I will try to include any common problems I have encountered, or those of users who comment on the post experience in order to make your install easier.
Step 1:
Download & install cygwin. (note: 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 ns3.7.1Download the most recent version of ns3 from their website (you will likely want the all-in-one version if you are just starting out. Save the file to “{System Root}/cygwin/home/{your-username}”. Alternatively, you can try downloading the file directly within cygwin using something like “wget http://http://www.nsnam.org/releases/
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”. You can probably grab a coffee or tea while it compiles.
ns3 on windows 7 with cygwin
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!
Note: For those getting remapping errors, I have finally had the same trouble. This is what worked for me: Open command prompt, change to your /cygwin/bin directory. Type: ‘ash’. Then type ‘/bin/rebaseall’. You can now try cygwin again and it may work. If it still does not work (this happened to me), you can apply this fix to the rebaseall script. (you can edit it using some tool like notepad within windows).
27 Responses to Tutorial: Install ns-3 in Windows 7 using cygwin
Leave a Reply
Leave a Reply
Recent Articles
Creating a Bluetooth Access point (NAP) in Ubuntu 11.10
November 29, 2011
A Bluetooth NAP is similar to a Wi-Fi access point. In this case, we will...
Burg / Grub 2 Icons for Meego
November 29, 2011
Only recently I noticed that Moblin (which I sometimes use) has changed...
Aircrack suite + Ubuntu 11.10 problems with monitor mode...
November 4, 2011
Recently I have been playing around with the aircrack suite and in...
Upcoming PhD QE Progress
July 27, 2011
So I've been doing my PhD for over two years now, and I haven't posted a...
Why Blanket Wireless Coverage in Waterloo Failed, and...
July 22, 2011
Today the KW Record ran an article entitled "Blanket Wi-Fi plans unplugged...
Windows 7 – SP1, Multiple OS – Grub
July 17, 2011
A while ago I bought a Toshiba netbook which of course came with Windows 7...








April 15, 2010

Categories:
Tags: 









Sitemap
Valid XHTML
Valid CSS
Login
hi, if ./build.py don’t work try ./install on dierctory ns-your_version
like cd ns-2.29 after ./intall and type “y” for yes that work it for me
gud luck
PS: I hve a bad english I know
Hey Jason! Great work with the blog!
However, it didn’t work even after the ‘/bin/rebaseall’ command and the link you posted the fix to the script is broken… Can you post a correct one, please?
Thank you!
I noticed the link went down, I will try to find a new one or reproduce the method I used to fix it. That will teach me for just hard-linking rather than rewriting the instructions :S
c’est trés important mais je n’arrive pas a instaler cygwin correctement si vous pouvez m’aider merci
hi
i hav installed cygwin properly
thenafter i hav also installed ns-3.11 with the help
of above mentioned procedure …..
but,when i tested it using “./test.py”
got error as:
OSError: [Errno 11] Resource temporarily unavailable
can u please tell me how to fix it up
hi Jason,
why i install cygwin .. about 95% happened “incomplete” messagebox…
is wrong about my step ?
I’ve succeeded until step 3 , but now I’m stuck at step 4….please i need help
Hi
thanks very much for your help.
I’am facing the “0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)” error in step 5. for solve this problem read her.
Thanks in advance
hello jason,
i am working on a project that involves ns-3 and mesh networking 802.11s .i was wondering if you could help ?? can i post my doubts here itself or can i contact you through e-mail
thanks
Pingback: How to install Cygwin in Windows7 64x and run Linux applications inside Windows | EkendraOnLine.com