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…

Installation of NS2 in Fedora 12

The ns2 version taken here is 2.34, if you downloaded any other version, please modify your version during installation

1)Uncompress the ns2

tar zxvf ns-allinone-2.34.tar.gz
or
gzip -d ns-allinone-2.34.tar.gz
tar xvf ns-allinone-2.34.tar

2) cd /opt/ns-allinone-2.34 (since /opt is the folder which is unused, so i have selected that folder to install, however you can install that in any folder)

3) ./install (execute the command)

4) If the installation fails in the middle, then try to install the linux packages that are necessary to run NS2. (In any linux (ubuntu or fedora or redhat or suse), install the TCL/TK, Perl packages during the installation of linux…)

5) Once the installation succeeded, then the path information will be provided by the NS2

6) Set the path in the /root/.bash_profile
(vi /root/.bash_profile)

or
If you are a user home/pradeep/.bash_profile (for example, if your the username is pradeep, then execute this command vi /home/pradeep/.bash_profile)
7) set the PATH and the LD_LIBRARY_PATH as per the output screen by NS2. (See the Video given below)

8. logout and login.

9) go to the terminal and try ns  (you will get a % symbol indicating that the installation is Successful)

10) for running the examples comes along with the distribution of NS2
cd /opt/ns-allinone-2.34/ns-2.34/tcl/ex

11. This is how you will see once the ns2 installation is success, from this information, you can put the PATH and LD_LIBRARY_PATH variable..

NS2 installation in Fedora 12

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

Xgraph

ns2 installation in Ubuntu 14.04