Skip to content
Snippets Groups Projects
INSTALL 5.24 KiB
Newer Older
Bob Lantz's avatar
Bob Lantz committed

Preliminary Mininet Installation/Configuration Notes
Bob Lantz's avatar
Bob Lantz committed
Alpha release, March 2010
Bob Lantz's avatar
Bob Lantz committed
---

Bob Lantz's avatar
Bob Lantz committed
(Disclaimer: this is an early alpha release; things may be broken!)
Bob Lantz's avatar
Bob Lantz committed

The easiest way to get Mininet running is to start with one of our pre-built virtual machine images from:
Bob Lantz's avatar
Bob Lantz committed

http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/MininetGettingStarted

Once you have booted up the VM image, all you need to do to install
Bob Lantz's avatar
Bob Lantz committed
Mininet into it is:
Bob Lantz's avatar
Bob Lantz committed
 git clone git://yuba.stanford.edu/mininet.git
 cd mininet
 sudo make install

At this point, it should be possible to run a simple Mininet configuration
from the command line:

 sudo mn

As an alternative, if you are Linux-savvy, do not wish to use the VM
image, and wish to take on the challenge of installing Mininet and its
dependencies from scratch, the requirements are described below.

---

Mininet Manual Installation Notes
Bob Lantz's avatar
Bob Lantz committed
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, or if you run into trouble, we recommend
using one of our pre-built virtual machine images (see above.)

1. Core Mininet installation
  The core Mininet installation requires gcc, make, python,
  and setuptools.

  To install Mininet itself, with root privileges:
Bob Lantz's avatar
Bob Lantz committed
  # 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.)
Bob Lantz's avatar
Bob Lantz committed
2. Script-based kernel and OpenFlow installation for Debian

  If you are running debian-stable, you may be able to use the
  util/install.sh script to install a compatible Linux kernel as well as
  other software including the OpenFlow reference implementation, the Open
  vSwitch switch implementation, and the NOX OpenFlow controller. Assuming
  the mininet source tree is installed in ~/mininet, the steps to run
  install.sh are as follows:

  % cd
  % time ~/mininet/util/install.sh
  % sudo reboot  # to load new kernel
  % ~/mininet/util/install.sh -c  # to clean out unneeded kernel stuff

  If install.sh cannot be used for some reason, the kernel and
  OpenFlow software requirements are descibed in steps [3] and [4],
  which follow.

  If you successfully used install.sh, proceed to step [5].

3. Linux Kernel requirements

  Mininet requires a kernel built with network namespace support enabled,
  i.e. with CONFIG_NET_NS=Y
  
  If your kernel doesn't support it, you will need to build and install a 
Bob Lantz's avatar
Bob Lantz committed
  kernel that does! >= 2.6.33 works better, but may be harder to get
  working, depending on your Linux distribution.
Bob Lantz's avatar
Bob Lantz committed
  A script for building Debian packages for 2.6.33.1 is provided in
  mininet/util/kbuild. You may wish to read it, as it applies patches
  to enable 2.6.33.1 to build under debian-stable, and to enable the
  tun driver to work correctly with Mininet.
    
Bob Lantz's avatar
Bob Lantz committed
  Earlier kernels (e.g. 2.6.29) work with CONFIG_NET_NS enabled and no
  additional patches, but are much slower at removing veth interfaces,
Bob Lantz's avatar
Bob Lantz committed
  resulting in much slower switch shutdown.
  For scalable configurations, you might need to increase some of your
Bob Lantz's avatar
Bob Lantz committed
  kernel limits. Sample params are in util/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:
Bob Lantz's avatar
Bob Lantz committed
4. OpenFlow software and configuration requirements

  Mininet requires either the reference OpenFlow switch implementation
Bob Lantz's avatar
Bob Lantz committed
  (from openflowswitch.org) or Open vSwitch (openvswitch.org) to be
  installed. "make test" requires the reference user and kernel space
  implementations as well as Open vSwitch. Note the kernel implementation
  is not currently included in OpenFlow 1.0.

  To switch to the most recent OpenFlow 0.8.9 release branch (the most
Bob Lantz's avatar
Bob Lantz committed
  recent one with full NOX support and kernel datapath support) in your
  OpenFlow git tree:
Bob Lantz's avatar
Bob Lantz committed
   git checkout -b release/0.8.9 remotes/origin/release/0.8.9
Bob Lantz's avatar
Bob Lantz committed
  A patch to enable datapath.c to compile with recent kernels
Bob Lantz's avatar
Bob Lantz committed
  is included in util/openflow-patches/datapath.patch.
Bob Lantz's avatar
Bob Lantz committed
  
Bob Lantz's avatar
Bob Lantz committed
  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 (i.e.
  /lib/modules/...)
  The reference OpenFlow controller (controller(8)) only supports 16
Bob Lantz's avatar
Bob Lantz committed
  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. A patch to controller(8) is included
Bob Lantz's avatar
Bob Lantz committed
  as util/openflow-patches/controller.patch.
Bob Lantz's avatar
Bob Lantz committed
  
Bob Lantz's avatar
Bob Lantz committed
5. Other software dependencies
Bob Lantz's avatar
Bob Lantz committed
  To run the iperf test, you need to install iperf:
    sudo aptitude/yum install iperf
  We assume you already have ping installed. ;-)
  
Bob Lantz's avatar
Bob Lantz committed
  To use xterm or sshd with Mininet, you need the following:
    sudo aptitude/yum install sshd xterm screen
    
Bob Lantz's avatar
Bob Lantz committed
  Some examples may have additional requirements - consult the specific
  example file for details.
Bob Lantz's avatar
Bob Lantz committed
6. Other notes and recommendations
Bob Lantz's avatar
Bob Lantz committed
  Mininet should be run either on a machine with
  no other important processes, or on a virtual machine (recommended!)
  
  Multiple concurrent Mininet instances are not supported!

Good luck!