Wireless Simulation in NS3

wireless simulation in ns3


The main purpose of a simulation is to generate output data for further study. There are two basic methods to generate data in ns-3.

  • Predefined bulk output mechanism.
  • Data generation is tracing.


IEEE 802.11s:

  • An important feature of IEEE 802.11s is the fact that the mesh network is implemented in the data link layer.
  • The IEEE 802.11s is an amendment adding wireless mesh capabilities to the existing IEEE 802.11 WLAN standard.
  • For path discovery define Hybrid Wireless Mesh Protocol (HWMP). It’s an mandatory routing protocol.


Scope of the IEEE 802.11s:

  • Compatible with higher layer protocols.
  • Small/medium mesh networks can be larger.
  • Dynamic, radio-aware path selection in the mesh, enabling data delivery on single-hop and multi-hop paths.
  • Extensible to allow support for diverse applications and future innovation.


Node types in IEEE 802.11s:

  • Mesh portal (MPP).
  • Mesh Point (MP).
  • Mesh access point (MAP) – all nodes have frame forwarding capability and can thus forward frames originating at a node and destined for some node.



Fields of information elements in IEEE802.11s:

  • Path Selection Protocol ID
  • Path Selection metric
  • Congestion Control Mode
  • Synchronization Protocol ID
  • Authentication Protocol ID
  • Mesh Formation Info (Usually the count of neighbors/peers)
  • Mesh Capability

Sample code for IEEE802.11s:
This is the sample code of ieee802.11s mesh interface structure.
struct ieee80211_if_mesh {
struct work_struct work;
struct timer_list housekeeping_timer;
struct timer_list mesh_path_timer;
struct timer_list mesh_path_root_timer;
struct sk_buff_head skb_queue;
unsigned long timers_running;
unsigned long wrkq_flags;
u8 mesh_id[IEEE11_MAX_MESH_ID_LEN];
size_t mesh_id_len;
u8 mesh_pp_id;
u8 mesh_pm_id;
u8 mesh_cc_id;
u8 mesh_sp_id;
u8 mesh_auth_id;
u32 sn;
u32 preq_id;
atomic_t mpaths;
unsigned long last_sn_update;
unsigned long last_preq;
struct mesh_rmc *rmc;
spinlock_t mesh_preq_queue_lock;
struct mesh_preq_queue preq_queue;
int preq_queue_len;
struct mesh_stats mshstats;
struct mesh_config mshcfg;
u32 mesh_seqnum;
bool accepting_plinks;