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…

Tracegraph installation in Fedora 12

To Install Tracegraph in Fedora Linux (I used Fedora 12)

  1. Step download the Tracegraph software from this link
  2. You need to download two files, mglinstaller.gz and tracegraph202.tar.gz
  3. Copy the files under /home/pradeep/ (in my case it is /home/pradeep/)
  4. Untar the tracegraph202.tar.gz using the command tar zxvf tracegraph202.tar.gz
  5. A Folder tracegraph202/ will be created and go to the folder using the command cd tracegraph202 or cd /home/pradeep/tracegraph202
  6. copy the mglinstaller.gz file inside the tracegraph202/ folder
  7. now execute the command to unzip the mglinstaller.gz using the following command gzip -d mglinstaller.gz
  8. Run the mglinstaller by executing the command ./mglinstaller (see the . in the beginning)
  9. The above command will create a folder within the bin folder and set the following lines to the LD_LIBRARY_PATH variable export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/pradeep/tracegraph202/bin/glnx86
  10. The above path will be set to the LD_LIBRARY_PATH Variable in the following file .bashrc which will be available at /home/pradeep (each username will have such a file in the corresponding folder, if you are using more number of users, each user should be set with the LD_LIBRARY_PATH, root will be having the .bash_profile at /root/.bashrc).
  11. To open this file type either vi /home/pradeep/.bashrc or gedit /home/pradeep/.bashrc and include the line of code given in step 10.
  12. Save the file, close and logout and login and go to the tracegraph202 folder and run ./trgraph (thats it!!!!)
  13. After step 13, some Linux versions will get an error called libXp.so.6 error, to overcome that give this command by connecting your machine to internet yum install libXp.so.6 or else download the package XFree86-libs-4.1.0-50.i386.rpm from the website http://rpm2html.osmirror.nl/redhat-archive/updates/7.1/en/os/i386/XFree86-libs-4.1.0-50.i386.html   and then install the package by giving rpm -ivh  XFree86-libs-4.1.0-50.i386.rpm and thats it.
  14. (NB: My username in my System is /home/pradeep/, so all the above steps will be working for me, if your system contains other usernames, then please updated that and add to the paths) all the Best!!!!!!!!!
    (For better results, see the Video given below)

Tracegraph Installation in Fedora 12

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files

Xgraph

LEACH protocol installation in ns2 (ns-2.35)