Wireless network creation in ns2 involves 13 main steps configuration. This includes assigning a Channel Type, propagation model, interface type and MAC type, number of nodes, routing protocol used for communication between nodes, X-axis and Y-axis configuration for network animator (nam) and finally assign the simulation time, these values are assigned in a TCL file

Sample code for creation of new wireless network in ns2

set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 25 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 2000 ;# X dimension of topography
set val(y) 2000 ;# Y dimension of topography
set val(stop) 10.0 ;# time of simulation end


One Thought to “New Wireless Network Creation in NS2”

  1. surya

    i found this is useful for my academic assignment. i found very easy steps followed for creating a new wireless network.

Leave a Comment