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…

Installation of Network Simulator 2 (NS-2.35) in Linux Mint 14 (16bit)

The following video and the how to instructions will tell you how you can install ns-2.35 in Linux mint 14 (64 bit) edition.

  • Step 1: This video shows you the demonstration of ns2 in Linux Mint 14 (64Bit) OS
  • Step 2: issue this command in the terminal "sudo apt-get install build-essential autoconf automake libxmu-dev" (without Quotes)
  • Step 3: if you have Ubuntu issue this command first before u try step 2 : "sudo apt-get update"
  • Step 4: Once installation succeeded, start the process of installing ns2
  • Step 5: copy the ns-allinone-2.3x.tar.gz in the home folder, in my case it is /home/pradeep
  • Step 6: go to home folder and execute this command "tar zxvf ns-allinone-2.35.tar.gz"
  • step 7: cd ns-allinone-2.35 and ./install (after these commands, wait for the successful installation), it may take 5 min to 15 minutes based on the
    speed of your computer.
  • Step 8: there may be errors shown, in case if errors, the errors should be corrected and reissue the command ./install
  • step 9: There is an error on ns-2.35/linkstate/ls.h file, so the error has to be corrected as pointed out in the video,
    In line number 137, change erase to this->erase
  • Step 10: Once installation is succeeded, you will get some path information
    Step 11: set the paths in the .profile file which is under the home directory (/home/pradeep/.profile)
  • as specified in the video, copy the PATH url and LD_LIBRARY_PATH URL and paste in the .profile file.
  • Step 12: Once the path information is set, run the command to test the path "source /home/pradeep/.profile) and see there should not be any errors
    Step 16: try ns and nam individually and see whether they are working
    when you type ns and type enter a % symbol indicates the installation is successful
    when you type nam and a network animation window pop up.

Popular posts from this blog

AWK Scripts for NS2 to process data from Trace Files


ns2 installation in Ubuntu 14.04