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:
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.
As many of us who would like to move our IT labs entirely into the public cloud know, that option is convenient but also pricey when student numbers ramp up and virtual networks need to persist over weeks or even a term. Mininet appears to offer a promising way to build multiple modern, complex SDN networks in the cloud on a single machine.
Further reading: Mininet on CentOS 7 KVM