4065511abb945c793187b23afc82590d7c966c84
Call netns using setsid to detach from the tty; this is intended to fix the problem of control-C killing your network. sendInt() doesn't actually work - hopefully we can fix this in the future, but it's tricky since we want to detach the many shells from our tty, but then optionally send tty interrupts to them! Ideally we would either know the pid of the subprocess or be able to send a signal to bash to get it to interrupt its subprocess. waitOutput() now uses monitor. We also handle sentinels coming in the middle of output (but default at end should still work well.)
Mininet: A Simple Virtual Testbed for OpenFlow
aka
How to Squeeze a 1024-node OpenFlow Network onto your Laptop
(Extremely Experimental Development Version 0.1, December 2009)
---
Mininet creates simple OpenFlow test networks by using process-based
virtualization and network namespaces.
Simulated hosts (as well as switches and controllers with the user
datapath) are created as processes in separate network namespaces. This
allows a complete OpenFlow network to be simulated on top of a single
Linux kernel.
Mininet provides a set of Python classes and functions which enable
creation of OpenFlow networks of varying sizes and topologies.
In order to run Mininet, you must have:
* A Linux 2.6.26 or greater kernel compiled with network namespace support
enabled. (debian-testing seems to have such a kernel, but it doesn't
work for compiling nox, unfortunately.) 2.6.33 or greater is recommended
for faster switch shutdown.
* The OpenFlow reference implementation (either the user or kernel
datapath may be used, and the tun or ofdatapath kernel modules must be
loaded, respectively)
* Python, bash, ping, iperf, etc.
* Root privileges (required for network device access)
* The netns program (included as netns.c), or an equivalent program
of the same name, installed in an appropriate path location
* mininet.py installed in an appropriate Python path location
Currently mininet includes:
- A simple node infrastructure (Host, Switch, Controller classes) for
creating virtual OpenFlow networks
- A simple network infrastructure (class Network and its descendants
TreeNet, GridNet and LinearNet) for creating scalable topologies and
running experiments (e.g. TreeNet(2,3).run(pingTest) )
- Some simple tests which can be run using someNetwork.run( test )
- A simple command-line interface which may be invoked on a network using
.run( Cli ). It provides useful diagnostic commands, as well as the
ability to send a command to a node. For example,
mininet> h11 ifconfig -a
tells host h11 to run the command 'ifconfig -a'
- A 'cleanup' script to get rid of junk (interfaces, processes, files in
/tmp, etc.) which might be left around by mininet. Try this if things
stop working!
- Examples (in examples/ directory) to help you get started.
Batteries are not included (yet!)
However, some preliminary installation notes are included in the INSTALL
file. Good luck!
---
Bob Lantz
rlantz@cs.stanford.edu
Languages
Python
76.3%
C
12.4%
Shell
10.6%
Makefile
0.7%