Requirement Specification 3.1 Hardware Requirements: 3.3.1 NS2 Overview
Requirement Specification 3.1 Hardware Requirements: 3.3.1 NS2 Overview
CHAPTER3
REQUIREMENT SPECIFICATION
Hard Disk : 40 GB
RAM : 512MB
NS2 is built using object oriented methods in C++ and OTcl (object oriented variant of
Tcl).
can see in Fig 3.1, NS2 interprets the simulation scripts written in OTcl. A user has to set the
different components (e.g. event scheduler objects, network components libraries and setup
module libraries) up in the simulation environment. The user writes his simulation as a OTcl
script, plumbs the network components together to the complete simulation. If he needs new
network components, he is free to implement them and to set them up in his simulation as
well. The event scheduler as the other major component besides network components triggers
the events of the simulation (e.g. sends packets, starts and stops tracing). Some parts of NS2
are written in C++ for efficiency reasons. The data path (written in C++) is separated from the
control path (written in OTcl). Data path object are compiled and then made available to the
OTcl interpreter through an OTcl linkage (tclcl) which maps methods and member variables
of the C++ object to methods and variables of the linked OTcl object. The C++ objects are
controlled by OTcl objects. It is possible to add methods and member variables to a C++
linked OTcl object.
14
available in NS2.
– Transport protocols: TCP and UDP for unicast and SRM for multicast.
– Traffic sources: web, ftp, telnet, cbr (constant bit rate), stochastic, real audio.
– Emulation.
– Ad hoc routing with different protocols, e.g. AODV, DSR, DSDV, TORA
– Wired-cum-wireless networks
– Mobile IP
– Directed diffusion
– Satellite
– Senso-MAC
– Energy models
15
• Tracing
• Visualization
– Trace Graph
• Utilities
This section describes the wireless model that was originally ported as CMU’s
Monarch group’s mobility extension to NS2. The first section covers the original mobility
model ported from CMU/Monarch group. In this section, we cover the internals of a mobile
node, routing mechanisms and network components that are used to construct the network
stack for a mobile node. The components that are covered briefly are Channel, Network
interface, Radio propagation model, MAC protocols, Interface Queue, Link layer and Address
resolution protocol model (ARP). CMU trace support and Generation of node movement and
traffic scenario files are also covered in this section. The original CMU model allows
simulation of pure wireless LANs or multihop ad-hoc networks. Further extensions were made
to this model to allow combined simulation of wired and wireless networks. MobileIP was
The wireless model essentially consists of the MobileNode at the core, with
additional supporting features that allows simulations of multi-hop ad-hoc networks, wireless
LANs etc. The MobileNode object is a split object. The C++ class MobileNode is derived
from parent class Node. A MobileNode thus is the basic Node object with added
functionalities of a wireless and mobile node like ability to move within a given topology,
ability to receive and transmit signals to and from a wireless channel etc. A major difference
between them, though, is that a MobileNode is not connected by means of Links to other
nodes or mobilenodes. In this section we shall describe the internals of MobileNode, its
17
routing mechanisms, the routing protocols dsdv, aodv, tora and dsr, creation of network stack
allowing channel access in MobileNode, brief description of each stack component, trace
like movement, ability to transmit and receive on a channel that allows it to be used to create
mobile, wireless simulation environments. The class Mobile Node is derived from the base
class Node. Mobile Node is a split object. The mobility features including node movement,
periodic position updates, maintaining topology boundary etc are implemented in C++ while
plumbing of network components within Mobile Node itself (like classifiers, dmux , LL, Mac,
General
Mac/Sat/Unslotted/Aloha,Mac/Tdma
Satellite Oriented
Wireless Oriented
DSDV,FLOODING,OMNICAST,AODV,TORA