Statistics
| Branch: | Tag: | Revision:

mininet / INSTALL @ master

History | View | Annotate | Download (5.28 KB)

1 ee66d53c Bob Lantz
2 d2f9aea2 Bob Lantz
Mininet Installation/Configuration Notes
3 ee66d53c Bob Lantz
----------------------------------------
4 af8f0b61 Bob Lantz
5 ab8c4e91 Bob Lantz
Mininet 2.2.1
6 219f9de7 Bob Lantz
---
7 8125370d Bob Lantz
8 ee66d53c Bob Lantz
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 e04c207c Bob Lantz
12 40beaabc Bob Lantz
(Other distributions may be supported in the future - if you would
13
like to contribute an installation script, we would welcome it!)
14
15 3e38a959 Bob Lantz
1. Easiest "installation" - use our pre-built VM image!
16 40beaabc Bob Lantz
17 ee66d53c Bob Lantz
   The easiest way to get Mininet running is to start with one of our
18 bda54a9a Brian O'Connor
   pre-built virtual machine images from <http://mininet.org/>
19 40beaabc Bob Lantz
20 ee66d53c Bob Lantz
   Boot up the VM image, log in, and follow the instructions on the
21
   Mininet web site.
22 40beaabc Bob Lantz
23 ee66d53c Bob Lantz
   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 40beaabc Bob Lantz
26 ee66d53c Bob Lantz
   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 3e38a959 Bob Lantz
32
2. Next-easiest option: use our Ubuntu package!
33 600dad24 Bob Lantz
34 ee66d53c Bob Lantz
   To install Mininet itself (i.e. `mn` and the Python API) on Ubuntu
35
   12.10+:
36 600dad24 Bob Lantz
37 ee66d53c Bob Lantz
        sudo apt-get install mininet
38 600dad24 Bob Lantz
39 ee66d53c Bob Lantz
   Note: if you are upgrading from an older version of Mininet, make
40
   sure you remove the old OVS from `/usr/local`:
41 c04ef88e Bob Lantz
42 ee66d53c Bob Lantz
        sudo rm /usr/local/bin/ovs*
43
        sudo rm /usr/local/sbin/ovs*
44 c04ef88e Bob Lantz
45 0d58b93a Jose Pedro Oliveira
3. Native installation from source
46
47
3.1. Native installation from source on Ubuntu 12.04+
48 40beaabc Bob Lantz
49 ee66d53c Bob Lantz
   If you're reading this, you've probably already done so, but the
50 5879c492 Bob Lantz
   command to download the Mininet source code is:
51 ee66d53c Bob Lantz
52
        git clone git://github.com/mininet/mininet.git
53 e04c207c Bob Lantz
54 4b65570b Gregory Gee
   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 a60f77ad Bob Lantz
   version of Mininet, you can look at the release tags using
57
58
        cd mininet
59
        git tag
60
61
    and then
62 4b65570b Gregory Gee
63 a60f77ad Bob Lantz
        git checkout <release tag>
64 4b65570b Gregory Gee
65 a60f77ad Bob Lantz
   where <release tag> is the release you want to check out.
66
67
   If you are running Ubuntu, Debian, or Fedora, you may be able to use
68 ce2458c1 M S Vishwanath Bhat
   our handy `install.sh` script, which is in `util/`.
69 40beaabc Bob Lantz
70 ee66d53c Bob Lantz
   *WARNING: USE AT YOUR OWN RISK!*
71 219f9de7 Bob Lantz
72 ee66d53c Bob Lantz
   `install.sh` is a bit intrusive and may possibly damage your OS
73
   and/or home directory, by creating/modifying several directories
74 a60f77ad Bob Lantz
   such as `mininet`, `openflow`, `oftest`, `pox`, etc.. We recommend
75
   trying it in a VM before trying it on a system you use from day to day.
76
77 ee66d53c Bob Lantz
   Although we hope it won't do anything completely terrible, you may
78
   want to look at the script before you run it, and you should make
79
   sure your system and home directory are backed up just in case!
80 40beaabc Bob Lantz
81 ee66d53c Bob Lantz
   To install Mininet itself, the OpenFlow reference implementation, and
82
   Open vSwitch, you may use:
