Here I will show you how to install NS2 on Windows 7(32-bit | 64-bit):
Step 1:
Please go to below given link and download the three .rar files after that place these files into in a single folder.
- Part 1:NS 2.35-Part1
- Part 2:NS 2.35-Part2
- Part 3:NS 2.35-Part3
Step 2:
- Now Extract the NS 2.35.part1 only.It will extract the part2 an part3 automatically.
- Extract after complete download
- Don’t Extract the part2 and part3
Step 3:
- After extraction you’ll get a folder named NS 2.35
- Inside this folder you get cygwin setup , .bashrc etc..
- Now install the setup. Choose install from local directory
- Press Next
- Don’t change the default Root Directory
- In Local Package Rpository field browse to: NS 2.35/nslocal/release
- Click Next
- Click on the Circle
- After clicking the circle the default turn to install
- After this press Next it will install the necessary packages for NS2
- check create a desktop shortcut and start menu shortcut
- Then installation finished.:)p
- Now you are halfway done !!!
Step 4:
- Now create a folder Named Noureddine inside the C:\cygwin\home
- Now copy the ns-allinone-2.35-RC7avecxgraph.rar and Extract there. You’ll get ns-allinone-2.35-RC7 folder.
- Now cpoy the .bashrc file from the downloaded Extract folder
- Now go to the “C:\cygwin\home\user” folder and replace(i.e paste) the .bashrc file that you copied.
- Now open the Cygwin command window which is on your desktop and type source .bashrc
- Now type ns “$” change to “%”
- Now type ns-version it will show like:
- Now press exit.
- Now type startxwin you’ll get a new window.
- Now type nam you will get a screen.
- Now go to file and quit the nam window
- Now hold the main tab and drag your mouse to quit from Cygwin window(the white window)
- And exit from ‘cygwin command’ window (type exit)
- Important:
- go to Task manager (Alt+Ctrl+Del) and goto process tab and search for XWin.exe
- End process
hi
how to execute the coding
LikeLike
Process is Same. Open the cygwin window, after that set the directory where you have your code. Now just run “ns filename.tcl”.
LikeLiked by 1 person
Process is Same. Open the cygwin window, after that set the directory where you have your code. Now just run “ns filename.tcl”.
how?
LikeLiked by 1 person
Dear
when i write command ” ns filename.tcl ”
i got this problem ” could not read the file “wireless.tcl” no such file in the directory.
but the file exist and i can run wireless.nam and work with me fine but wireless.tcl no can not work or run
thanks
LikeLike
I have not got the ns-allinone-2.35-RC7avecxgraph.rar folder after unzipping
LikeLike
Have you download all thee parts??. You need to extract only first part.
LikeLike
yes we download all 3 parts but extract only first part and part 2 and 3 will extract automatically.
LikeLike
yes same.
LikeLike
Hi, I am getting below error, any idea why ?
$ startxwin
giving up.
startxwin: No such file or directory (errno 2): unable to connect to X server
startxwin: No such process (errno 3): Server error.
LikeLiked by 1 person
That’s mean, file not install properly. Install again.
LikeLike
which file?
LikeLike
how to fix bash:ns: command not found error?
LikeLike
after typing ns in cygwin it shows ns command not found… what should i do
LikeLike
Please check ns executable file is generated in your folder.
LikeLike
I have same error and I don’t have the ns executable. What can I do?
LikeLike
Yes, for me also it’s not showing. Could you please explain how to resolve it?
LikeLike
I am getting the following error when running startxwin. What to do ?
$ startxwin
0 [main] startxwin 26988 exception::handle: Exception: STATUS_ACCESS_VIOLATION
573 [main] startxwin 26988 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
2 [main] startxwin 10712 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1289 [main] startxwin 10712 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
giving up.
startxwin: No such file or directory (errno 2): unable to connect to X server
startxwin: No such process (errno 3): Server error.
LikeLike
Dear
Thank you very much, i have install ns2 on windows 7, but i have problem if you allow me which is i need to use xgraph for display PDR or throughput. how should i do or install to get them.
thanks again
LikeLike
Xwin server is not opening. What to do?
LikeLike
Which operating system, you are using 32 or 64 bits.
LikeLike
i am using 32 bits operating system, Xwin server is not opening!
LikeLike
I test many times on 32 bits and its perfect very well. Cross check all the steps once again.
LikeLike
In which drive do we need to extract the .rar files in?
LikeLike
you can extract in any directory.
LikeLike
i have one problem i could not solve and make running or executing not working with me, which is.
for step which is.
here when i type ” ns” it gives me error message which is
” bash: ns :command not found ”
i do not know howto solve it because i can not run or execute and program.
could you provide me your help to solve this problem
LikeLike
Hello Muhannad,
Its means , ns executable file not generated in the folder.
LikeLike
what is the solution?
LikeLike
thank you i solve the problem and it works fine.
and i need to know something,
how can i get the output for such as performance or PDR or throughput.
thanks again
LikeLike
Hello,
1) First you need to design a TCL files according to your requirement.
2) When you will run the TCL then you will get trace file (.tr) and network file (.nam)
3) Now you need to download awk file for throughput and pdr.
4) Put these two awk file into same folder of tr file
5) Now run this command “awk -f pdr.awk filename.tr”
6) Now results will come on terminal.
Thank you.
LikeLike
Dear
could you send me the link for AWK file to download it.
LikeLike
bashrc command not found help
LikeLike
couldn’t read file “$”: no such file or directory plzz help
LikeLike
I checked this problem happen in 64 bits.
LikeLike
How to Patch Fishe Eye state routing Protocol in NS2.35?
LikeLike
Apply a patch in ns2.35 is very simple. Do you have patch?.
LikeLike
when i type startxwin it shows error
LikeLike
Attached a print screen so that I can see the error.
LikeLike
bash: ns: command not found
1 [main] startxwin 16240 exception::handle: Exception: STATUS_ACCESS_VIOLATION
876 [main] startxwin 16240 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
1 [main] startxwin 16264 exception::handle: Exception: STATUS_ACCESS_VIOLATION
867 [main] startxwin 16264 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
0 [main] startxwin 16288 exception::handle: Exception: STATUS_ACCESS_VIOLATION
762 [main] startxwin 16288 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
1 [main] startxwin 16312 exception::handle: Exception: STATUS_ACCESS_VIOLATION
831 [main] startxwin 16312 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
1 [main] startxwin 16336 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1050 [main] startxwin 16336 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
1 [main] startxwin 16360 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1347 [main] startxwin 16360 open_stackdumpfile: Dumping stack trace to startxwin.exe.stackdump
0 [main] startxwin 16192 fork: child -1 – died waiting for longjmp before initialization, retry 0, exit code 0x8B00, errno 11
startxwin: Resource temporarily unavailable (errno 11): Server error.
LikeLike
Hello Nidhi,
ns not found means ns2 not install in you windows, which operating system are you using?
LikeLike
Windows 10
LikeLike
Hello,
I want to know about the OS for ns2, Windows 7/10 (32/64 bit) which will better?
LikeLike
Windows 7 32 bits
LikeLike
bash: ns: command not found
what can i do ,
i use window 10
LikeLike