Queuing Models in NS2

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 (NS-2.35) Installation in Fedora 16

This post will help you in installing Network Simulator 2 version NS2.35 in Fedora 16


  • Install Fedora using a DVD ISO (if you go for a CD iso, then you need to download lot of packages)
  • Download NS-2.35 from this website.
  • Unzip or untar it to any folder (recommended is /home/loginname) using the following commands one by one

tar zxvf ns-allinone-2.35.tar.gz

cd ns-allinone-2.35


  • Once installed the PATH information will be shown in the screen.
  • Copy the PATH and LD_LIBRARY_PATH Variable to .bash_profile (see a dot in the beginning)

Input the path information in .bash_profile like this

There will be a PATH Variable already available in the .bash_profile file, just copy the PATH information from the NS2 installation and append it over the existing PATH variable (but put a separator : between each path)

export PATH=$HOME/bin:<Put a colon and Place your paths here>

export LD_LIBRARY_PATH=<place the LD_LIBRARY_PATHS> here.

Once done, save the file and close

execute the command

source .bash_profile

try ns (if you see a % indicates ns is installed successfully) or nam (a animation window will be opened).

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files


ns2 installation in Ubuntu 14.04