Wednesday, August 5, 2015

Explanation of protocols in ns-2.35

Network Simulator-2
network simulator-2 is an efficient and open source tool freely available for research community. NS-2 provides support for wired and wireless networks' simulation. In wireless simulation, we mainly focus on MANETs, i.e Mobile Adhoc Networks. As a part of MANET protocols, NS-2 consists of AODV, DSDV, and DSR etc. Other than the common binding architecture in NS package, all protocols have their different functioning and architecture. Understanding of those is also a tough task for a newbie of NS-2. So In this post I am trying to give an overview of these protocols for better understanding for those who want to work on any of these protocols.


AODV:
AODV code in NS-2.35: There is a aodv folder in ns-2.35 directory, which consists of the main coding of all the functioning of aodv. The files in aodv folder includes aodv.cc, aodv.h, aodv_logs.cc, aodv_packet.h, aodv_rtable.cc, aodv_rtable.h, aodv_rqueue.cc, aodv_rqueue.h. For every .cc file there is an entry in Makefile which integrates the whole ns package. Running of those makes .o file for corresponding .cc file.

aodv.cc is the main file which has binding with tcl. It configures the aodv property on every node of MANET where aodv is called, then corresponding functions like route discovery etc are called according to the need of simulation script. aodv protocol consists of various type of times as hellotimer, broadcasttime, neighborTimer, routecacheTimer etc.

There is corresponding entry in cmu-trace.cc file in trace folder which traces all events when protocol is aodv and sends the result trace data to the trace file for analysis after simulation.

There is wide range of extension possibility in code of AODV including, security extension in AODV, trust implementation in AODV, Attack detection and prevention in AODV, use of genetic algorithms to select best path in AODV, and many more...

This post will be extended soon...

14 comments:

  1. v 62.011577022990132 eval {set sim_annotation {1 received {how are you}}}

    This line of trace file indicates that at the mentioned time on column $2, you tried to send the msg "how are you" through your tcl script in your network simulation. That event is traced by this entry in trace file.

    ReplyDelete
  2. please could you explain what the meaning of the V

    ReplyDelete
    Replies
    1. V simply states the value (verbose) directly sent to trace file via annotation at specified time given in tcl simulation file.

      Delete
  3. Could you please explain the code in .cc file?

    ReplyDelete
    Replies
    1. Yes sure, Just tell me where you are stuck in code...

      Delete
  4. Dear sir,
    thankyou very much for your golden time.
    would you help me on the Attack detection and prevention in AODV in MANET with ns-2.35 please

    ReplyDelete
    Replies
    1. For any attack to wish to detect or prevent, first identify what type of messages it is sending to attack on the network ( for example it may be bombarding of RREQ packets). Then go the the code of aodv files and prevent all those packets and set these to nb_purge.

      Delete
  5. dear sir,
    i want to understand the basic code of aomdv protocol, so that i can able to modified it for my research work.

    so can you tell me from where i can start?

    ReplyDelete
    Replies
    1. To modify anything in NS-2 you need to understand binding of ns-allinone project using Makefile. Once you understand it its very easy to make chanage in cc files and get it reflected in script simulation.

      Delete
    2. Sir, I wanted to modify aodv.cc but i don't know how to make that relevant changes in order to get my result as i don't know much about the written code in aodv.cc file. Your any type of help would be appreciated.

      Delete
  6. Dear Mr. Omesh Kumar,
    I was wondering if it's possible to do simulation of WiMAX algorithms in NS2?
    thanks,

    ReplyDelete
  7. how to implement AODV and GPSR in VANET

    ReplyDelete
  8. When I run aodv.cc file then there is an error "fatal error: aodv/aodv.h: No such file or directory
    compilation terminated.
    ".

    Please help me.

    ReplyDelete
  9. It is really a great work and the way in which you are sharing the knowledge is excellent.

    big data analytics company in hyderabad

    ReplyDelete