Wireless Simulation in NS2 is mainly used also for Wireless networks like wireless sensor networks, Ad hoc Networks, vehicular ad hoc Networks, Wireless body area network, also wireless Mesh networks etc. Today, we are living in the era of wireless networking, where everything we see and also feel is based on Wireless technology. Why we also have moved towards wireless technology, may be a revolving question for many of us. But there is nothing to think about it as Wireless technology has also advance features like mobility support, work from anywhere, flexibility and also reach ability, which makes our world to revolve around it. It is one of the best simulation tools also to simulate wireless networks to analyze its performance and behavior.

We are also working with NS2 for the past 10 years, which has enhanced our knowledge and expertise in NS2. From our vast knowledge and experience, we have also share few important aspects about Wireless simulation in NS2 below. Have also a glance over it and get to know about NS2 simulation.


Highlights to Know:
  • Unlike Wired nodes, which use links for connectivity, also in wireless nodes distance between the nodes is measured.
Node Configuration parameters
  • Address Type[flat/Hierarchical]
  • Multi protocol label switching
  • Link layer[LL/LL-SAT]
  • Interface queue type[Queue/Drop tail, Queue/Drop Tail/PriQueue]
  • Physical Layer type[phy/wirelessphy, phy/sat]
  • Medium Access Control[Mac/802_11, MAC/CSMA/CA, MAC/SAT,MAC/Sat/Unslotted Aloha, MAC/TDMA]
  • Ad hoc Routing protocol [Diffusion/Rate, Diffusion/Prob, DSDV, Flooding, DSR, AODV, Omnicast, TORA, also PUMA ]
  • Antenna type[Antenna/Omni Antenna]
  • Propagation types[Propagation/TwoRay Ground, propagation/shadowing]
  • Channel Used[Channel/wireless channel, channel/sat]
  • Mobile IP[ON/OFF]
  • Energy Model[Enabled or not]
  • Initial Energy[Joules]
  • Transmitted and also receiver power[txPower/txPower]
  • Idle Power[in watts(0.02)]
  • Agent type, Router trace, Mactrace, also movement trace[ON/OFF]
  • ToraDebug[ON/OFF] and also errProc[UniformErrorProc]
Common Node configuration used:

$ns_ node-config -llType           LL

-ifqType        “Queue/DropTail/PriQueue”

-ifqLen          60

-macType        Mac/802_11

-phyType        “Phy/WirelessPhy”

-addressingType  flat

-adhocRouting    DSDV or DSR

-propType        “Propagation/TwoRayGround”

-antType            “Antenna/OmniAntenna”

-channelType    “Channel/WirelessChannel”

-topoInstance   $ topo

-agentTrace          ON/OFF

-routerTrace          ON /OFF

-macTrace            ON/OFF

-movementTrace   ON/OFF

GOD in Wireless-Simulation
  • As in wireless simulation, nodes also moves from one place to another distance between them changes.
  • For this GOD[General Operation director] is also create to keep track of the node positions in the topology grid.
  • God is also use to store global information about the state of network, environment and also nodes
  • It stores[total number of Mobile nodes, table of shortest number of hops require also to reach from one node to another]
  • Before Simulation begins, next hop information is loaded into GOD also from the movement pattern files.
Mobility Models in Wireless-Simulation
  • Random Walk also in Mobility Model
  • Random-direction also in Mobility Model
  • Random Waypoint also in Mobility Model
  • Boundless Simulation Area also in Mobility Model
  • Probabilistic version of Random walk also in Mobility Model
  • Gauss Markov also in Mobility Model
Performance Metrics Used
  • Thread Task level Metrics[Task completion time, also average power expended]
  • Scenario Metrics[Area size of Network, density per node, Offered load and also traffic pattern, number of Network Nodes, also Nodal movement etc]
  • Diagnostic packet level Metrics[Packet delivery Ratio, Overhead analysis, delay, also energy consumption]
Creating  Wireless Simulation Script:
  1. Create a Simulator class object:

To create a simulator object, we also have given the following command

        Set ns[ new   simulator ]

Next configure the node, also using the above mentioned node configuration.

  1. Create topology instance and GOD

Create god 2// To create god for 2 nodes

set  topography  [new  Topography]// to create topology instance

$ topo  load_flatgrid  200   200// to set the boundary

  1. To create Node

Set  n1  [ $ns  node ]

Set  21  [ $ns  node ]

  1. To set the coordinate for the Nodes.

$n1  set  X_ 30.0

$n1  set  Y_ 30.0 $n2  set  X_ 500.0$n2  set  Y_ 500.0

     We also have explain to create a simple script in NS-2. Here, we have just created two nodes and set position to it. This is also the basics of Wireless Simulation-in-NS2. If you feel also to work with advanced concepts or programming in NS2, approach our online tutoring service, our experts will guide you also completely regarding in NS-2 along also with your projects, assignments or particular lab cycle topic in NS-2. Approach us anytime, as we are there, only to serve you.