Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Wednesday 30 April 2014

OLSR PATCH FOR NS2

UM-OLSR

UM-OLSR is an implementation of the OLSR (Optimized Link State Routing) protocol for the ns-2 Network Simulator. The code is released under the terms of the GNU General Public License (GPL). Due to lack of time this project is not maintained by myself any more, feel free to take over the task of maintenance if you are interested.

UM-OLSR complies with IETF RFC 3626 and supports all core functionalities of OLSR plus the link-layer feedback option. The software has been successfully tested on ns-2, and patches for several versions of the simulator are provided. It is widely employed by the wireless communications research community, as the high number of references in research papers reveal. In addition, it was ported to ns-3 by Gustavo Carneiro (INESC Porto) and to Omnet++ by Alfonso Ariza (Universidad de Málaga). Thus, you can also run OLSR simulations in modern network simulators.
      

Features

Compliant with core OLSR (as described in RFC 3626).
Support for link-layer feedback.
Highly configurable from TCL scripts, i.e., without the need of recompiling the whole simulator. You can:
Activate/deactivate debug mode.
Change the interval at which every message type is sent.
Change nodes’ willingness for forwarding data packets on behalf of other nodes.
Print whatever data structure managed by a node at a certain time.

Download

The source code of UM-OLSR in hosted on SourceForge.net: download.

Contributed patches

Here you can find a sample script for configuring a simulation, as well as some UM-OLSR patches for different versions of ns-2 that were contributed by different people. Thanks a lot to all of them.

olsr_example.tcl
um-olsr-2.33_v0.8.8.patch by Damian Philipp.
um-olsr-2.34_v0.8.8.patch by Damian Philipp.
um-olsr-2.35_v0.8.8.patch by Andrey Lyubimov.

Installation

I assume that you have downloaded and unpackaged the allinone distribution of ns-2 (any of the versions supported by UM-OLSR). Copy um-olsr-0.8.8.tgz (substitute “0.8.8″ for your UM-OLSR version number) into ns-allinone-2.29/ns-2.29/ (substitute “2.29″ for your ns-2 version number), and then do:$ cd ns-allinone-2.29/ns-2.29/ $ tar zxvf um-olsr-0.8.8.tgz $ ln -s ./um-olsr-0.8.8 ./olsr $ patch -p1 < olsr/um-olsr_ns-2.29_v0.8.8.patch

If you had not installed ns-2 yet, then do the following:
$ cd ..
$ ./install
On the other hand, if you are installing UM-OLSR on a running installation of ns-2:
$ ./configure
$ make distclean
$ ./configure
$ make
Note that the code should work on most ns-2 releases, but only patches for some versions are provided. If you need UM-OLSR on a different ns-2 version, just create the appropriate patch and share it if you want.
Using UM-OLSR can be used like any other routing agent in ns-2, so you can use the node-configcommand to attach an OLSR routing agent to the mobile nodes which are to be created.$ns_ node-config -adhocRouting OLSR
After creating your mobile nodes, you can configure each UM-OLSR routing agent individually or all at once. But first we will see the available configuration options and their default value.
debug_ : Print debugging messages on stdout (false).
use_mac_ : Enable link-layer feedback (false).
willingness_ : Set the willingness for forwarding data packets on behalf of other nodes (WILL_DEFAULT = 3).
hello_ival_ : Set the interval of HELLO messages transmission (2 sec).
tc_ival_ : Set the interval of TC messages transmission (5 sec).
mid_ival_ : Set the interval of MID messages transmission (5 sec). This has no actual effect in the simulation, since multiple interfaces are not supported.

In oder to configure all agents, write sentences like these:
Agent/OLSR set debug_ true
Agent/OLSR set hello_ival_ 3
In order to configure a single agent:
set ra [$mobilenode agent 255]
$ra set use_mac_ true
$ra set tc_ival_ 6
By default, every UM-OLSR packet may piggyback up to 4 OLSR messages. You can change this value by redefining the OLSR_MAX_MSGS constant and recompiling the simulator. For the simulation results, the length of IPv4 addresses are assumed by default. If you prefer the length of IPv6 addresses, define OLSR_IPv6 and compile again.
           Once you have performed a simulation, you get a trace file where you can see what happened during the execution. Let us see with some examples the format of the traces generated by UM-OLSR. Following examples use the classic notation of ns-2 trace files. However, “tagged” and “new trace” formats are also supported.
s 21.537326976 _0_ RTR  --- 98 OLSR 56 [0 0 0 0] -------
 [0:255 -1:255 32 0] [1 12 [HELLO 0 0 12]]
