NS2 sample source code for Mobile Ad hoc Network

  The primary nature of mobility in MANET can be simulated using NS2 by integrating the mobility model generated by the Mobility model generation tool Bonn Motion. Different communication range can be configured for the nodes. Variety of Ad hoc routing protocols are available in NS2 such as AODV, DSDV, DSR, TORA, AOMDV. Location based routing protocols such as GPSR can be patched to existing ns2 package. Various network issues like congestion, link breakage due to mobility can be simulated. Different attacks can be modeled by modifying the nature of the attacker nodes in protocol process and security mechanisms can be integrated with protocol agents.

The samples given below can be used to simulate MANET environment: