This is an old revision of the document!
Mininet on FreeBSD
Mininet is a network emulation tool that has seen fairly wide usage in SDN research, teaching, and development. Mininet relies on cgroups and network namespaces to emulate network nodes and links, and tools like tc to shape traffic, meaning that someone who currently wants to use Mininet either must run Ubuntu(or another supported Linux distribution) or run it in a VM where Mininet can be installed and used.
This page describes the ongoing work of porting Mininet to FreeBSD.
Approach
Mininet mostly hides away platform-specific features into a few classes and methods that call the right shell commands to use them. The work here takes advantage of the fact that many of the commands and features that Mininet relies on has analogues in FreeBSD. To be specific:
- Hosts (processes in network namespaces) can be implemented with vnet jails
- Links (vnet links) can be implemented with epairs
- Traffic shaping (tc) can be done with dummynet
- Resource-limited hosts (via cgroups) can (hopefully) be done with rctl
Part of Mininet's appeal to SDN folks is how it bundles in tools, controllers, and software switches like Open vSwitch (OVS) that are useful for testing with (or learning about) SDN. Some, like OVS is already available as a port (albeit as a userspace switch), and installing/running some of the bundled controllers are just a matter of finding the correct dependencies. Others, like the OpenFlow reference switch, aren't as readily available, and either they need to be ported, or be replaced with a suitable substitute. Another part of this work, then, is getting the more important bundled components working.