83 40beaabc Bob Lantz
84 88718939 M S Vishwanath Bhat
        util/install.sh -fnv
85 40beaabc Bob Lantz
86 ee66d53c Bob Lantz
   This should be reasonably quick, and the following command should
87
   work after the installation:
88 40beaabc Bob Lantz
89 ee66d53c Bob Lantz
        sudo mn --test pingall
90 40beaabc Bob Lantz
91 ee66d53c Bob Lantz
   To install ALL of the software which we use for OpenFlow tutorials,
92
   including POX, the OpenFlow WireShark dissector, the `oftest`
93 41d93201 Brian O'Connor
   framework, and other potentially useful software, you may use:
94 8125370d Bob Lantz
95 88718939 M S Vishwanath Bhat
        util/install.sh -a
96 ec226c9b Bob Lantz
97 ee66d53c Bob Lantz
   This takes about 4 minutes on our test system.
98 8eae2550 Bob Lantz
99 bda54a9a Brian O'Connor
   You can change the directory where the dependencies are installed using
100
   the -s <directory> flag.
101
102 88718939 M S Vishwanath Bhat
        util/install.sh -s <directory> -a
103 bda54a9a Brian O'Connor
104 0d58b93a Jose Pedro Oliveira
3.2. Native installation from source on Fedora 18+.
105
106
   As root execute the following operations:
107
108
    * install git
109
110
        yum install git
111
112
    * create an user account (e.g. mininet) and add it to the wheel group
113
114
        useradd [...] mininet
115
        usermod -a -G wheel mininet
116
117
    * change the SElinux setting to permissive. It can be done
118
      temporarily with:
119
120
        setenforce 0
121
122
   then login with the new account (e.g. mininet) and do the following:
123
124
    * clone the Mininet repository
125
126
        git clone git://github.com/mininet/mininet.git
127
128
    * install Mininet, the OpenFlow reference implementation, and
129
      Open vSwitch
130
131 88718939 M S Vishwanath Bhat
        util/install.sh -fnv
132 0d58b93a Jose Pedro Oliveira
133
    * enable and start openvswitch
134
135
        sudo systemctl enable openvswitch
136
        sudo systemctl start openvswitch
137
138
    * test the mininet installation
139
140
        sudo mn --test pingall
141
142 600dad24 Bob Lantz
4. Creating your own Mininet/OpenFlow tutorial VM
143 8eae2550 Bob Lantz
144 ee66d53c Bob Lantz
   Creating your own Ubuntu Mininet VM for use with the OpenFlow tutorial
145 5879c492 Bob Lantz
   is easy! First, create a new Ubuntu VM. Next, run two commands in it:
146 8eae2550 Bob Lantz
147 ee66d53c Bob Lantz
        wget https://raw.github.com/mininet/mininet/master/util/vm/install-mininet-vm.sh
148
        time install-mininet-vm.sh
149 d2f9aea2 Bob Lantz
150 5879c492 Bob Lantz
   Finally, verify that Mininet is installed and working in the VM:
151
152
        sudo mn --test pingall
153
154 3e38a959 Bob Lantz
5. Installation on other Linux distributions
155
156 ee66d53c Bob Lantz
   Although we don't support other Linux distributions directly, it
157
   should be possible to install and run Mininet with some degree of
158
   manual effort.
159 3e38a959 Bob Lantz
160 ee66d53c Bob Lantz
   In general, you must have:
161 3e38a959 Bob Lantz
162 ee66d53c Bob Lantz
   * A Linux kernel compiled with network namespace support enabled
163 3e38a959 Bob Lantz
164 307302ed Bob Lantz
   * An compatible software switch such as Open vSwitch or
165
     the Linux bridge.
166 3e38a959 Bob Lantz
167 92b51563 Bob Lantz
   * Python, `bash`, `ping`, `iperf`, etc.
168 3e38a959 Bob Lantz
169 ee66d53c Bob Lantz
   * Root privileges (required for network device access)
170
171
   We encourage contribution of patches to the `install.sh` script to
172
   support other Linux distributions.
173 3e38a959 Bob Lantz
174
175 e04c207c Bob Lantz
Good luck!
176 8eae2550 Bob Lantz
177 3e38a959 Bob Lantz
Mininet Team
178 8eae2550 Bob Lantz
179
---