Newer
Older
Preliminary Mininet Installation/Configuration Notes
- This is not (yet) a 'release'; things may be broken.
- Mininet is not currently 'installed.' If you want to install it,
so that you can 'import mininet', place mininet.py somewhere in your
- A functional netns binary is required to run mininet, but currently you
have to compile it and install it yourself from the included .c file:
to make it: make netns (or cc -o netns netns.c)
to test it: ./netns /sbin/ifconfig -a
to 'install' a link to it, you could do something like:
sudo ln -s /home/openflow/mininet/netns /usr/local/bin/netns
Installation is simplest with a distribution that includes a kernel
which supports the CLONE_NETNS unshare flag by default. Debian 5.0+ does
(e.g. current debian-testing release); Ubuntu doesn't. If your kernel
doesn't support it, you will need to build and install a kernel that
does!
- Mininet should probably be run either on a machine with
no other important processes, or on a virtual machine
- To run the iperf test, you need to install iperf:
sudo aptitude/yum install iperf
We assume you already have ping installed. ;-)
- You may need other packages to run the examples, e.g.
sudo aptitude/yum install sshd xterm screen
Consult the appropriate example file for details.
- To switch to the most recent OpenFlow 0.8.9 release branch (the most
git checkout -b release/0.8.9 remotes/origin/release/0.8.9
If you want to automatically load the kernel modules required
for OpenFlow, you could add something like the following to
/etc/rc.local:
insmod /home/openflow/openflow/datapath/linux-2.6/ofdatapath.ko
modprobe tun
- The reference OpenFlow controller (controller(8)) only supports 16
switches by default! If you wish to run a network with more than 16
switches, please recompile controller(8) with larger limits, or use a
different controller such as nox. (At the moment, unfortunately, it's
not easy to do so without modifying mininet.py. This will be improved
- For scalable configurations, you might need to increase some of your
kernel limits. For example, you could add something like the following
to /etc/sysctl.conf (modified as necessary for your desired
configuration):
# OpenFlow: get rid of ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
# Mininet: Increase open file limit
fs.file-max = 100000
# Mininet: increase network buffer space
net.core.wmem_max = 16777216
net.core.rmem_max = 16777216
net.ipv4.tcp_rmem = 10240 87380 16777216
net.ipv4.tcp_rmem = 10240 87380 16777216
net.core.netdev_max_backlog = 5000
# Mininet: increase arp cache size
net.ipv4.neigh.default.gc_thresh1 = 4096
net.ipv4.neigh.default.gc_thresh2 = 8192
net.ipv4.neigh.default.gc_thresh3 = 16384
# Mininet: increase routing table size
net.ipv4.route.max_size=32768