Queuing Models in NS2

Image
M/M/1 is a system with poisson arrival time, servicing exponentially and a queue of unlimited capacity and type of FIFO Queue. This is the simplest queuing system.  NS2 supports various distributions like pareto, exponential, constant, unifrom, etc to handle the network dynamics and metrics. So it is very easy to test the given network link to monitor a given queue using any of these queuing models. The listing 3 and 4 are monitoring the link when DropTail queue is used with a capacity of finite and infinite. Listing 13.3 uses infinite capacity and Listing 13.4 uses Finite capacity The output screen shot is shown below the scripts for further understanding
Listing 3 – M/M/1 Queuing Model #new Simulator creation set ns [new Simulator] #trace file creation for capturing the UDP data set tf [open out.tr w] $ns trace-all $tf
#setting the exponential distribution param set lambda 30.0 set mu     33.0
#creation of nodes set n1 [$ns node] set n2 [$ns node] #The queue limit is 1Lakh as the capacity is infin…

NS2.35 installation in Fedora 15 and Ubuntu 11.10

NS 2.35 can be installed successfully in Fedora 15 and Ubuntu 11.10 using the following steps

In Fedora 15
  1. Download ns-allinone-2.35 from the NS2 website. The recent version was RC8
  2. select the folder /home/username, untar the file using the command "tar zxvf ns-allinone-xxx.tar.gz" (without quotes).
  3. Go to the folder /home/username/ns-allinone-2.35/ using the command cd  /home/username/ns-allinone-2.35 /  and execute the command ./install (dot /install)
  4. You may encounter an error in the file mac_80211Ext.h and correct the error given in the following line
  5. Open the file /home/username/ns-allinone-2.35/ns-2.35/mac/mac_80211Ext.h and include the following line in the header file area
    1. #include <cstddef>
  6. Go to step3 and type ./install 
  7. Once installation completed, set the path information in .bash_profile (dot bash_profile)
    1. you need to set two path variables PATH and LD_LIBRARY_PATH
    2. please see this link for setting the path http://pradeepkumar.org/54/installation-instructions-for-network
For Ubuntu 11.10
  1. Please see step1 and step 2 in Fedora 15
  2. Ubuntu needed some software to be installed before installation of NS2. execute the following command to install
    1. sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4 
  3. You need to connect your machine to internet.
  4. Once all the packages are downloaded, go to step 3,4,5 and 6 from Fedora 15 installation.
  5. Once installation completed, set the path information in .bashrc (dot bashrc)
    1. you need to set two path variables PATH and LD_LIBRARY_PATH
    2. please see this link for setting the path http://pradeepkumar.org/54/installation-instructions-for-network
In both the above Operating System, you may come across an error while running ns and nam in the terminal window
The error may be ****Buffer Over flow - ns termination ***
To overcome this error, edit the following file
/home/username/ns-allinone-2.35/tcl8.5.8/unix/Makefile.in
Replace the following line
CC = @CC@
with
CC=gcc-4.4
and reinstall the steps (step3 in fedora 15 and step 4 in Ubuntu) as mentioned above.
Logout and login back

That's it.

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

Xgraph

LEACH protocol installation in ns2 (ns-2.35)