The line above indicates that node 0 is sending an OLSR packet (size = 56 bytes) which contains one HELLO message. Specific information about the OLSR packet is by the end of the line (inside the final brackets): number of contained messages, packet sequence number, and the list of OLSR messages. Then we find information about the messages themselves: type, originator address, hop count and message sequence number.
r 13.833447485 _2_ RTR  --- 45 OLSR 84 [0 ffffffff 1 800] -------
 [1:255 -1:255 32 0] [2 10 [HELLO 1 0 10][TC 1 0 11]]

The example above shows the reception of a packet which piggybacks two messages, one HELLO and one TC. Information about each one is also shown. If you need further details about the ns-2 trace formats, please see the ns-2 manual.

courtesy:mohit p thahiliani

Sunday 27 April 2014

NSG 2.1 - THE TCL SCRIPT GENERATOR

NS2 Scenarios Generator (NSG) is a tcl script generator tool used to generate TCL Scripts automatically . . . !!!

NSG is a Java based tool that runs on any platform and can generate TCL Scripts for Wired as well as Wireless Scenarios for Network Simulator - 2. The procedure to execute these TCL Scripts on NS-2 is same as those of manually written TCL Scripts.

Some of the main features of NS2 Scenarios Generator (NSG) are as mentioned below:

(1) Creating Wired and Wireless nodes just by drag and drop.
(2) Creating Simplex and Duplex links for Wired network.
(3) Creating Grid, Random and Chain topologies.
(4) Creating TCP and UDP agents. Also supports TCP Tahoe, TCP Reno, TCP New-Reno and TCP Vegas.
(5) Supports Ad Hoc routing protocols such as DSDV, AODV, DSR and TORA.
(6) Supports FTP and CBR applications.
(7) Supports node mobility.
(8) Setting the packet size, start time of simulation, end time of simulation, transmission range and interference     range in case of wireless networks, etc.
(9) Setting other network parameters such as bandwidth, etc for wireless scenarios.

The Snapshots of NSG is as shown below:

 







 

Download NSG2 :

NSG2 (2007/5/20)
NSG2.1 (2008/11/18)
If you still wanna download NSG1 (previous version of NSG), it can be found here.
To execute NSG you need to install Java 6.0. NSG does not require any installation . . . !!! Just double click on the jar file to launch NSG. If it does not work, please see the instructions provided on the homepage of NSG here.

For more information on NSG and its previous versions, please visit the homepage of NSG here.

Launch NSG2 :

To execute NSG2, you have to install JAVA6.0 first. You can download JAVA6.0 from http://java.sun.com/. The details of JAVA6.0 installation, please refer to Sun JAVA site.
NSG2 doesn't need to be installed in your computer. You just download it and launch it with following instruction under TERMINAL command environment. 
In fact, on my computer system, Ubuntu 12.04 I just double click the NSG2.jar, and NSG2 will automatically launch. If it doesn't launch, you can also launch NSG2 as following instructions.
  • open terminal
  • change directory into the folder where NG2.1.jar is copied.
  • type this cammand
    java -jar NSG2.1.jar

Click here


Saturday 26 April 2014

BonnMotion: A MOBILITY SCENARIO GENERATION AND ANALYSIS TOOL

BonnMotion is a Java software which creates and analyzes mobility scenarios and is most commonly used as a tool for the investigation of mobile ad hoc network characteristics. The scenarios can also be exported for several network simulators, such as ns-2, ns-3, GloMoSim/QualNet, COOJA, MiXiM, and ONE. BonnMotion is being jointly developed by the Communication Systems group at the University of Bonn, Germany, the Toilers group at the Colorado School of Mines, Golden, CO, USA, and the Distributed Systems group at the University of Osnabrück, Germany. Several mobility models are supported, namely
  • the Random Waypoint model,
  • the Random Walk model,
  • the Gauss-Markov model,
  • the Manhattan Grid model,
  • the Reference Point Group Mobility model,
  • the Disaster Area model,
  • the Random Street model,
  • and more.

Download

Download BonnMotion v2.1a (2013-09-08)
Download SMOOTH bugfix for v2.1 (2013-09-08)
Download BonnMotion v2.1 (2013-07-08)
Download BonnMotion v2.0 (2011-11-07)
Download BonnMotion v1.5a (2011-03-03)
Download BonnMotion RPGM Bugfix (2011-03-03)
Download BonnMotion v1.5 (2010-12-23)
Download WiseML patch for v1.4 (2010-07-05).
Download BonnMotion v1.4 (2009-10-28).
Download BonnMotion v1.3a (2009-03-11).

Installing BonnMotion

 Just run the "install" script from the BonnMotion directory (since BonnMotion v2.0, "compile" is run automatically at the end of the install script).
