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…

Installing Omnet++ in Windows 7

Installing Omnet++ in windows is a very easy task

Step 1:

Click the following link and download Omnet++ along with MinGW (Minimalist GNU for Windows – this gives the look and feel of Linux inside windows, it is similar like cygwin)

http://www.omnetpp.org/omnetpp/doc_download/2218-omnet-41-win32-source–ide–mingw-zip

Step 2:

Unzip the file to C:/

(Now your folder looks like this C:\omnetpp-4.1)

Step 3:

Open Command prompt and go to C:\omnetpp-4.1 (The command is cd \ and cd omnetpp-4.1)

Now type the command mingwenv.cmd and press enter (Please type the commands as given in the following pic)

tsp

Step 4 :

A new window will be opening which looks like a Linux Shell (as shown in the following pic)

tsp2

Step 5 :

Type the command configure (this command will check all the modules and set the path)

Type the command make (This will run for at least 10 minutes, but may vary machine to machine)

Once everything is done, you will get a successful message and type omnetpp to open the IDE

(Please Install JDK before all these steps, as Omnet++ IDE is based on Eclipse which needs JDK to be installed)

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

Xgraph

ns2 installation in Ubuntu 14.04