mininet / INSTALL @ 377d1b1c
History | View | Annotate | Download (5.27 KB)
1 |
|
---|---|
2 |
Mininet Installation/Configuration Notes |
3 |
---------------------------------------- |
4 |
|
5 |
Mininet 2.2.0b1 |
6 |
--- |
7 |
|
8 |
The supported installation methods for Mininet are 1) using a |
9 |
pre-built VM image, and 2) native installation on Ubuntu. You can also |
10 |
easily create your own Mininet VM image (4). |
11 |
|
12 |
(Other distributions may be supported in the future - if you would |
13 |
like to contribute an installation script, we would welcome it!) |
14 |
|
15 |
1. Easiest "installation" - use our pre-built VM image! |
16 |
|
17 |
The easiest way to get Mininet running is to start with one of our |
18 |
pre-built virtual machine images from <http://mininet.org/> |
19 |
|
20 |
Boot up the VM image, log in, and follow the instructions on the |
21 |
Mininet web site. |
22 |
|
23 |
One advantage of using the VM image is that it doesn't mess with |
24 |
your native OS installation or damage it in any way. |
25 |
|
26 |
Although a single Mininet instance can simulate multiple networks |
27 |
with multiple controllers, only one Mininet instance may currently |
28 |
be run at a time, and Mininet requires root access in the machine |
29 |
it's running on. Therefore, if you have a multiuser system, you |
30 |
may wish to consider running Mininet in a VM. |
31 |
|
32 |
2. Next-easiest option: use our Ubuntu package! |
33 |
|
34 |
To install Mininet itself (i.e. `mn` and the Python API) on Ubuntu |
35 |
12.10+: |
36 |
|
37 |
sudo apt-get install mininet |
38 |
|
39 |
Note: if you are upgrading from an older version of Mininet, make |
40 |
sure you remove the old OVS from `/usr/local`: |
41 |
|
42 |
sudo rm /usr/local/bin/ovs* |
43 |
sudo rm /usr/local/sbin/ovs* |
44 |
|
45 |
3. Native installation from source |
46 |
|
47 |
3.1. Native installation from source on Ubuntu 12.04+ |
48 |
|
49 |
If you're reading this, you've probably already done so, but the |
50 |
command to download the Mininet source code is: |
51 |
|
52 |
git clone git://github.com/mininet/mininet.git |
53 |
|
54 |
Note that the above git command will check out the latest and greatest |
55 |
Mininet (which we recommend!) If you want to run the last tagged/released |
56 |
version of Mininet, use: |
57 |
|
58 |
git clone git://github.com/mininet/mininet |
59 |
git checkout -b 2.1.0 2.1.0 |
60 |
|
61 |
If you are running Ubuntu, you may be able to use our handy |
62 |
`install.sh` script, which is in `mininet/util`. |
63 |
|
64 |
*WARNING: USE AT YOUR OWN RISK!* |
65 |
|
66 |
`install.sh` is a bit intrusive and may possibly damage your OS |
67 |
and/or home directory, by creating/modifying several directories |
68 |
such as `mininet`, `openflow`, `oftest`, `pox`, etc.. |
69 |
Although we hope it won't do anything completely terrible, you may |
70 |
want to look at the script before you run it, and you should make |
71 |
sure your system and home directory are backed up just in case! |
72 |
|
73 |
To install Mininet itself, the OpenFlow reference implementation, and |
74 |
Open vSwitch, you may use: |
75 |
|
76 |
mininet/util/install.sh -fnv |
77 |
|
78 |
This should be reasonably quick, and the following command should |
79 |
work after the installation: |
80 |
|
81 |
sudo mn --test pingall |
82 |
|
83 |
To install ALL of the software which we use for OpenFlow tutorials, |
84 |
including POX, the OpenFlow WireShark dissector, the `oftest` |
85 |
framework, and other potentially useful software, you may use: |
86 |
|
87 |
mininet/util/install.sh -a |
88 |
|
89 |
This takes about 4 minutes on our test system. |
90 |
|
91 |
You can change the directory where the dependencies are installed using |
92 |
the -s <directory> flag. |
93 |
|
94 |
mininet/util/install.sh -s <directory> -a |
95 |
|
96 |
3.2. Native installation from source on Fedora 18+. |
97 |
|
98 |
As root execute the following operations: |
99 |
|
100 |
* install git |
101 |
|
102 |
yum install git |
103 |
|
104 |
* create an user account (e.g. mininet) and add it to the wheel group |
105 |
|
106 |
useradd [...] mininet |
107 |
usermod -a -G wheel mininet |
108 |
|
109 |
* change the SElinux setting to permissive. It can be done |
110 |
temporarily with: |
111 |
|
112 |
setenforce 0 |
113 |
|
114 |
then login with the new account (e.g. mininet) and do the following: |
115 |
|
116 |
* clone the Mininet repository |
117 |
|
118 |
git clone git://github.com/mininet/mininet.git |
119 |
|
120 |
* install Mininet, the OpenFlow reference implementation, and |
121 |
Open vSwitch |
122 |
|
123 |
mininet/util/install.sh -fnv |
124 |
|
125 |
* enable and start openvswitch |
126 |
|
127 |
sudo systemctl enable openvswitch |
128 |
sudo systemctl start openvswitch |
129 |
|
130 |
* test the mininet installation |
131 |
|
132 |
sudo mn --test pingall |
133 |
|
134 |
4. Creating your own Mininet/OpenFlow tutorial VM |
135 |
|
136 |
Creating your own Ubuntu Mininet VM for use with the OpenFlow tutorial |
137 |
is easy! First, create a new Ubuntu VM. Next, run two commands in it: |
138 |
|
139 |
wget https://raw.github.com/mininet/mininet/master/util/vm/install-mininet-vm.sh |
140 |
time install-mininet-vm.sh |
141 |
|
142 |
Finally, verify that Mininet is installed and working in the VM: |
143 |
|
144 |
sudo mn --test pingall |
145 |
|
146 |
5. Installation on other Linux distributions |
147 |
|
148 |
Although we don't support other Linux distributions directly, it |
149 |
should be possible to install and run Mininet with some degree of |
150 |
manual effort. |
151 |
|
152 |
In general, you must have: |
153 |
|
154 |
* A Linux kernel compiled with network namespace support enabled |
155 |
|
156 |
* An OpenFlow implementation (either the reference user or kernel |
157 |
space implementations, or Open vSwitch.) Appropriate kernel |
158 |
modules (e.g. tun and ofdatapath for the reference kernel |
159 |
implementation) must be loaded. |
160 |
|
161 |
* Python, `bash`, `ping`, `iperf`, etc. |
162 |
|
163 |
* Root privileges (required for network device access) |
164 |
|
165 |
We encourage contribution of patches to the `install.sh` script to |
166 |
support other Linux distributions. |
167 |
|
168 |
|
169 |
Good luck! |
170 |
|
171 |
Mininet Team |
172 |
|
173 |
--- |