On Linux:

  1. BonnMotion requires a Java Runtime Engine (JRE) and a Java Development Kit (JDK).Open the terminal and type

    sudo apt-get install openjdk-7-jre openjdk-7-jdk 


  1. Unzip BonnMotion archive: unzip bonnmotion-2.0.zip
  2. Change directory to BonnMotion directory:such as /usr/local/src unzip bonnmotion-2.0.zip

    cd bonnmotion-2.0/
  3. Run install script:

    ./install
    You will be queried as follows: Please enter your Java binary path [/usr/bin]:

    simply hit return.
  4. Run BonnMotion from "bin" folder: cd bin && ./bm

    You may next see the following: 
 Creating scripts ... bm ... compile ... makedoc ... done.
 Starting compilation ...
 Compiling EdgeList.java ... done.
 Compiling Model.java ... done.
 Compiling CatastropheNode.java ... done.
 Compiling Nomadic.java ... done.
 Compiling RandomWaypoint.java ... done.
 Compiling ChainScenario.java ... done.
 Compiling RandomDirection.java ... done.
 Compiling ClusterMember.java ... done.
 Compiling Cluster.java ... done.
 Compiling SLAWBase.java ... done.
 Compiling RPGM.java ... done.
 Compiling Pursue.java ... done.
 Compiling RandomWaypoint3D.java ... done.
 Compiling Column.java ... done.
 Compiling SLAW.java ... done.
 Compiling ProbRandomWalk.java ... done.
 Compiling Static.java ... done.
 Compiling RandomWalk.java ... done.
 Compiling RandomStreet.java ... done.
 Compiling SteadyStateRandomWaypoint.java ... done.
 Compiling GaussMarkov.java ... done.
 Compiling TIMM.java ... done.
 Compiling OriginalGaussMarkov.java ... done.
 Compiling StaticDrift.java ... done.
 Compiling ManhattanGrid.java ... done.
 Compiling Visplot.java ... done.
 Compiling WiseML.java ... done.
 Compiling GPXImport.java ... done.
 Compiling Cut.java ... done.
 Compiling TheONEFile.java ... done.
 Compiling SPPXml.java ... done.
 Compiling ScenarioConverter.java ... done.
 Compiling LinkDump.java ... done.
 Compiling LongestLink.java ... done.
 Compiling IntervalFormat.java ... done.
 Compiling Dwelltime.java ... done.
 Compiling GlomoFile.java ... done.
 Compiling NSFile.java ... done.
 Compiling Statistics.java ... done.
 Compiling SampleSet.java ... done.
 Compiling Function.java ... done.
 Compiling GeometricMeanCalculator.java ... done.
 done.
 $ ./bin/bm -h
 Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/bonn/cs/iv/bonnmotion/run/BM : Unsupported major.minor version 51.0
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
 Could not find the main class: edu.bonn.cs.iv.bonnmotion.run.BM. Program will exit.

There are two errors above:
  1. The "Unsupported major.minor version 51.0" error is due to using a different version JRE than JDK. You probably installed openjdk-7-jdk but note that it also installs openjdk-6-jre and sets version 6 to the default. You can change this by running 'sudo update-alternatives --config java' and selecting '/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java' which matches your compilation environment.
  2. your system could not find the classes provided by BonnMotion; this is a problem with the Java CLASSPATH.

Friday 25 April 2014

VARIABLE BIT RATE [VBR] IMPLEMENTATION IN NS2

We just made a VBR application that randomly change rate or bursts depending on parameters set.

In order to use it in ns you have to follow:

  1. Include vbr_traffic.o in Makefile.in 
  2. Preferrably set the default values in /home/user/Desktop/ns-allinone-2.35/ns-2.35/tcl/lib 
  3. Run ./configure in your ns-allinone-2.35 directory 
  4. Run make depend in ns-allinone-2.35
  5. Run make


Now your VBR is ready.

Default values in ns-default.tcl:

Application/Traffic/VBR set rate_ 448Kb ;# corresponds to interval of 3.75ms 
Application/Traffic/VBR set rate_dev_ 0.25; 
Application/Traffic/VBR set rate_time_ 2.0; 
Application/Traffic/VBR set burst_time_ 1.0; 
Application/Traffic/VBR set n_o_changes_ 10; 
Application/Traffic/VBR set time_dev_ 0.5; 
Application/Traffic/VBR set constant_ false; 
Application/Traffic/VBR set maxrate_ 648Kb; 
Application/Traffic/VBR set packetSize_ 210; 
Application/Traffic/VBR set maxpkts_ 268435456; # 0x10000000


For vbr .cc file, Click here
For ns-default.tcl, Click here


VBR SYNTAX:

set vbr [new Application/Traffic/VBR]
$vbr set rate_ 448Kb
$vbr set rate_dev_ 0.25
$vbr set rate_time_ 2.0
$vbr set burst_time_ 1.0
$vbr set n_o_changes_ 10
$vbr set time_dev_ 0.5
$vbr set constant_ false
$vbr set maxrate_ 648Kb
$vbr set packetSize_ 210
$vbr set maxpkts_ 268435456
$vbr attach-agent $udp


For more mail to ns2blogger@gmail.com




Thursday 24 April 2014

