Revision 52c700ff

View differences:

INSTALL
1 1

  
2 2
Preliminary Mininet Installation/Configuration Notes
3 3

  
4
Alpha release, March 2010
4
Pre-Beta release, August 2010
5 5

  
6 6
---
7 7

  
8
(Disclaimer: this is an early alpha release; things may be broken!)
8
(Disclaimer: we're still pre-beta - things may be broken!)
9 9

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

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

  
......
36 37
this is unfamiliar territory, or if you run into trouble, we recommend
37 38
using one of our pre-built virtual machine images (see above.)
38 39

  
40
If you wish to try to create a VM to run Mininet, you may also wish
41
to look at the Wiki page:
42

  
43
http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/MininetVMCreationNotes
44

  
45
0. Obtaining Mininet
46

  
47
  If you're reading this, you've already done it, but the command to
48
  download mininet is:
49
   
50
  git clone git://yuba.stanford.edu/mininet.git
51
     
39 52
1. Core Mininet installation
40 53

  
41 54
  The core Mininet installation requires gcc, make, python,
42
  and setuptools.
55
  and setuptools. On Ubuntu and Debian you may install them with:
56
  
57
  # aptitude install gcc make python setuptools
43 58

  
44 59
  To install Mininet itself, with root privileges:
45

  
60
  
61
  # cd mininet
46 62
  # make install
47 63

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

  
52
2. Script-based kernel and OpenFlow installation for Debian
68
2. Script-based kernel and OpenFlow installation for Ubuntu/Debian Lenny
53 69

  
54
  If you are running debian-stable, you may be able to use the
70
  If you are running Ubuntu 10.04 or Debian Lenny, you may be able to use the
55 71
  util/install.sh script to install a compatible Linux kernel as well as
56 72
  other software including the OpenFlow reference implementation, the Open
57 73
  vSwitch switch implementation, and the NOX OpenFlow controller. Assuming
......
63 79
  % sudo reboot  # to load new kernel
64 80
  % ~/mininet/util/install.sh -c  # to clean out unneeded kernel stuff
65 81

  
66
  If install.sh cannot be used for some reason, the kernel and
82
  This installs a lot of useful software, but it will take a while (20
83
  minutes or more, depending on your network connection, computer, etc..)
84

  
85
  If install.sh cannot be used for some reason, or if you don't want to
86
  install all of these components (they're useful!), the kernel and
67 87
  OpenFlow software requirements are descibed in steps [3] and [4],
68 88
  which follow.
69 89

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

  
90
  If you successfully used install.sh, congratulations! You're basically
91
  done. Proceed to step [6] for additional advice.
92
      
72 93
3. Linux Kernel requirements
73 94

  
74 95
  Mininet requires a kernel built with network namespace support enabled,
75
  i.e. with CONFIG_NET_NS=Y
96
  i.e. with CONFIG_NET_NS=Y, such as the kernel shipped with
97
  Ubuntu 10.04 LTS, currently 2.6.32. On Ubuntu 10.04, you should not need
98
  to install or build a custom kernel, although 2.6.33+ is faster at
99
  tearing down virtual ethernet pairs.
100

  
101
  For Ubuntu and Debian, we provide a 2.6.33 kernel package which you may be
102
  able to install using "util/install.sh -x". Note our kernel package
103
  requires an ext2 or ext3 root file system, so it won't work if you have
104
  a default Ubuntu install, which uses ext4.
76 105
  
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.
106
  If your kernel wasn't compiled with CONFIG_NET_NS=Y, you will need to 
107
  build and install a  kernel that does! >= 2.6.33 works better, but may 
108
  be harder to get working, depending on your Linux distribution.
80 109
  
81 110
  A script for building Debian packages for 2.6.33.1 is provided in
82 111
  mininet/util/kbuild. You may wish to read it, as it applies patches
......
102 131

  
103 132
  Mininet requires either the reference OpenFlow switch implementation
104 133
  (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
134
  installed. "make test" requires the reference user space
135
  implementations as well as Open vSwitch. Note the reference kernel
136
  implementation is not currently included in OpenFlow 1.0.
114 137
  
115
  A patch to enable datapath.c to compile with recent kernels
116
  is included in util/openflow-patches/datapath.patch.
138
  On Ubuntu and  Debian, the install.sh script may be used with the '-f'
139
  option to install the OpenFlow reference implementation, the '-v' option
140
  to build Open vSwitch, and the '-m' option to install the Open vSwitch
141
  kernel module into /lib/modules (note: you must build Open vSwitch first!)
117 142
  
118 143
  Mininet will automatically load and remove kernel module dependencies
119 144
  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/...)
145
  modules must be in a location where modprobe can find them (e.g.
146
  something like /lib/modules/`uname -r`/kernel/drivers/net/)
122 147

  
123 148
  The reference OpenFlow controller (controller(8)) only supports 16
124 149
  switches by default! If you wish to run a network with more than 16
......
128 153
  
129 154
5. Other software dependencies
130 155

  
156
  On Ubuntu and Debian, other Mininet dependencies may be installed using
157
  the '-n' option of the install.sh script.
158

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

  
133 161
    sudo aptitude/yum install iperf
......
141 169
  Some examples may have additional requirements - consult the specific
142 170
  example file for details.
143 171
  
172
  The install.sh script has an '-x' option to install the version of
173
  NOX from the OpenFlow tutorial.
174
  
144 175
6. Other notes and recommendations
145 176

  
146 177
  Mininet should be run either on a machine with
......
151 182
Good luck!
152 183

  
153 184
---
185

  
186
Historical information on OpenFlow 0.8.9 and the reference kernel module:
187

  
188
  The kernel reference implementation has been deprecated, but it may
189
  be possible to get it work with Mininet.
190
  
191
  To switch to the most recent OpenFlow 0.8.9 release branch (the most
192
  recent one with full NOX support and kernel datapath support) in your
193
  OpenFlow git tree:
194

  
195
   git checkout -b release/0.8.9 remotes/origin/release/0.8.9
196
  
197
  A patch to enable datapath.c to compile with recent kernels
198
  is included in util/openflow-patches/datapath.patch.
199
  
200
  In OpenFlow 1.0, switch port numbering starts at 1 (for better or for worse.)
201
  To run with previous versions of OpenFlow, it may be necessary
202
  to change SWITCH_PORT_BASE from 1 to 0 in node.py.
203

  
204
  
205
  
206
  
207
  

Also available in: Unified diff