You may emulate mobile ad hoc network (MANET) and vehicular ad hoc network (VANET) using Mininet-WiFi, and visualize them in a graphical interface. VANET is a subset of MANET, which can be emulated by sub-classing the generic interfaces of Mininet-WiFi. In this recipe, we will adopt and extend an example from the Mininet-WiFi.
Listing 9.4 shows the code to emulate a mobile network:
#!/usr/bin/env python # Python Network Programming Cookbook, Second Edition -- Chapter - 9 # This program is optimized for Python 2.7.12. # It may run on any other version with/without modifications. from mininet.net import Mininet from mininet.node ...