MALICIOUS NODE IN AODV PROTOCOL

A node is called as malicious when it will simply drop the router packets DROP_RTR_ROUTE_LOOP. For adding a malicious node to AODV protocol, we have to modify following files; 
  • aodv.h
  • aodv.cc
Changes in aodv.h file

We have to declare a variable as shown below in the protected scope in the class AODV of aodv.h file


bool malicious;

Changes in aodv.cc file

The changes that have to make  in .cc file is given below;

Step 1: Initialize the malicious variable with a value "false". Declare it inside the constructor as shown below
AODV::AODV(nsaddr_t id):Agent(PT_AODV)...
{
.......
malicious = false;
}

Step 2: Add the following statement to the aodv.cc file in the "if(argc==2)" statement.

if(strcmp(argv[1], "malicious") == 0) {
    malicious = true;
   return TCL_OK;
}

Step 3: Implement the behavior of the malicious node by setting the following code in the rt_resolve(Packet *p) function. The malicious node will simply drop the packet as indicated below.

if(malicious==true)
{
drop(p,DROP_RTR_ROUTE_LOOP);
}



Once done, recompile ns2 as given below;

Open Terminal -> Go to ~ns-2.35/ directory and type the command make to compile
cd /home/user/ns-allinone-2.35/ns-2.35/  [its vary with your directory path]
make

Once the compilation is done, Check the malicious behavior using the Tcl Script by setting any one   node as malicious node. The command to set the malicious node is
$ns at 0.0 "[$n2 set ragent_] malicious"

The variable referred for node2 is n2 (set n2 [$ns node])







Wednesday 23 April 2014

Tuesday 22 April 2014

DIFFERENT TRANSMISSION RANGE FOR NODES IN ONE SIMULATION

Most of my online friends asked me that "is any way to increase transmission range of nodes in one simulation??".Here, we are showing a simple scenario and test sample script for this.

Scenario:
Two wireless nodes n0 and n1 are placed into a flat area and have distance of 200m. Both nodes send packets with the same transmission power, but have different receiving range. I set n0's receiving range to 250m, and its carrier sensing range to 550m. n1's receiving range is 160m, and its carrier sensing range is 400m.



EXPLANATION OF RESULT:

Both nodes try to send exactly one packet to the other using DSR. Because there is no bi-directional connection exist, the actual data connection could not be be established (DSR needs a bi-directional connection for route discovery). However, we can verify the difference of two transmission ranges by observing the reachability of DSR RREQ packets broadcast by each node.


The first connection starts at the 1st second, from n0 to n1. The second connection starts at the 5th second, from n1 to n0. By analyzing the trace file, I found that the all RREQ packets from n0 were not heard by n1. But all RREQ packets sent by n1 were successfully received by n0. This makes sense because n1's receiving ranges (160m) is samller than its distance to n0 (200m), thus it cannot heard any packet from n0. However, because n0's receiving range (250m) is bigger than the distance, it can hear RREQ from n1. n0 also sent out replies to n1, but n1 could not heard it.

For sample TCL Script, Click here



Monday 21 April 2014

NEED OF ENERGY MODEL IN NETWORK SIMULATOR 2

By enabling energy model in node configuration of a wireless node, we get more accurate results.By default node configuration, the energy on node is infinite i.e there is no energy log will be carried out.

NODE CONFIGURATION WITHOUT ENERGY MODEL
$ns node-config   -addressType hierarchical \
                            -adhocRouting AODV \
                            -llType LL \
                            -macType Mac/802_11 \
                           -ifqType Queue/DropTail/PriQueue \
                           -ifqLen 50 \
                           -antType Antenna/OmniAntenna \
                           -propType Propagation/TwoRayGround \
                           -phyType Phy/WirelessPhy \
                           -topologyInstance $topo \
                           -channel Channel/WirelessChannel \
                           -agentTrace ON \
                           -routerTrace ON \
                           -macTrace OFF \
                           -movementTrace OFF
NODE CONFIGURATION WITH ENERGY MODEL
$ns node-config   -addressType hierarchical \
                            -adhocRouting AODV \
                            -llType LL \
                            -macType Mac/802_11 \
                           -ifqType Queue/DropTail/PriQueue \
                           -ifqLen 50 \
                           -antType Antenna/OmniAntenna \
                           -propType Propagation/TwoRayGround \
                           -phyType Phy/WirelessPhy \
                           -topologyInstance $topo \
                           -channel Channel/WirelessChannel \
                           -agentTrace ON \
                           -routerTrace ON \
                           -macTrace OFF \
                           -movementTrace OFF \
                           -energyModel EnergyModel \
                           -initialEnergy 90 \
                           -txPower 0.5 \
                           -rxPower 0.3 \
                           -idlePower 0.05 \
                           -sleepPower 0.03 \ 
                           
