NS2-MIUN:
Ns-2 is
a popular open source network simulator. A lot of researchers in the
community of wireless sensor networks have used ns2 to verify
their research results. However, ns2 is not an easy tool for the
simulation of sensor networks, partially because of its high
difficulty in understanding the ns2 itself, and also because there
is currently lack of support for sensor network
simulation.
I am using ns2 with my sensor
network research, and I share my experience and source code of
sensor network simulation using ns2 here. It is supposed to be
helpful for those who have similar research interests as me. I modify
ns-2.27 to support wireless sensor network simulation, with a specialty on
intrusion detection simulation. The enhanced
parts in my modified version (with a new name
NS2-MIUN) are listed in the following:
The integration of NRL's phenomenon node, which
enables the ability of simulating an environmental
phenomenon.
The integration of AODVUU, which is a AODV routing
protocol implementation that follows AODV specification better
than the one included in the standard ns2
release.
The definition of a new packet type
PT_SensorApp ,
which is used to simulate the type of packets used by sensor
application.
The support of dynamic packet
destination configuration. In the standard ns2 release, the
<src, dst> pair is configured by statically
binding an agent in the source node with an agent
in the destination node in the TCL scenario file. This
means a source node needs to configure multiple source agents when
there are multiple potential receipents and bind each potential
<src, dst> pair manually at the configuration file. This
doesn't scale well in a dynamic wireless sensor network, where the
destination node can vary over time. This drawback is fixed by
allowing run-time <src, dst> binding. An example can be seen
in the sensorapp.cc file, where a source agent can be configured to launch a DOS attack to any
specified destination node during
runtime.
The integration of an intrusion
detection module. It is a module inserted between the MAC
layer and the network layer that caputures all packets and impose
intrusion detection analysis. Currently, this module is
implemented as a trace module, by modifying cmu-trace.cc
and some other related source files. Users can easily replace my
code with their own intrusion detection algorithms if their
algorithms are also traffic-based. The understanding of CMU Monarch project's wireless extention to
ns2 is a prerequisite to understand the idea of this intrusion
detection module.
The imitation of different attacks. The attacks
implemented include wormhole, symbil/ID spoofing, DOS/DDOS,
sinkhole, etc.
-
An extension of simulating multi-homed node in ns-2. An explanatory document of this extension is available here. Source files which are related to this extension are available here.
etc.
The compiled source file of my ns2
version (NS2-MIUN) is available here. I
suppose it works directly when you download it and put it in a ns-2
suitable enviroment. If that doens't work, one may need to firstly download
and install a ns-2.27 version from the ns2
website
, and then replace the installed directory of ns-2.27 with
mine, the compilation is however unnecessary unless there is change
in my source file. Note that one must make sure all supporting
softwares for ns2 have been properly installed on his/her system, and a ns-2.27 bash file is configured by
running command source ./.bashrc-ns2.27
before using any ns2 command. The details of
how to configure and run ns2 command and scenario file is not
supposed to be explained by me. There is however a good FAQ available here.
Example TCL scenarios about how to use NS2-MIUN is available here.
I am glad to announce that I'm
starting writing a readme.txt about NS2-MIUN.
Although the readme.txt avaiable now is still preliminary, it will be updated according
to my available time and also according to the
requests. For the features that are not included in this readme.txt, the persons
who are interested are recommended to mainly check the files
under directory sensornets-NRL and directory
trace, since most of my change are within these two
directories. But files under directories like tcl,
common, etc. have also be changed, it
will be a tough work to find all my
changes.
(I have repeated the installation process of NS2-MIUN and the details is available here. 2009-04-07)