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.34 installation in Ubuntu 11.04

Already this blog posts various titles on installing NS2 in Linux distros. Here is the step for installing in Ubuntu 11.04.

1. Version taken is NS2.34

2. Since ubuntu 11.04 uses GCC-4.5.2, there should be some minor tweeks.

3. Two files should be edited ~ns-2.34/tools/ranvar.cc and ~ns-2.34/mobile/nakagami.cc  as given in the following post

http://pradeepkumar.org/2011/06/installing-ns-2-34-in-fedora-14.html

4. Install the following things in Ubuntu

sudo apt-get install build-essential autoconf automake libxmu-dev

sudo apt-get install gcc-4.4

5. open the file ~ns-2.34/otcl-1.13/configure and change the line number 6304 to SHLIB_LD="gcc -shared" instead of SHLIB_LD="ld -shared"

6. open the file ~ns-2.34/otcl-1.13/Makefile.in and change the line CC    @CC@ to CC    gcc-4.4

7. Set the path in /home/<name>/ .bashrc as in http://pradeepkumar.org/2009/11/installing-ns2-under-ubuntu-910.html

8. After setting the path, sometimes overflow error may come when running ns and nam, so open the file ~ns-2.34/tcl8.X.x/unix/Makefile.in and in line number 270 change @CC@ to @CC@ –V 4.4

Thats it!!! NS2 Installed.

(Thanks to: http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/)

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

Xgraph

ns2 installation in Ubuntu 14.04