NOTE: initial energy is in Joule and all other energy parameters are in Watts.

Saturday 19 April 2014

EXTENDED NETWORK ANIMATOR


The Extended Nam Editor is an editor that allows the graphical creation of ns2 scripts. It extends the basic Nam Editor with the following features:

  • Integration with existing topology generators
  • Localization and visualization of set of nodes on large network topologies according to different selection criteria;
  • Installation of agents of any types on all the nodes of a given node set;
  • Definition of new node types;
  • Support for simulations of web cache systems.

The Extended Nam Editor work under Linux operating system,For more please click here

Saturday 5 April 2014

INTRODUCTION TO NETWORK SIMULATOR 2

INTRODUCTION 

Network Simulator Version 2, widely known as NS2, is an event driven simulation tool that is useful in studying the dynamic nature of communication networks. Simulation of wired as well as wireless network functions and protocols (e.g., routing algorithms, TCP, UDP) can be done using NS2. In general, NS2 provides users with a way of specifying such network protocols and simulating their corresponding behaviors. Due to its flexibility and modular nature, NS2 has gained constant popularity in the networking research community since its birth in 1989. Ever since, several revolutions and revisions have marked the growing maturity of the tool, thanks to substantial contributions from the players in the field. Among these are the University of California and Cornell University who developed the REAL network simulator,1 the foundation which NS is based on. Since 1995 the Defense Advanced Research Projects Agency (DARPA) supported development of NS through the Virtual InterNetwork Testbed (VINT) project.Currently the National Science Foundation (NSF) has joined the ride in development. Last but not the least, the group of researchers and developers in the community are constantly working to keep NS2 strong and versatile.

BASIC ARCHITECTURE OF NS2

Figure given below shows the basic architecture of NS2. NS2 provides users with an executable command ns which takes on input argument, the name of a Tcl simulation scripting file. Users are feeding the name of a Tcl simulation script (which sets up a simulation) as an input argument of an NS2 executable command ns. In most cases, a simulation trace file is created, and is used to plot graph and/or to create animation.




NS2 consists of two key languages: C++ and Object-oriented Tool Command Language (OTcl). While the C++ defines the internal mechanism (i.e.,a back end) of the simulation objects, the OTcl sets up simulation by assembling and configuring the objects as well as scheduling discrete events (i.e.,a front end). The C++ and the OTcl are linked together using TclCL. Mapped to a C++ object, variables in the OTcl domains are sometimes referred to as handles. Conceptually, a handle (e.g., n as a Node handle) is just a string (e.g.,o10) in the OTcl domain, and does not contain any functionality. Instead, the functionality(e.g., receiving a packet) is defined in the mapped C++ object (e.g., of class Connector). In the OTcl domain, a handle acts as a front end which interacts with users and other OTcl objects. It may defines its own procedures and variables to facilitate the interaction. Note that the member procedures and variables in the OTcl domain are called instance procedures(instprocs) and instance variables(instvars), respectively. Before proceeding further, the readers are encouraged to learn C++ and OTcl languages and we include it on our previous posts.

NS2 provides a large number of built in C++ objects. It is advisable to use these C++ objects to set up a simulation using a Tcl simulation script. However, advance users may find these objects insufficient. They need to develop their own C++ objects, and use a OTcl configuration interface to put together these objects. After simulation, NS2 outputs either text-based or animation-based simulation results. To interpret these results graphically and interactively, tools such as NAM (Network AniMator) and XGraph are used. To analyze a particular behavior of the network, users can extract a relevant subset of text-based data and transform it to a more conceivable presentation.

INSTALLATION

NS2 is a free simulation tool. It runs on various platforms including UNIX (or Linux), Windows, and Mac systems. Being developed in the Unix environment, with no surprise, NS2 has the smoothest ride there, and so does its installation.

NS2 source codes are distributed in two forms: all-in-one suite and the component-wise. With the all-in-one package, users get all the required components along with some optional components. This is basically a recommended choice for the beginners. This package provides an “install” script which configures the NS2 environment and creates NS2 executable file using the “make” utility. The current all-in-one suite consists of the following main components : 
  • NS release 2.30,
  • Tcl/Tk release 8.4.13,
  • OTcl release 1.12, and
  • TclCL release 1.18.
and the following are the optional components:
  • NAM release 1.12: NAM is an animation tool for viewing network simulation traces and packet traces.
  • Zlib version 1.2.3: This is the required library for NAM.
  • Xgraph version 12.1: This is a data plotter with interactive buttons for panning, zooming, printing, and selecting display options.
The idea of the component-wise approach is to obtain the above pieces and install them individually. This option save considerable amount of downloading time and memory space. However, it could be troublesome for the beginners, and is therefore recommended only for experienced users.

Click the following links to know more about installation:



INTRODUCTION TO NETWORK SIMULATION

NETWORK

