Preliminary Mininet Installation/Configuration Notes --- - This is not (yet) a 'release'; things may be broken. - These installation notes assume you understand how to do things like compile kernels, apply patches, configure networks, write code, etc.. If this is unfamiliar territory, we recommend using one of our pre-built virtual machine images. - To install mininet, with root privileges: # make install This places the mininet package in /usr/lib/python-2.5/site-packages/, so that 'import mininet' will work, and installs the primary mn script (mn) as well as its helper utility (mnexec.) - Mininet requires a kernel built with support for the CLONE_NETNS unshare flag by default (i.e. with CONFIG_NET_NS turned on.) If your kernel doesn't support it, you will need to build and install a kernel that does! >= 2.6.33 works best, although the reference kernel switch requires a small patch to compile with it (see below.) - Mininet should probably be run either on a machine with no other important processes, or on a virtual machine. Multiple concurrent Mininet instances are not supported. - 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 recent one with full NOX support): git checkout -b release/0.8.9 remotes/origin/release/0.8.9 To compile for Linux 2.6.33, you may need to apply the patch included below. - Mininet will automatically load and remove kernel module dependencies for supported switch types, using modprobe and rmmod - but these modules must be in a location where modprobe can find them. See ~/mininet/util/modprobe_setup.sh for an example. - 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. - For scalable configurations, you might need to increase some of your kernel limits. Sample params are in sysctl_addon, which can be appended to /etc/sysctl.conf (and modified as necessary for your desired configuration): sudo su -c "cat sysctl_addon >> /etc/sysctl.conf" To save the config change, run: sudo sysctl -p --- patch to OpenFlow reference implementation datapath/datapath.c to compile under linux 2.6.33: diff --git a/datapath/datapath.c b/datapath/datapath.c index 4a4d3a2..365aa25 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -47,6 +47,9 @@ #include "compat.h" +#ifdef CONFIG_NET_NS +#include <net/net_namespace.h> +#endif /* Strings to describe the manufacturer, hardware, and software. This data * is queriable through the switch description stats message. */ @@ -259,7 +262,11 @@ send_openflow_skb(const struct datapath *dp, struct sk_buff *skb, const struct sender *sender) { return (sender - ? genlmsg_unicast(skb, sender->pid) +#ifdef CONFIG_NET_NS + ? genlmsg_unicast(&init_net, skb, sender->pid) +#else + ? genlmsg_unicast(skb, sender->pid) +#endif : genlmsg_multicast(skb, 0, dp_mc_group(dp), GFP_ATOMIC)); }