Mobile Ad Hoc Networks
AODV · DSR · OLSRv1 / v2 · ZRP · Mobility
NetSim's MANET library lets you design, simulate and analyse mobile ad hoc networks. Each node has a full five-layer stack. The library includes the main ad hoc routing protocols and models for RF propagation, mobility and energy. You can modify any part of it in the protocol C source code.
What NetSim models
NetSim models a complete ad hoc node, from application traffic down to the radio. It also models the conditions that make a MANET hard: a moving topology, shared spectrum and finite energy.
Full five-layer stack
The entire TCP/IP stack runs on every node: standard applications over TCP and UDP, IP routing, a Wi-Fi MAC and PHY, and configurable static routes.
Ad hoc routing
These protocols build and repair routes without infrastructure: AODV, DSR, OLSRv1 and OLSRv2, and ZRP.
Mobility and energy
Nodes move according to random, group, pedestrian or file-based models. A battery model has transmit, receive, idle, sleep and harvesting states.
Protocol source code
Every protocol ships as C source. Modify it in Visual Studio to implement and test your own routing, MAC, or security ideas.
Ad hoc routing protocols
The library has reactive, proactive and hybrid protocols. Each protocol follows its RFC, and you can inspect it in the source code.
AODV
Ad hoc On-demand Distance Vector routing discovers a route only when traffic needs one. It uses RREQ and RREP exchanges, and sequence numbers keep the routes loop-free.
DSR
Dynamic Source Routing carries the full path in the packet header. Configurable link-layer or network-layer acknowledgements detect broken hops and trigger repair.
OLSRv1 and OLSRv2
Optimized Link State Routing maintains routes at all times through link sensing, neighbour detection, multipoint relay (MPR) selection and topology control. OLSRv1 follows RFC 3626, and OLSRv2 follows RFC 7181.
ZRP
Zone Routing Protocol is proactive inside each node's local zone (IARP) and reactive between zones (IERP). It trades control overhead against route latency.
Featured implementation
OLSRv2 (RFC 7181)
A full OLSRv2 stack with NHDP neighbour discovery, MPR selection, and topology control, plus link-quality support over TDMA, DTDMA, and 802.11. Tune hysteresis, TC hop limit, and node willingness, and trace neighbour state through the OLSRv2 log.
Radio, mobility, and energy
A routing protocol must cope with these physical conditions: propagation, fading, movement and battery drain.
MAC and PHY
Wi-Fi (IEEE 802.11) MAC and PHY for civilian ad hoc networks, or Military Radios (TDMA and Dynamic TDMA) for tactical links.
Path loss models
- Range-based reachability, Friis free space, log distance
- COST 231 Hata (urban, suburban), Hata (urban, suburban)
- Indoor office, indoor factory, indoor home
Fading and shadowing
- Fading: Rayleigh, Nakagami
- Shadowing: log-normal, constant
Mobility models
- Random walk, random waypoint
- Group mobility, pedestrian mobility
- File-based mobility from a trajectory file
Energy model
- Per-state draw: transmit, receive, idle, sleep
- Energy harvesting to recharge the battery
- Track remaining energy and node lifetime
Antennas
Omnidirectional and sector (directional) antenna models let you study coverage and interference with different antenna patterns.
Results at a glance
Every run ends in a results dashboard with network, link, and application metrics, alongside time-series plots.
The MANET results window summarises throughput, delay, errors, and control traffic per link and per application.
What you can study
Worked examples that you can load, run and extend.
AODV versus OLSR overhead
Compare control-traffic overhead and performance of a reactive and a proactive protocol across static and mobile scenarios.
Velocity versus routing
Vary node velocity and watch how route churn and application throughput respond as the topology changes faster.
Energy consumption
Measure how transmit, receive, and idle states drain node batteries, and how harvesting and traffic load change network lifetime.
Range-based path loss
Study multi-hop reach, interference, and transmission failure across eight cases of the range-based path-loss model, with and without mobility.
Metrics, logs, and source code
Summary statistics give quick answers, and detailed traces support deep analysis. When you need to change the behaviour, the C source code is open.
Summary statistics
The summary reports throughput, delay, errors, data and control packet counts, and forwarding tables, per link and per application.
Packet trace
The trace records the packet ID, source, destination, arrival time, payload and overhead of each packet as it moves through the network.
Radio measurements log
For each transmission, the log records the Tx-Rx distance, transmit power, path loss, receive power, SNR, SINR and bit error rate.
Protocol source in C
The protocol C code ships with NetSim. Change it in Visual Studio for your requirements or to add new algorithms.
Extensions and integration
The MANET library connects to NetSim's security research, external tools, and neighbouring libraries.
Cyber attacks and defence
Model a sinkhole attack, secure AODV, and an intrusion detection system to study ad hoc network security and countermeasures.
MATLAB and AI/ML
A socket interface to MATLAB extends the analysis. The same interface drives machine-learning experiments on ad hoc networks.
Related capability
MANET over tactical radio
The same ad hoc routing runs over military waveforms. NetSim Military Radios add TDMA and Dynamic TDMA MAC layers, manpack and VHF/UHF radio models, and link-quality-aware OLSRv2 for tactical networks.
- TDMA and Dynamic TDMA (DTDMA)
- Manpack and tactical radio models
- Link-quality-aware OLSRv2 routing
Useful links
Use the documentation, the OLSRv2 page, white papers and support to take a MANET project further.