Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
e04c207c
Commit
e04c207c
authored
12 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Update for Mininet 2.0.0 development.
parent
0f832c92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
INSTALL
+30
-224
30 additions, 224 deletions
INSTALL
LICENSE
+2
-2
2 additions, 2 deletions
LICENSE
README
+3
-10
3 additions, 10 deletions
README
setup.py
+10
-7
10 additions, 7 deletions
setup.py
with
45 additions
and
243 deletions
INSTALL
+
30
−
224
View file @
e04c207c
Mininet Installation/Configuration Notes
Mininet
1
.0.0
Mininet
2
.0.0
d1
---
The supported installation methods for Mininet are 1) using
a pre-built VM image, and 2) native installation on Ubuntu or Debian.
a pre-built VM image, and 2) native installation on Ubuntu. You
can also easily create your own Mininet VM image (3).
(Other distributions may be supported in the future - if you would
like to contribute an installation script, we would welcome it!)
...
...
@@ -20,10 +22,15 @@ Boot up the VM image, log in, and follow the instructions on the wiki page.
An additional advantage of using the VM image is that it doesn't mess with
your native OS installation or damage it in any way.
2. Native installation
(experimental!) for Ubuntu 10.04 LTS
2. Native installation
on Ubuntu
If you are running Ubuntu 10.04 LTS (or possibly Debian 5), you may be
able to use our handy install.sh script, which is in mininet/util.
If you're reading this, you've probably already done it, but the command to
download the Mininet source code is;
git clone git://openflow.org/mininet.git
If you are running Ubuntu, you may be able to use our handy install.sh script,
which is in mininet/util.
WARNING: USE AT YOUR OWN RISK!
...
...
@@ -34,240 +41,39 @@ do anything completely terrible, you may want to look at the script
before you run it, and you should make sure your system and home
directory are backed up just in case!
To install
ALL of the software which we use for OpenFlow tutorials,
you may use
To install
Mininet itself, the OpenFlow reference implementation, and
Open vSwitch,
you may use
:
$ mininet/util/install.sh
$ mininet/util/install.sh
-fnv
This takes about 20-30 minutes.
This should be reasonably quick and the following command should work
after the installation:
Alternately, you can install just the pieces you need.
$ sudo mn --test pingall
We recommend the following steps, in order:
To install ALL of the software which we use for OpenFlow tutorials,
including NOX classic, the OpenFlow WireShark dissector, the oftest
framework, and other potentially useful software (and to add some stuff
to /etc/sysctl.conf which may or may not be useful) you may use
[a) On Debian 5, first install a Mininet-compatible kernel:
$ mininet/util/install.sh -k
Reboot and run 'uname -r' to make sure you're running the new kernel.]
$ mininet/util/install.sh -a
b) Install mininet and its dependencies:
$ mininet/util/install.sh -n
c) Install OpenFlow 1.0 and associated useful software
$ mininet/util/install.sh -f
This takes about 20 minutes on our test system.
d) Install Open vSwitch and its kernel module
$ mininet/util/install.sh -vm
3. Creating your own Mininet/OpenFlow tutorial VM
e) If you wish to install the version of NOX we
use
in
the tutorial
:
$ mininet/util/install.sh -x
Creating your own Ubuntu Mininet VM for
use
with
the
OpenFlow
tutorial
is easy! First, create a new Ubuntu VM. Then, run
Note: NOX development is progressing over time, so after you complete
the tutorial you may wish to install the latest and greatest NOX from
noxrepo.org.
$ wget https://raw.github.com/mininet/mininet/util/vm/install-mininet-vm.sh
$ time install-mininet-vm.sh
Good luck! Some additional installation notes are provided below, for
the brave and/or Linux-savvy, or those who are trying to understand what
is installed and why.
Good luck!
p.s. Note that only one instance of Mininet is currently supported on a single
machine - that's one reason we recommend using a VM to run it.
---
Mininet Manual Installation Notes
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.)
If you wish to try to create a VM to run Mininet, you may also wish
to look at the Wiki page:
http://openflow.org/foswiki/bin/view/OpenFlow/MininetVMCreationNotes
0. Obtaining Mininet
If you're reading this, you've already done it, but the command to
download mininet is:
git clone git://openflow.org/mininet.git
1. Core Mininet installation
The core Mininet installation requires gcc, make, python,
and setuptools. On Ubuntu and Debian you may install them with:
# aptitude install gcc make python setuptools
To install Mininet itself, with root privileges:
# cd mininet
# make install
This places the mininet package in /usr/lib/python-*/site-packages/,
so that 'import mininet' will work, and installs the primary mn
script (mn) as well as its helper utility (mnexec.)
On Ubuntu and Debian, Mininet's dependencies and core files may also be
installed using mininet/util/install.sh -n
2. Installation script for Ubuntu/Debian Lenny
If you are running Ubuntu 10.04 or Debian Lenny, 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.
Many different installation options are possible by passing different
options to install.sh; install.sh -h lists them all.
Assuming the mininet source tree is installed in ~/mininet, the steps to run
install.sh to install EVERYTHING we use for OpenFlow tutorials are:
% cd
% time ~/mininet/util/install.sh # installs tons of stuff
% sudo reboot # to load new kernel
% ~/mininet/util/install.sh -c # to clean out unneeded kernel stuff
This installs a lot of useful software, but it will take a while (30
minutes or more, depending on your network connection, computer, etc..)
Probably the minimal semi-useful configuration would be to install
Mininet itself, kernel support if necessary, and either the
reference OpenFlow switch or Open vSwitch. This could be installed
as follows:
% sudo ~/mininet/util/install.sh -knvm
Respectively, this installs kernel support, core mininet dependencies,
Open vSwitch, and the Open vSwitch kernel module. If a new kernel was
installed, then a reboot may be required.
If install.sh cannot be used for some reason (e.g. you're on Fedora
or some other Linux - please don't say CentOS) or if you don't want to
install all of these components (they're useful!), the kernel and
OpenFlow software requirements are described in steps [3] and [4],
which follow.
If you successfully used install.sh, congratulations! You're basically
done. Proceed to step [6] for additional advice.
3. Linux Kernel requirements
Mininet requires a kernel built with network namespace support enabled,
i.e. with CONFIG_NET_NS=Y, such as the kernel shipped with
Ubuntu 10.04 LTS, currently 2.6.32. On Ubuntu 10.04, you should not need
to install or build a custom kernel, although 2.6.33+ is faster at
tearing down virtual ethernet pairs.
For Ubuntu and Debian, we provide a 2.6.33 kernel package which you may be
able to install using "util/install.sh -k". Note our kernel package
requires an ext2 or ext3 root file system, so it won't work if you have
a default Ubuntu install, which uses ext4.
If your kernel wasn't compiled with CONFIG_NET_NS=Y, you will need to
build and install a kernel that does! >= 2.6.33 works better, but may
be harder to get working, depending on your Linux distribution.
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.
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,
resulting in much slower switch shutdown.
For scalable configurations, you might need to increase some of your
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:
sudo sysctl -p
4. OpenFlow software and configuration requirements
Mininet requires either the reference OpenFlow switch implementation
(from openflowswitch.org) or Open vSwitch (openvswitch.org) to be
installed. "make test" requires the reference user space
implementations as well as Open vSwitch. Note the reference kernel
implementation is not currently included in OpenFlow 1.0.
On Ubuntu and Debian, the install.sh script may be used with the '-f'
option to install the OpenFlow reference implementation, the '-v' option
to build Open vSwitch, and the '-m' option to install the Open vSwitch
kernel module into /lib/modules (note: you must build Open vSwitch first!)
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 (e.g.
something like /lib/modules/`uname -r`/kernel/drivers/net/)
The reference OpenFlow controller (controller(8)) only supports 16
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
as util/openflow-patches/controller.patch.
5. Other software dependencies
On Ubuntu and Debian, other Mininet dependencies may be installed using
the '-n' option of the install.sh script.
To run the iperf test, you need to install iperf:
sudo aptitude/yum install iperf
We assume you already have ping installed. ;-)
To use xterm or sshd with Mininet, you need the following:
sudo aptitude/yum install sshd xterm screen
Some examples may have additional requirements - consult the specific
example file for details.
The install.sh script has an '-x' option to install the version of
NOX from the OpenFlow tutorial.
6. Other notes and recommendations
If you did not install certain useful packages and you wish to later,
it may be possible to install them using install.sh.
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!
---
Historical information on OpenFlow 0.8.9 and the reference kernel module:
The kernel reference implementation has been deprecated, but it may
be possible to get it work with Mininet.
To switch to the most recent OpenFlow 0.8.9 release branch (the most
recent one with full NOX support and kernel datapath support) in your
OpenFlow git tree:
git checkout -b release/0.8.9 remotes/origin/release/0.8.9
A patch to enable datapath.c to compile with recent kernels
is included in util/openflow-patches/datapath.patch.
In OpenFlow 1.0, switch port numbering starts at 1 (for better or for worse.)
To run with previous versions of OpenFlow, it may be necessary
to change SWITCH_PORT_BASE from 1 to 0 in node.py.
This diff is collapsed.
Click to expand it.
LICENSE
+
2
−
2
View file @
e04c207c
Mininet
1
.0.0 License
Mininet
2
.0.0
d1
License
Copyright (c) 2009-201
1
Bob Lantz and Brandon Heller
Copyright (c) 2009-201
2
Bob Lantz and Brandon Heller
We are making Mininet available for public use and benefit with the
expectation that others will use, modify and enhance the Software and
...
...
This diff is collapsed.
Click to expand it.
README
+
3
−
10
View file @
e04c207c
Mininet: A Simple Virtual Testbed for OpenFlow/SDN
or
How to Squeeze a
1024-node
OpenFlow Network onto your Laptop
How to Squeeze a
n
OpenFlow Network onto your Laptop
Mininet
1
.0.0
Mininet
2
.0.0
d1
---
Welcome to Mininet!
...
...
@@ -19,16 +19,9 @@ Linux kernel.
Mininet may be invoked directly from the command line, and also provides a
handy Python API for creating networks of varying sizes and topologies.
Mininet is currently in *limited alpha release*. We encourage you to
experiment with it and hope that you will provide us with feedback on
features, documentation, and how you're using it. We plan to make it
available publicly via a GPL or BSD license (probably in April), but please
don't distribute the code or URLs yet! The feedback you provide will help
us improve Mininet for general release.
In order to run Mininet, you must have:
* A Linux
2.6.26 or greater
kernel compiled with network namespace support
* A Linux kernel compiled with network namespace support
enabled (see INSTALL for additional information.)
* An OpenFlow implementation (either the reference user or kernel
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
10
−
7
View file @
e04c207c
...
...
@@ -11,23 +11,26 @@
setup
(
name
=
distname
,
version
=
'
0
.0.0
'
,
version
=
'
2
.0.0
d1
'
,
description
=
'
Process-based OpenFlow emulator
'
,
author
=
'
Bob Lantz
'
,
author_email
=
'
rlantz@cs.stanford.edu
'
,
packages
=
find_packages
(
exclude
=
'
test
'
),
long_description
=
"""
Insert longer description here.
"""
,
Mininet is a network emulator which uses lightweight
virtualization to create virtual networks for rapid
prototyping of Software-Defined Network (SDN) designs
using OpenFlow. http://openflow.org/mininet
"""
,
classifiers
=
[
"
License :: OSI Approved ::
GNU General Public
License
(GPL)
"
,
"
License :: OSI Approved ::
BSD
License
"
,
"
Programming Language :: Python
"
,
"
Development Status ::
4
-
Bet
a
"
,
"
Development Status ::
2
-
Pre-Alph
a
"
,
"
Intended Audience :: Developers
"
,
"
Topic :: Internet
"
,
],
keywords
=
'
networking protocol Internet OpenFlow
'
,
license
=
'
unspecified
'
,
keywords
=
'
networking
emulator
protocol Internet OpenFlow
SDN
'
,
license
=
'
BSD
'
,
install_requires
=
[
'
setuptools
'
,
'
networkx
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment