The need for network simulators

The need for network simulators

ns2
Source of this article: MOHIT’S DEN The three main techniques to analyze the behavior of wired and wireless networks are: Analytical Modeling, Computer Simulations and Real Time Physical Measurements. Analytical Modeling is very tedious and Real Time Physical Measurements may not be possible all the time. Computer Simulation is the only feasible approach to the quantitative analysis of networks. Computer Simulations can be Discrete Event Simulations (e.g.: arrival and departure of customers in a bank) or Continuous Simulations (e.g.: waterflow in a mountain). Computer Simulations are generally Discrete Event Simulations. Network Simulator – 2 (NS-2) is a discrete event and packet level simulator developed at UC Berkeley to analyze the performance of wired and wireless networks. The architecture of NS-2 is composed of five components:: Event Scheduler (there are four: List,…
Read More
Cognitive Radio Network Simulator(CRCN) installation

Cognitive Radio Network Simulator(CRCN) installation

ns2
Cognitive Radio Cognitive Networks(CRCN) Simulator is based on ns2 simulator. In this post I would explain in detail the steps needed to run CRCN simulations in your Linux. Note: The installation is successful only in version 2.31 of ns (ns-allinone-2.31) Step 1: Download CRCN from <here> and ns-allinone-2.31 from <here> Step 2: IMPORTANT: backup your ns-allinone-2.31 folder before proceeding. This is will help us to restore the working ns2 installation in case anything unexpected occurs. Step 3: Extract CRCN.zip and you will see several files inside that. You have to copy each file in that and replace the corresponding files in ns2.31 folder. Let me explain this in more detail. If you have a folder named AODV in crcn. Copy all its contents and paste it in /home/micman/ns-allinone-2.31/ns-2.31/aodv folder. Here…
Read More
Installing Ns2.34 with Mannasim in Linux Mint 14

Installing Ns2.34 with Mannasim in Linux Mint 14

ns2
GCC version used: 4.7.2 This is the version of GCC that comes default with Linux Mint 14. If you wish to install ns2.34 without Mannasim skip steps 4 and 9. 1. Download ns-allinone-2.34 from this site: http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz/download 2. Extract the downloaded file into your home folder(say, /home/micman) Throughout this post, I shall be mentioning my home folder /home/micman. When you follow these procedures, replace my username micman with your username. 3. Place the file ns2.34-mannasim-gcc4.3.patch into the following folder: /home/micman/ns-allinone-2.34 4. In Terminal, type the following commands: cd /home/micman/ns-allinone-2.34 path -p1 < ns2.34-mannasim-gcc4.3.patch 5. If the patch gets applied without any error, proceed to next step open the following file /home/micman/ns-allinone-2.34/otcl-1.13/configure Replace the following lines: Linux*) SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -shared" SHLIB_SUFFIX=".so" DL_LIBS="-ldl" SHLD_FLAGS="" with the following: Linux*) SHLIB_CFLAGS="-fpic" SHLIB_LD="gcc -shared" SHLIB_SUFFIX=".so"…
Read More
Finding Node Position,Velocity and Speed in NS2.34

Finding Node Position,Velocity and Speed in NS2.34

ns2
In this article I would explain the use of three predefined functions in MobileNode.cc to access a nodes position,velocity and speed dynamically. Let me choose the AODV protocol. 1. Include mobilenode.h header in aodv.h #include<mobilenode.h> 2. In protected scope declare the variables you would be using to store the node parameters. double xpos; double ypos; double zval; int node_speed; MobileNode *iNode; 3. In aodv.cc initialize the declared variables. xpos = 0.0; ypos = 0.0; val = 0.0; node_speed = 0; MobileNode  *iNode; 4. Finally access the required functions from mobilenode.h. I am accesing those functions from AODV::forward() function /***This code retrieves node position*****/ iNode = (MobileNode*) (Node::get_node_by_address(index)); ((MobileNode *) iNode)->getLoc(&xpos,&ypos,&zpos); printf("Position of %d,  X=%f,  Y=%f,  Z=%f   \n ", index,  xpos, ypos, zpos); /***This code retrieves the nodes velocity*****/ iNode…
Read More

Common errors in Ns2 installation and solutions

ns2
Troubleshooting If the tk compilation failed, especially for tk3d.c, make sure you have installed libx11-dev package. If the otcl configuration failed, make sure you have installed x-dev and xorg-dev packages. Error: nsbash: ns: command not found Solution: This could be because you have not set the $PATH variable. Therefore, the OS does not know where to look for the command “ns“. more detailed solution <here> Error: Segmentation Fault Solution: found here Error: Undefined reference to vtable Solution: found here
Read More

Installing Network Simulator(ns2.34) in Ubuntu10.10

ns2
PROCEDURE 1: This procedure works in all latest versions of Ubuntu. Install ns,nam and xgraph by just a single command in the Terminal: $ sudo apt-get install ns2 nam xgraph You will be prompted for the user password. Enter it and watch Ubuntu do the things for You!   PROCEDURE 2: These are the steps to install ns2.34, the traditional way. Step1: Download ns-allinone-2.34 package from here: http://sourceforge.net/projects/nsnam/files/ I will be using ns version 2.34. Step2: Place the ns-allinone-2.34.tar.gz file in your home folder(/home/micman in my case). Right click on the package and extract the contents in the same home folder. Step3: Next, open the Terminal(Applications–>Accessories–>Terminal in ubuntu) Step4: Change to ns-allinone-2.34 directory $ cd /home/micman/ns-allinone-2.34 Step5: First, Install the dependencies $ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3…
Read More