Mininet is a Linux-based network emulator which enables the creation of a realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native), in seconds, with a single command. It is a great way to develop, share, prototype, research, teach and experiment with OpenFlow and Software-Defined Networking systems.
Mininet is written almost entirely in Python, except for a short C utility. Using Python, it is easy to interact with a network using the Mininet CLI (and API), customize it, share it with others, or deploy it on real hardware.
Mininet uses process-based virtualization to run many hosts and switches on a single OS kernel (the developers have successfully booted up to 4096 simultaneous devices). It uses Linux’s support for network namespaces, a lightweight virtualisation feature that provides individual processes with separate network interfaces, routing tables, and ARP tables. Mininet can create kernel or user-space OpenFlow switches, controllers to control the switches, and hosts to communicate over the simulated network. Switches and hosts are connected using virtual ethernet (veth) pairs.
According to the project website, Mininet’s key features include:
- Simple and inexpensive network testbed for developing OpenFlow applications
- Multiple concurrent developers can work independently on the same topology
- System-level regression tests, which are repeatable and easily packaged
- Complex topology testing, without the need to wire up a physical network
- A CLI that is topology-aware and OpenFlow-aware, for debugging or running network-wide tests
- Support for arbitrary custom topologies, and inclusion of a basic set of parameterised topologies
- Usable out of the box without programming, but
- Also provides a straightforward and extensible Python API for network creation and experimentation (Mininet Python API Reference Manual)
- Provides an easy way to get correct system behavior (and, to the extent supported by your hardware, performance) and to experiment with topologies.
Mininet networks run real code including standard Unix/Linux network applications as well as the real Linux kernel and network stack. Because of this, code developed and tested on Mininet, for an OpenFlow controller, modified switch, or host, can move to a real system with minimal changes, for real-world testing, performance evaluation, and deployment. Importantly this means that a design that works in Mininet can usually move directly to hardware switches for line-rate packet forwarding.
Mininet is actively developed and supported, and is released under a permissive BSD Open Source license. The easiest way to get started is to download a pre-packaged Mininet/Ubuntu VM. This VM includes Mininet itself, all OpenFlow binaries and tools pre-installed, and tweaks to the kernel configuration to support larger Mininet networks.