Network is an arrangement of intersecting horizontal and vertical lines. Computer networks allows computers to exchange data.In computer networks, networked computing devices pass data to each other along data connections.The connection between nodes are established using either cabled media or wireless media. The best known computer network is the Internet.

Network computer devices that originate, route and terminate the data are called Network nodes. Nodes can include host such as computers,mobile phones and servers as well as networking hardware. Two such devices are said to be networked together when one device is able to exchange information with the other device, whether or not they have a direct connection to each other. Computer networks support applications such as access to the World Wide Web, shared use of application and storage servers, printers, and fax machines, and use of email and instant messaging applications. Computer networks differ in the physical media used to transmit their signals, the communications protocols to organize network traffic, the network's size, topology and organizational intent.

NETWORK SIMULATION

In network research, network simulation is a technique where a program models the behavior of a network either by calculating the interaction between the different network entities (hosts/packets, etc.) using mathematical formulas, or actually capturing and playing back observations from a production network. The behavior of the network and the various applications and services it supports can then be observed in a test lab; various attributes of the environment can also be modified in a controlled manner to assess how the network would behave under different conditions. When a simulation program is used in conjunction with live applications and services in order to observe end-to-end performance to the user desktop, this technique is also referred to as network emulation.

NETWORK SIMULATOR

A network simulator is software or hardware that predicts the behavior of a computer network without an actual network being present. In simulators, the computer network is typically modeled with devices, traffic etc. and the performance is analysed. Typically, users can then customize the simulator to fulfill their specific analysis needs. Simulators typically come with support for the most popular protocols and networks in use today, such as WLAN, Wi-Max,TCP, WSN, cognitive radio etc.

SIMULATION SCENARIO 

Most of the commercial simulators are GUI driven, while some network simulators are CLI driven. The network model / configuration describes the state of the network (nodes,routers, switches, links) and the events (data transmissions, packet error etc.). An important output of simulations are the trace files. Trace files log every packet, every event that occurred in the simulation and are used for analysis. Network simulators can also provide other tools to facilitate visual analysis of trends and potential trouble spots.

Most network simulators use discrete event simulation, in which a list of pending "events" is stored, and those events are processed in order, with some events triggering future events—such as the event of the arrival of a packet at one node triggering the event of the arrival of that packet at a downstream node.
Some network simulation problems, notably those relying on queuing theory, are well suited to Markov chain simulations, in which no list of future events is maintained and the simulation consists of transiting between different system "states" in a memory less fashion. Markov chain simulation is typically faster but less accurate and flexible than detailed discrete event simulation.

Simulation of networks is a very complex task. For example, if congestion is high, then estimation of the average occupancy is challenging because of high variance. To estimate the likelihood of a buffer overflow in a network, the time required for an accurate answer can be extremely large. Specialized techniques such as "control variates" and "importance sampling" have been developed to speed simulation.

USES OF NETWORK SIMULATOR

Network simulators serve a variety of needs. Compared to the cost and time involved in setting up an entire test bed containing multiple networked computers, routers and data links, network simulators are relatively fast and inexpensive. They allow engineers, researchers to test scenarios that might be particularly difficult or expensive to emulate using real hardware - for instance, simulating a scenario with several nodes or experimenting with a new protocol in the network. Network simulators are particularly useful in allowing researchers to test new networking protocols or changes to existing protocols in a controlled and reproducible environment. A typical network simulator encompasses a wide range of networking technologies and can help the users to build complex networks from basic building blocks such as a variety of nodes and links. With the help of simulators, one can design hierarchical networks using various types of nodes like computers, hubs, bridges, routers, switches, links, mobile units etc.

Various types of Wide Area Network (WAN) technologies like TCP, ATM, IP etc. and Local Area Network (LAN) technologies like Ethernet, token rings etc., can all be simulated with a typical simulator and the user can test, analyze various standard results apart from devising some novel protocol or strategy for routing etc. Network simulators are also widely used to simulate battlefield networks in Network-centric warfare

There are a wide variety of network simulators, ranging from the very simple to the very complex. Minimally, a network simulator must enable a user to represent a network topology, specifying the nodes on the network, the links between those nodes and the traffic between the nodes. More complicated systems may allow the user to specify everything about the protocols used to handle traffic in a network. Graphical applications allow users to easily visualize the workings of their simulated environment. Text-based applications may provide a less intuitive interface, but may permit more advanced forms of customization.

SIMULATION TOOLS

1. Traffic

Developed by: E. Software

Available at: http://members.iinet.net.au/~clark/

Traffic version 2 is a simulation product designed to solve complex call-centre modelling problems, where traditional Erlang equations fail, but it can also be applied to any other queueing problem. It has an easy to use graphical interface and it runs under Windows.

2. PhySim

Developed by: Tetcos

Available at: http://tetcos.com/physim.html

