r1 - 10 Sep 2007 - 02:30:25 - Main.acwarrieYou are here: TWiki >  Main Web > ResearchGroups > Wisenet > DRAND > DRANDNS-2

DRAND NS2 software

NS-2 installations instructions:

  • Download the source tarball here.
  • Untar it in your ns top-level directory: (NS_INSTALL_DIRECTORY)/ns-2.26.
  • Add an entry in the Makefile for DRAND files as "drandNS2/drandAgent.o" for the OBJ_CC target.
  • Add entry for DRAND packet type in (NS_INSTALL_DIRECTORY)/ns-2.26/tcl/lib/ns-packet.tcl as "DRAND" - sample here.
  • Add entry for DRAND packet type in (NS_INSTALL_DIRECTORY)/ns-2.26/common/packet.h as "PT_DRAND" - sample here.
  • Replace ns2.26/mac/mac-802_11.cc with this file: There is a small change to enable broadcast for DRAND packets.
  • Replace ns2.26/trace/cmu-trace.cc with with this file: This adds support for DRAND packets.

NS-2 execution instructions:

  • Download the tcl script tarball here.
  • Untar it in any location in your file-system.
  • Execute simulation by the follwing command:

ns simple-wireless.tcl <scenario.tcl>

  • File "simple-wireless.tcl" runs a simulation of nodes in a 300m x 300m area, distributed according to the wireless scenario generated by "scenario.tcl". Wireless options (link speed, antenna characteristics, transmission power, etc.) are in the "wirelessOpt.tcl" file.
  • For generating the scenario file, use the CMU scenario generator included in the ns2 distribution: (NS_INSTALL_DIRECTORY)/ns-2.26/indep-utils/cmu-scen-gen/setdest. Also, note that the scenario should not contain any node motion, so please use the option "-p 0 -s 0"
  • DRAND is composed of two phases - a "HELLO" phase, where nodes send beacons to each other to probe their network neighborhood, and the "DRAND" phase where the DRAND algorithm is run and a TDMA schedule is produced (For more details please refer to DRAND.
  • DRAND output is as follows:

MESSAGE sID 82 mCt 15 rReq 0 rGra 0 mTime 27.826388 oneHopCount 7

MESSAGE sID 82 reqCt 1 graCt 7 rejCt 0 relCt 0 twoCt 7

MESSAGE sID 82 Round 20 maxC 0 twoHopMaxC 0 slotNum 11 roundDelay 0.023284 grantDelay 0.018388

  • Some of the noteworthy fields are:
    • sID = Node ID
    • mCt = Total messages transmitted
    • mTime = Total time for the node to get its own time slot
    • oneHopCount = Total number of nodes within one hop to this node
    • slotNum = TDMA slot assigned by DRAND
  • In case of difficulties, contact Ajit Warrier.

-- Main.acwarrie - 10 Sep 2007

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback