Mobile Ad Hoc Networks
AODV · DSR · OLSRv1 / v2 · ZRP · Mobility
NetSim's MANET library lets you design, simulate, and analyse mobile ad hoc networks: a full five-layer stack on every node, the main ad hoc routing protocols, RF propagation, mobility, and energy. Modify any of it through protocol source code in C.
What NetSim models
A complete ad hoc node, from application traffic down to the radio, with the dynamics 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
The protocols that build and repair routes without infrastructure: AODV, DSR, OLSRv1 and OLSRv2, and ZRP.
Mobility and energy
Node motion from random, group, pedestrian, or file-based models, and a battery model with transmit, receive, idle, sleep, and harvesting states.
Own the source
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
Reactive, proactive, and hybrid protocols, each implemented to its RFC and open to inspection in source.
AODV
Ad hoc On-demand Distance Vector routing discovers a route only when traffic needs one, using RREQ and RREP exchanges and sequence numbers to keep 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 continuously through link sensing, neighbour detection, multipoint relay (MPR) selection, and topology control. v1 per RFC 3626, v2 per RFC 7181.
ZRP
Zone Routing Protocol is proactive inside each node's local zone (IARP) and reactive between zones (IERP), trading 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
The physical conditions a routing protocol has to cope with: propagation, fading, movement, and a draining battery.
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, so you can study coverage and interference under 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 from the MANET manual, ready to 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 for quick answers, detailed traces for deep analysis, and open C source when you need to change behaviour.
Summary statistics
Throughput, delay, errors, and data and control packet counts, with forwarding tables, reported per link and per application.
Packet trace
A per-packet record of packet ID, source, destination, arrival time, payload, and overhead as packets move through the network.
Radio measurements log
Per transmission: 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. Adapt it in Visual Studio for specific requirements or 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
Socket-based interfacing to MATLAB extends analysis, and the same hooks drive 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
Documentation, the OLSRv2 page, white papers, and support to take a MANET project further.