PhySim allows for creation of Baseband, RF, Channel and Receiver chain and comes with inbuilt Oscilloscope, Spectrum Analyzer and Polar Plot. Techniques covered include ASK, FSK, PSK, DPSK, QPSK, PAM, PWM, PPM, TDM - PAM, AM-DSB-SC, SSB - SC , PCM, DM,Transmission Line, IF, RF, Dipole and AWGN. A free download of PhySim demo version is available at www.tetcos.com.

3. NetSim

Developed by: tetcos

Available at: http://www.tetcos.com/software.html

NetSim is developed by Tetcos and it is used for network lab experimentation and research. The protocols covered in simulation are aloha, slotted aloha, Ethernet - CSMA / CD, Fast Ethernet, Gigabit Ethernet, Token Ring, Token Bus, W Lan, X.25 Frame Relay, ATM, TCP, IP -Routing RIP, OSPF, BGP, MPLS, Wi-Max, Wireless Sensor Networks and Zigbee 802.15.4. The standard version features protocol source codes in C which can be modified and linked via the development environment. A free demo version can be downloaded from the website.

4. Shunra Virtual Enterprise

Developed by: Shunra

Available at: http://www.shunra.com/network_simulation_products.aspx

Shunra VE network simulation is a tool for pre-deployment testing and capacity planning and can be used for a wide variety of applications and projects. Shunra VE website claims its use by over 1700 customers within the financial services, retail, manufacturing, energy, technology and telecommunications, healthcare and pharmaceutical, travel, media and hospitality industries as well as government agencies and militaries. Shunra Virtual Enterprise (Shunra VE) is a powerful network simulation solution that creates an exact model of any production environment. This includes the network, remote locations, and the number and distribution of local and remote end-users. With Shunra VE, you can test the functionality, performance, scalability and robustness of any application or network infrastructure under current and future real-world conditions.

5. OPNET

Developed by: O. Technologies

Available at: http://www.opnet.com/

OPNET's suite of products combine predictive modeling and a comprehensive understanding of networking technologies to enable customers to design, deploy, and manage network infrastructure, network equipment, and networked applications. In particular OPNET Modeler is a development environment, allowing you to design and study communication networks,devices, protocols, and applications.

6. GloMoSim

Developed by: UCLA

Available at: http://pcl.cs.ucla.edu/projects/glomosim/

GloMoSim is a scalable simulation environment for wireless and wired network systems. It employs the parallel discrete-event simulation capability provided by Parsec. GloMoSim currently supports protocols for a purely wireless network. In the future, we anticipate adding functionality to simulate a wired as well as a hybrid network with both wired and wireless capabilities. GloMoSim source and binary code can be downloaded only by academic institutions for research purposed. Commercial users must use QualNet, the commercial version of GloMoSim.

7. CNet

Developed by: C. M. U. of Western Australia

Available at: http://www.csse.uwa.edu.au/cnet/

CNET is a simulator of computer networks. This simulator is not really focused on industrial simulation 'per-se', but to an aspect of it. It is a discrete-event network simulator enabling experimentation with various data-link layer, network layer, routingand transport layer networking protocols. It has been specifically developed for, and used in, undergraduate computer networking courses taken by thousands of students worldwide.

8. OptSim

Developed by: R. D. Group

Available at: http://www.rsoftdesign.com/products.php?sub=System+and+Network&itm=OptSim

OptSim 4.7 is the result of the merge between the former OptSim 3.6 sample mode engine, implementing simulation in the time domain sample by sample using a linear convolution algorithm, and the LinkSIM block mode engine, impelenting the Frequency Domain Split Step. It is an intuitive modeling and simulation environment supporting the design and the performance evaluation of the transmission level of optical communication systems.

9. GTNetS

Developed by: GeorgiaTech

Available at: http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/

The Georgia Tech Network Simulator (GTNetS), developed by Dr George Riley, is a full-featured network simulation environment that allows researchers in computer networks to study the behavior of moderate to large scale networks, under a variety of conditions. The design philosophy of GTNetS is to create a simulation environment that is structured much like actual networks are structured. For example, in GTNetS, there is clear and distinct separation of protocol stack layers. It is availabe for download from the website.

10. The Network Simulator - ns2

Developed by: U. of Southern California

Available at: http://www.isi.edu/nsnam/ns/

Ns2 is a discrete event simulator targeted at networking research. Ns provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks. Ns is devloped by ISI, the Information Sciences Institute at the USC school of engineering. The full source code of ns 2 can be downloaded and it can be compiled of multiple platform, including most popular Unix flavours and Windows.

11. JiST / SWANS

Developed by: R. B. C. University

Available at: http://jist.ece.cornell.edu/

