Wireless Node Configuration in Network Simulator 2 (NS2)

The node configuration in ns2 is a special task in which the number of nodes can be configured for a set of parameters. The following table tells about the node  configuration parameters as defined in the ns-lib.tcl

The readers are requested to refer the ns-lib.tcl file for more information.

Option Available Values Remarks
addressType flat, hierarchichal  
MPLS ON,OFF Multi protocol Label Switching
wiredRouting ON, OFF  
llType LL, LL/Sat Link Layer
macType Mac/802_11, Mac/Csma/Ca, Mac/Sat, Mac/Sat/UnslottedAloha, Mac/Tdma Medium Access Control
ifqType Queue/DropTail, Queue/DropTail/PriQueue Interface Queue type
phyType Phy/wirelessPhy, Phy/Sat Physical Layer Type
propType Propagation/TwoRayGround, Propagation/Shadowing Propagation Type
antType Antenna/OmniAntenna, Antenna type
Channel Channel/WirelessChannel, Channel/Sat Channel to be used
mobileIP ON,OFF to set the IP for Mobile or not
energyModel EnergyModel energy model to be enabled or not
initialEnergy <joule> in terms of joules (Ex: 3.24)
txPower   Power in terms of Watts (0.32)
rxPower   Power in terms of Watts (0.1)
idlePower   Power in terms of Watts (0.02)
agentTrace ON, OFF Tracing to be on or off
routerTrace ON, OFF Tracing to be on or off
macTrace ON, OFF Tracing to be on or off
movementTrace ON, OFF Tracing to be on or off
errProc UniformErrorProc  
toraDebug ON, OFF  


An Example

$ns node-config -addressType hierarchical \
-adhocRouting AODV \
-llType LL \
-macType Mac/802_11 \
-ifqType Queue/DropTail/PriQueue \
-ifqLen 50 \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-topologyInstance \$topo \
-channel Channel/WirelessChannel \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF

Tracegraph - a graphing software to plot the trace files from NS2

Tracegraph is a third party software helps in plotting the graphs for NS2 and other networking simulation softwares. But the sad point is the software is not maintained by anyone and the happiest point is the software works fine still and it is free. 

You may download the tracegraph software from these locations.

For windows: https://dl.dropbox.com/u/24623828/tracegraph202.rar

For Linux : https://dl.dropbox.com/u/24623828/tracegraph202linux.tar.gz


There are actually two files one with the matlab runtime library file and other is the original software tracegraph.

Tracegraph when opened, it opens 3 windows, 

  • one window to select the trace file (.tr) that was created by NS2 (depending on the size of the trace file , the processing time also varies)
  • Second window is the main window in which you can see the graphs for various performance characteristics like throughput, End to End Delay, jitter, etc in 2D and 3D facillity. Even it can plot the histograms too.
  • Third window is nothing but the Simulation Information Windows, that you can see the packet loss, packet delivery, end to end delay for the total network, information about the intermediate nodes, source and destination nodes.

    Tracegraph exists for windows as well Linux, you can download both the versions at these locations

    For windows Installation : http://www.nsnam.com/2011/08/tracegraph-installation-in-windows-7.html

    For Linux Installation : http://www.nsnam.com/2011/08/tracegraph-installation-in-fedora-12.html

    the following is the snapshot for windows installation: Copy the PATH as done in the pic and paste it in the environmental variables



    proc directory in Linux

    If by any chance, if you want to know about the processor, memory, IO Memory, Ports, etc about the system/CPU. Then you can look into the folder /proc in Linux. There are various files that tells you the information about the CPU.
    Some Examples
    if you want to know about the CPU Information, go to the terminal and try this
    # cat /proc/cpuinfo
    For memory information
    # cat /proc/meminfo
    For IO Memory information
    # cat /proc/iomem
    if you want to see how long the system is up can be seen using the file uptime
    # cat /proc/uptime
    (The above will list two numbers, one being the uptime of the system and other being uptime for all the cores of the processor)
    and other information like scheduling, filesystems, etc can be seen from the /proc folder