Software: Network Simulator (NS2) Setup
Major references:
[1] http://140.116.72.80/~smallko/ns2/setup.htm
1. Phase One: Cygwin Installation
1.1. Run Cygwin setup program directly from official Cygwin web sites.
1.2. Install from Internet and select 'for me'.
1.3. Choose mirror sites ftp://mirrors.kernel.org.
1.4. Expand the tree view and check the following packages:
XFree86-base, XFree86-bin, XFree86-prog, XFree86-lib
XFree86-etc, make, patch, perl, gcc, gcc-g++, gawk, gnuplot, tar, gzip.
1.5. Run cygwin.bat.
>> Troubleshooting for phase 1:
[1] http://140.116.72.80/~smallko/ns2/setup.htm
1. Phase One: Cygwin Installation
1.1. Run Cygwin setup program directly from official Cygwin web sites.
1.2. Install from Internet and select 'for me'.
1.3. Choose mirror sites ftp://mirrors.kernel.org.
1.4. Expand the tree view and check the following packages:
XFree86-base, XFree86-bin, XFree86-prog, XFree86-lib
XFree86-etc, make, patch, perl, gcc, gcc-g++, gawk, gnuplot, tar, gzip.
1.5. Run cygwin.bat.
>> Troubleshooting for phase 1:
a) Home environment variable setting: When we enter cygwin, by default, we should automatically enter home directory which has the format like /home/username, for example, /home/jamesz. If your home directory is strange, chances are that your cygwin HOME environment variable is overwritten by external Windows XP HOME environment variable. Note that it is a feature that cygwin can import external Windows XP environment variable settings into its own environment, such as PATH variable. But this behavior is not desirable when comes to HOME variable. One workaround is to edit c:\cygwin\cygwin.bat file and add the following line to reset the HOME environment variable in cygwin:
set HOME=C:\cygwin\home\jamesz
Now we can restart cygwin. If everything works properly, we should come to our default home directory and three files are copied to our home directory, and they are '.bash_profile', '.bashrc', and '.inputrc'. We can customize our environment settings by configuring these files.
--------------------------------------------
2. Phase Two: Network Simulator (NS) Installation
2.1. Download all in one software package from:
http://www.isi.edu/nsnam/ns/
http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz
2.2. Add the following lines in current users's '.bashrc' file.
export NS_HOME=`pwd`/ns-allinone-2.27
export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH
export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
2.3. Copy the compressed file to our home directory.
2.4. Decompress the file: tar xvzf ns-allinone-2.27.tar.gz.
2.5. Go to the ns2 directory and run './install'.
2.6. Optional: 'cd ns-allinone-2.27/ns-2.27'; './validate'.
2.7. Run 'startx' to start x windows.
2.8. 'cd ns-allinone-2.27/ns-2.27/ns-tutorial/examples';
'ns example2.tcl'.
set HOME=C:\cygwin\home\jamesz
Now we can restart cygwin. If everything works properly, we should come to our default home directory and three files are copied to our home directory, and they are '.bash_profile', '.bashrc', and '.inputrc'. We can customize our environment settings by configuring these files.
--------------------------------------------
2. Phase Two: Network Simulator (NS) Installation
2.1. Download all in one software package from:
http://www.isi.edu/nsnam/ns/
http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz
2.2. Add the following lines in current users's '.bashrc' file.
export NS_HOME=`pwd`/ns-allinone-2.27
export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH
export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
2.3. Copy the compressed file to our home directory.
2.4. Decompress the file: tar xvzf ns-allinone-2.27.tar.gz.
2.5. Go to the ns2 directory and run './install'.
2.6. Optional: 'cd ns-allinone-2.27/ns-2.27'; './validate'.
2.7. Run 'startx' to start x windows.
2.8. 'cd ns-allinone-2.27/ns-2.27/ns-tutorial/examples';
'ns example2.tcl'.
>> Troubleshooting in Phase 2:
a) Diff prompt message: select y.
b) Not responding when checking gcc -g option: Software version problem. If gcc packages are downloaded from the above recommended ftp site, this problem won't happen.
c) Error message about Perl: The perl version is not correct. Download the latest Perl version and delete ns2, and reinstall ns2.
--------------------------------------------
3. Phase Three: Modification and Make
3.1. Modify the source files if needed.
3.2. Go to ns-2.27 directory and run './configure'.
2.3. Make depend, make
>> Troubleshooting in Phase 3:
a) 'CPP_NAMESPACE' undeclared: This Make error can be solved by re-run make depend and then run 'make' again. Someone also posted other possible solutions that can be found here:
4. Other problems.
4.1. Re-installation: when you want to re-install NS2, it reports some strange errors something like "no rule to make xxxx, or no makefile in /ns-allinone-2.27/tcl8.4.5/unix/dltest/Makefile". When such error happens, one could go to the above directory, and then go to the parent directory and copy 'Makefile.in' to /dltest. It seems at least the installation can continue. If some other errors occur, one can try 'make depend' and then 'make'.

0 Comments:
Post a Comment
<< Home