SWANS is a scalable wireless network simulator built atop the JiST platorm. SWANS is organized as independent software components that can be composed to form complete wireless network or sensor network configurations. Its capabilities are similar to ns2 and GloMoSim, but is able to simulate much larger networks. SWANS leverages the JiST design to acheive high simulation throughput, save memory, and run standard Java network applications over simulated networks. In addition, SWANS implements a data structure, called hierarchical binning, for efficient computation of signal propagation.

12. OMNeT++

Developed by: O. C. Site

Available at: http://www.omnetpp.org/

OMNeT++ is a component-based, modular and open-architecture simulation environment with strong GUI support and an embeddable simulation kernel. The simulator can be used for modelling: communication protocols, computer networks and traffic modelling, multi-processors and distributed systems, etc. OMNeT++ also supports animation and interactive execution. It is freely distributed under an academic public license.

13. QualNet Developer

Developed by: S. N. Technologies

Available at: http://www.scalable-networks.com/

QualNet is a modelling tool for wireless and wired network,. The QualNet suite is composed of 
QualNet Simulator, which claims to be the fastest for real-time traffic modelling. QualNet Animator allows to graphically design the network model (using a wide library of components) and it displays the results of simulation runs. QualNet Designer allos to create Finite State Automata to describe the behaviour of your network, while with QualNet Analyzer and Designer you can interpret and make sense of simulation results. Windows and Linux versions are available. A demo can be downloaded on request.

14. PARSEC

Developed by: U. P. C. Laboratory

Available at: http://pcl.cs.ucla.edu/projects/parsec/

Parsec is a C-based simulation language, developed by the Parallel Computing Laboratory at UCLA, for sequential and parallel execution of discrete-event simulation models. It can also be used as a parallel programming language. It is available in binary form only for academic institutions. Commercial users are directed to its commercial implementation QualNet, marketed by Scalable Networks technologies (http://www.scalable-networks.com/)

15. NCTuns

Developed by: U. of Twente

Available at: http://nsl10.csie.nctu.edu.tw/

The NCTUns is a high-fidelity and extensible network simulator and emulator capable of simulating various protocols used in both wired and wireless IP networks. Its core technology is based on the novel kernel re-entering methodology. NCTUns can be used as an emulator, it directly uses the Linux TCP/IP protocol stack to generate high-fidelity simulation results, and it has many other interesting qualities. It is commercialised by SimReal Inc.

16. Performance PROPHET

Developed by: U. of Vienna

Available at: http://www.dps.uibk.ac.at/projects/prophet/



The Performance Prophet is a tool for modeling and simulation of high performance computing systems based on CSIM (Mesquite Software). Based on a UML model of an application and a simulator for a target architecture, the tool can predict the execution behavior of the application model on cluster and grid architectures. Performance Prophet has been deveoped at the Distributed and Parallel Systems Group of the University of Innsbruck and it has been supported by the Austrian Science Fund.

STEPS TO INSTALL NS2 ON LINUX



1) Download 'ns-allinone-2.35' from :
  http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download

2) Extract the downloaded zip file 'ns-allinone-2.35.tar.gz file' to desktop.

3) Now you need to download some essential packages for ns2,these packages can be downloaded by using the following command : applications>accessories>terminal or dashhome>trminal
then type the below line on the terminal window

    "sudo apt-get install build-essential autoconf automake libxmu-dev libtool gcc"

    or type this command

    "sudo apt-get install autoconf automake gcc g++ build-essential libxmu-dev libtool libxt-dev"

4) Now change your directory(here i have already extracted the downloaded files to desktop,so my location is desktop) type the following codes in the command window to install NS2.

    cd Desktop  
    cd ns-allinone-2.35
    ./install

                              The installation procedure will take a few minutes..........

5) After compleating the installation type the following command in the command window

    gedit ~/.bashrc

6) Now an editor window appears,please copy and paste the follwing codes in the end of the text file (note that '/home/abhiram/Desktop/ns-allinone-2.35/octl-1.14' in each line in the below code should be replaced with your location where the 'ns-allinone-2.35.tar.gz'file is extracted)

   
# LD_LIBRARY_PATH
OTCL_LIB=/home/abhiram/Desktop/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/abhiram/Desktop/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/abhiram/Desktop/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/abhiram/Desktop/ns-allinone-2.35/bin:/home/abhiram/Desktop/ns-allinone-2.35/tcl8.5.10/unix:/home/abhiram/Desktop/ns-allinone-2.35/tk8.5.10/unix
NS=/home/abhiram/Desktop/ns-allinone-2.35/ns-2.35/
NAM=/home/abhiram/Desktop/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM


7) Save and close the text editor and then type the following command on the terminal

    source ~/.bashrc

8) Close the terminal window and start a new terminal window and now change the directory to ns-2.35 and validate ns-2.35 by exicuting the following command ( it takes 30 to 45 minutes)

    cd ns-2.35
    ./validate

9) If the installation is successful, then you will be able to see % at the command prompt while typing the following command

    ns

10) Now type

    exit