Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Tutorial for Simulation-based Performance Analysis of MANET Routing Protocols in ns-2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Tutorial for Simulation-based Performance Analysis of MANET Routing Protocols in ns-2


[attachment=65089]

Introduction

Ns-2 is an open source discrete event simulator used by the research community for research in networking [1]. It has support for both wired and wireless networks and can simulate several network protocols such as TCP, UDP, multicast routing, etc. More recently, support has been added for simulation of large satellite and ad hoc wireless networks. The ns-2 simulation software was developed at the University of Berkeley. It is constantly under development by an active community of researchers. The latest version at the time of writing this tutorial is ns-2 2.27.
The standard ns-2 distribution runs on Linux. However, a package for running ns-2 on Cygwin (Linux Emulation for Windows) is available. In this mode, ns-2 runs in the Windows

Getting your hands wet with ns-2

The ns-2.27 is available as an all-in-one package that includes many modules. Two modules that we will discuss in this tutorial are
i. ns-2 simulator.
ii. TCL/OTcl interpreter.
2.1 Procedure for installation ns-2 over CYGWIN
Installing ns-2 can be time-consuming for beginners, especially when building it in a Cygwin environment. The detailed instructions for downloading and building ns-2 on Cygwin can be found at Christian’s web page. [3]
2.2 Using ns-2:
The following are a few useful tips on using ns-2 -
o ns-2 running directory: in CYGWIN console, under directory:
? /home/administrator/ns-allinone2/ns-2.27

Procedure for Running Scenario-based Experiments:

The procedure for running the scenario-based experiments are shown as a flow diagram in Fig.2 and are elaborated in the following sections
3.1. Setting up the user parameters
For any experiment, we have a set of control parameters which are specified by the user and a set of output parameters which we need to investigate upon. In the scenario based experiments, the set of input parameters are the parameters for the definition of the scenario and the specification of the traffic pattern. These parameters are defined in the following sections-

(i) Scenario parameters -

The scenario for a particular experiment is defined using the tool BonnMotion, a Java software which creates and analyses mobility scenarios. It is developed within the Communication Systems group at the Institute of Computer Science IV of the University of Bonn, Germany, where it serves as a tool for the investigation of mobile ad hoc network characteristics. The scenarios can also be exported for the network simulator ns-2 and GlomoSim/QualNet. Several mobility models are supported, namely
• the Random Waypoint model,
• the Gauss-Markov model,
• the Manhattan Grid model and
• the Reference Point Group Mobility model.
More information on these mobility models can be found at [2]. The parameters for the scenario can be specified through the command line. For e.g.,

NOTE:

(i) GOD or General Operations Director is a ns-2 simulator object, which is used to store global information about the state of the environment, network, or nodes that an omniscient observer would have, but that should not be made known to any participant in the simulation.
(ii) The load_flatgrid object is used to specify a 2-D terrain. Support is available for simulation of 3D terrains for more realistic depiction of scenarios.

© Define node properties

Now we define the properties of a node in the ad hoc network through the following code snippet-

Running a New Routing Protocol

A new routing protocol for ns-2 has to be coded in C/C++ (there is no support for Java yet). The output for this file can be incorporated into the simulator by specifying the file name in the Makefile (/home/administrator/ns-allinone-2.27/ns-2.27) and building ns-2 again. If the routing protocol involves a different packet format than what is defined in packet.h, this must also be specified in the header file. More details can be found in Marc Greis’s tutorial [2].