Skip to main content

Posts

TCL installation error

In case, if ns2 have to be recompiled based on a new addition of protocol or agent, there should be an entry to the Makefile.in. After the changes are made, the following things need to be done to compile the agents. $] ./configure  $] make  but ./configure may throw an error as shown below like "Configure: Error: Installation of Tcl Seems to be incomplete or not found" TCL Error To correct this problem, please try the following $] ./configure --with-tcl-ver=8.5  The above works only after the successful installation of ns2. If you are installing ns2 for the first time refer this blog post http://www.nsnam.com/2014/11/ns2-installation-in-ubuntu-1404.html T S Pradeep Kumar

Introduction to Contiki OS

Introduction to Contiki OS To install Contiki: Refer this post :  http://www.nsnam.com/2014/09/contiki-os-operating-system-and.html To Refer the Characteristics and comparison of Various OS, refer this Slides: Operating System fo IoT from T S PRADEEP KUMAR How to use Contiki OS for Sensor Simulation - A Detailed video is enclosed herewith. It tells about Oracle Virtual Box How to create a Sensor mote using Contiki How to write a new App in contiki What are the different windows that categorise? and lot more. Refer this video T S Pradeep Kumar

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 [...

Random Number Generation using ns2

Random variables is an important concept in networks as the modeling of network traffic and other packet arrival times are mostly random models. Hence there is a necessity of modeling such metrics in ns2. NS2 supports various random models using different seed generations. Seeds are numbers that are helpful in generating the random numbers. The seed number 0 indicates that the random number order changes every time the simulation is running. But other than 0, the order in which the random number generated are same. The following listing 1 shows the random number generation for various distributions. This listing will just tell you how to create random number generation for various distributions. For seeing the output, refer to listing 2 Listing 1 – Random Number Generation Sample #create the random number generation using RNG set rand1 [new RNG] set rand2 [new RNG] set rand3 [new RNG] #$repli is the value set already and it can be either 1 or <1...

Multicasting in NS2

Mutlicast routing in ns2 can be easily set using any of the following syntax Method 1:         set ns [new Simulator -multicast on] Method 2:         set ns [new Simulator]         $ns multicast when multicast mode is enabled, the nodes behave differently with the additional classifiers are created. A distribution tree kind of structure is created in the simulation when dealing with multicast routing.  NS supports three types of multicast routing: Centralized Multicast Routing(CM), Dense Mode (DM), Shared Tree Mode (ST) and Bi directional Shared Tree Support (BST). Here is the method to specify the multicast routing in ns. set cmc [$ns mrtproto CtrMcast]    # specify centralized multicast for all nodes; # cmc is the handle for multicast protocol object; $ns mrtproto DM            ...