CenturionStudio.it - Fotolia
For those of a certain age, the name Mininet is reminiscent of an old DEC mainframe protocol. But in SDN, Mininet is an open source, OpenFlow network emulator that solves the chicken-and-egg equation of, "How do I get started with OpenFlow without buying OpenFlow-capable switches?"
With Mininet, you can emulate all of the switches, controllers and application code necessary for an OpenFlow network with no financial investment.
Getting started with Mininet
To get started, you can download Mininet as a virtual machine at Mininet.org, and then run it on most desktop hypervisors. Alternatively, if you really want to roll up your sleeves, you can install Mininet on Ubuntu by checking out code on the Git Repository.
Mininet starts from the user space, but some modules are loaded into the kernel. The whole environment is dynamic and can be started and restarted without so much as a reboot.
Mininet.org provides documentation that walks you through creating a network of a single switch, controller, and a few logical hosts, and then provides a tutorial. The material is not designed to be idiot-proof; you are expected to understand fundamentals and tools such as Wireshark. It's also important to have some familiarity with programming as sample scripts for Python are included in the walkthrough.
Mininet OpenFlow test networks expose new switching functions
As you work through the documentation, you dig deeper into switch functions previously locked deep in vendor code. Suddenly interesting possibilities in traffic management bubble to the surface. Controlling the actions of the switch has implications for traffic management, security and systems availability. For example:
- Flows can be pre-installed on the switch: This means balancing is possible at a grain finer than any conventional application delivery controller (ADC) can manage. Furthermore, the prospect of flow management at wire-speed and without any expensive hardware or software is tantalizing.
- A programmable device may selectively act as a switch, bridge or tap: As a result, traffic flows can be forwarded according to risk profile. So, for example, traffic could be forwarded to the security server best able to handle it. This has profound implications on network design; not every flow needs to cross the firewall.
- Total control of forwarding tables: Because we have complete control over the forwarding plane, the rules of networking can be selectively broken. A vendor-shipped product would be unable to do this for many good reasons. As an example, legacy applications tied to specific MAC or IP addresses are hard to virtualize or scale. With OpenFlow, control of the forwarding table allows us to selectively duplicate and forward flows. Clustering or load balancing functions can be retrofitted to legacy applications. By shunning regular CAM table behavior, devices with the same IP and MAC could exist simultaneously.
Mininet will delay the need for initial investment, but not forever
The joy of Mininet is the ability to play out complex scenarios in software. The forwarding behavior of OpenFlow virtual and hardware switches should be identical, so using Mininet allows you to delay the need to test on physical hardware until very late in the usual project lifecycle.
Once you are ready to move beyond the proof of concept (POC), a standard x86 host or even a Raspberry Pi will be useful for physical testing. However, dedicated switch hardware still has advantages of performance and port density. An un-optimized laptop can easily achieve upwards of 20Gbps of forwarding; good enough for most lab testing. However, x86 processors cannot compete with the 1 Tbps backplanes found in white box switches. White box switches would be a necessary investment down the road.
Mininet itself is a learning tool, and an impressively comprehensive one at that. The functionality is sufficient that you may meaningfully evaluate OpenFlow concepts. OpenFlow is a protocol closely allied with SDN, but not bound to it. With Mininet, it is very easy to create OpenFlow POCs that have applications in traditional hardware-defined networks as a method of solving otherwise unsolvable problems. Most importantly, Mininet allows you to get your hands dirty with OpenFlow in a way that seminars on SDN cannot.
Open Networking Foundation pushes for OpenFlow conformance testing
Looking under the hood of OpenFlow
OpenFlow outside the data center