Statistics
| Branch: | Tag: | Revision:

mininet / INSTALL @ ffd089ea

History | View | Annotate | Download (5.24 KB)

1

    
2
Preliminary Mininet Installation/Configuration Notes
3

    
4
Alpha release, March 2010
5

    
6
---
7

    
8
(Disclaimer: this is an early alpha release; things may be broken!)
9

    
10
The easiest way to get Mininet running is to start with one of our pre-built virtual machine images from:
11

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

    
14
Once you have booted up the VM image, all you need to do to install
15
Mininet into it is:
16

    
17
 git clone git://yuba.stanford.edu/mininet.git
18
 cd mininet
19
 sudo make install
20

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

    
24
 sudo mn
25

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

    
30
---
31

    
32
Mininet Manual Installation Notes
33

    
34
These installation notes assume you understand how to do things like
35
compile kernels, apply patches, configure networks, write code, etc.. If
36
this is unfamiliar territory, or if you run into trouble, we recommend
37
using one of our pre-built virtual machine images (see above.)
38

    
39
1. Core Mininet installation
40

    
41
  The core Mininet installation requires gcc, make, python,
42
  and setuptools.
43

    
44
  To install Mininet itself, with root privileges:
45

    
46
  # make install
47

    
48
  This places the mininet package in /usr/lib/python-2.5/site-packages/,
49
  so that 'import mininet' will work, and installs the primary mn
50
  script (mn) as well as its helper utility (mnexec.)
51

    
52
2. Script-based kernel and OpenFlow installation for Debian
53

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

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

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

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

    
72
3. Linux Kernel requirements
73

    
74
  Mininet requires a kernel built with network namespace support enabled,
75
  i.e. with CONFIG_NET_NS=Y
76
  
77
  If your kernel doesn't support it, you will need to build and install a 
78
  kernel that does! >= 2.6.33 works better, but may be harder to get
79
  working, depending on your Linux distribution.
80
  
81
  A script for building Debian packages for 2.6.33.1 is provided in
82
  mininet/util/kbuild. You may wish to read it, as it applies patches
83
  to enable 2.6.33.1 to build under debian-stable, and to enable the
84
  tun driver to work correctly with Mininet.
85
    
86
  Earlier kernels (e.g. 2.6.29) work with CONFIG_NET_NS enabled and no
87
  additional patches, but are much slower at removing veth interfaces,
88
  resulting in much slower switch shutdown.
89

    
90
  For scalable configurations, you might need to increase some of your
91
  kernel limits. Sample params are in util/sysctl_addon, which can be
92
  appended to /etc/sysctl.conf (and modified as necessary for your
93
  desired configuration):
94

    
95
    sudo su -c "cat sysctl_addon >> /etc/sysctl.conf"
96

    
97
  To save the config change, run:
98

    
99
    sudo sysctl -p
100
    
101
4. OpenFlow software and configuration requirements
102

    
103
  Mininet requires either the reference OpenFlow switch implementation
104
  (from openflowswitch.org) or Open vSwitch (openvswitch.org) to be
105
  installed. "make test" requires the reference user and kernel space
106
  implementations as well as Open vSwitch. Note the kernel implementation
107
  is not currently included in OpenFlow 1.0.
108

    
109
  To switch to the most recent OpenFlow 0.8.9 release branch (the most
110
  recent one with full NOX support and kernel datapath support) in your
111
  OpenFlow git tree:
112

    
113
   git checkout -b release/0.8.9 remotes/origin/release/0.8.9
114
  
115
  A patch to enable datapath.c to compile with recent kernels
116
  is included in util/openflow-patches/datapath.patch.
117
  
118
  Mininet will automatically load and remove kernel module dependencies
119
  for supported switch types, using modprobe and rmmod - but these
120
  modules must be in a location where modprobe can find them (i.e.
121
  /lib/modules/...)
122

    
123
  The reference OpenFlow controller (controller(8)) only supports 16
124
  switches by default! If you wish to run a network with more than 16
125
  switches, please recompile controller(8) with larger limits, or use a
126
  different controller such as nox. A patch to controller(8) is included
127
  as util/openflow-patches/controller.patch.
128
  
129
5. Other software dependencies
130

    
131
  To run the iperf test, you need to install iperf:
132

    
133
    sudo aptitude/yum install iperf
134

    
135
  We assume you already have ping installed. ;-)
136
  
137
  To use xterm or sshd with Mininet, you need the following:
138

    
139
    sudo aptitude/yum install sshd xterm screen
140
    
141
  Some examples may have additional requirements - consult the specific
142
  example file for details.
143
  
144
6. Other notes and recommendations
145

    
146
  Mininet should be run either on a machine with
147
  no other important processes, or on a virtual machine (recommended!)
148
  
149
  Multiple concurrent Mininet instances are not supported!
150

    
151
Good luck!
152

    
153
---