130 likes | 261 Views
Network Simulator and problems in installing. Introduction. Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems in compiling running the simulation. Problems in installing.
E N D
Introduction • Problems in installing • Wired networks • modified example2.tcl • commands in OTcl • usual problems in compiling • running the simulation
Problems in installing • Installation of NS2 is very easy if you pay attention on the following instructions. However, installing for me was very hard and it last very long time, about 10 days. There is a lot of problems I have meet, such as download speed, choosing the right server for downloading, installing the correct version of NS2. Now I will show you the best and most safe way for installing the NS2. • Installing Cygwin: First problem in installation of NS2 is Cygwin platform for Windows. On my computer I have Windows XP Service Pack 3 (SP3). I try to download cygwin , following instruction step by step from book by Apidach Booranawong, except I choose to download all components of Cygwin. But I have no success. At some point (usually about 99% of downloading) I get this message “Download incomplete. Try again?”. If you choose “Yes” the installation will start all over again and you have to waitfew hours (depend on download speed) to complete your work. If you choose “No”your Cygwin platform will be installed on your computer, but it will not be ready to support NS2. Another big problem is to choose right server for downloading the Cygwin. This is the most important step. When you start the installation after step 11 (page 5, Apidach Booranawong, “Network Simulator NS2”), you will need to choose some ftp or http for downloading. I choose many download sites, but most of them are very slow or not available or far away from Thailand, which is very important. And again I have’t success. • At this point I decided to start all over again, from the root.I do the following:
Problems in installing • Guide for installing Cygwin: • Choose right server for downloading. Always chose that one with word MIRROR or MIRRORS. For example you can choose: http://mirror.averse.net or http://mirror.calvin.edu. If you choose between http and ftp, you better choose http. • Don’t install every component of Cygwin (it lasts too long because you have to select file by file, there is no option select all). Install components shown on page No.2, Apidach Booranawong, “Network Simulator NS2”. Entire X11 and these packages: gcc, gcc-gcc+, gawk, tar, gzip, make, patch, perl, w32api. • If your download speed is high, you will finish the job very fast and safe. • After installation you must have these 3 files: .bash_profile .bashrc .inputrc, under c:\cygwin\home\MyComputerName. If you don’t have it, your installation failed. • If you still can’t install Cygwin uninstall Windows XP Service Pack 3 (SP3) and install Windows XP Service Pack 2 (SP2) and repeat steps 1,2,3,4.
Problems in installing • Installing NS2: “couldn’t execute” problem Second problem can be the version of Network Simulator. There is many version, for example “ns-allinone-2.28”, “ns-allinone-2.29” and the latest version at this moment “ns-allinone-2.33”. I choose to install ns-allinone-2.29, because this version have examples of some simulation inside folder c:\cygwin\home\MyComputerName\ns-allinone-2.33\ns-2.33\ns-tutorial\examples. The version ns-allinone-2.33 does not have implemented examples inside. It doesn not have folder ns-tutorial\examples. After installation of ns-allinone-2.29, there was a problem. I try to run command “ns example2.tcl” to see if my NS is working, but I get this message: running nam... ns: finish: couldn't execute "nam": no such file or directory while executing "exec nam out.nam &" (procedure "finish" line 8) invoked from within “finish”
Problems in installing • The problem was in version on Network Animator (NAM). When you download ns-allinone-2.28 or ns-allinone-2.29 or ns-allinone-2.30 you automatically get “nam-1.11” which has a bug. You can fix the bug by replacing the “NULL” with “0” in line 73 of file “agent.h” in nam-1.11 directory. Then set the path to c:\cygwin\home\MyComputerName\ns-allinone-2.33\ns-2.33 \nam-1.11 and then compile it again, run the command ./configure. I try it, but everything was same like before. I don’t know why. So I choose do uninstall ns-2.29, by deleting the directory ns-allinone-2.29, ns-allinone-2.33.tar.gz and deleting the file .bash_history under c:\cygwin\home\MyComputerName . Don’t delete these files: .bash_profile, .bashrc, .inputrc. I downloaded ns-allinone-2.33.tar.gz, and after installation everything was OK. • Guide for installing NS2: Install this verson of NS: ns-allinone-2.33.tar.gz. It’s the fastest and most safe way to make your NS usable. Now you have to copy the directory “examples” from your collegue which already have NS. Put this directory under the c:\cygwin\home\MyComputerName\ns-allinone-2.33\ns-2.33\ns-tutorial. Then check if your NS is working, by running the simulation. You have to type “ns example2.tcl”, but set the path first. Good luck!
Wired networks • original example2.tcl: CBR UDP 0 2 3 NULL 1 UDP CBR
Wired networks • my modified example: NULL CBR UDP 0 4 NULL UDP CBR 1 3 TCP 2 FTP 5 SINK
Wired networks • usual problems in compiling • first usual problem is the topology of the network. Topology must have sense. For example you can’t connect one source with two sink and send the packages at the same time. Every source has to be connected with one sink. • second usuall problem is error in syntax. For example if you replace character $ with # in front of the command $ns, you will get the error message.Or if you type “set sink0 [new Agent/TCPsink]” instead “set sink0 [new Agent/TCPSink]” you will again get the error message.
Wired networks • running the simulation: after checking the topology of network, syntax errors we can run the simulation. First thing we have to do is to set the path first. In my case: c:\cygwin\home\Sasa\ns-allinone-2.33\ns-2.33\ns-tutorial\examples and then run the simulation with command “ns NameOfExample.tcl”
Wired networks THE END