Skip to content

Commit 735344b

Browse files
committed
First commit updating Mininet to version 2.3.0r1. Also updating install script
1 parent da9aae8 commit 735344b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+9763
-709
lines changed

INSTALL_mininet

+72-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Mininet Installation/Configuration Notes
33
----------------------------------------
44

5-
Mininet 2.0.0
5+
Mininet 2.3.0d1
66
---
77

88
The supported installation methods for Mininet are 1) using a
@@ -15,7 +15,7 @@ like to contribute an installation script, we would welcome it!)
1515
1. Easiest "installation" - use our pre-built VM image!
1616

1717
The easiest way to get Mininet running is to start with one of our
18-
pre-built virtual machine images from <http://openflow.org/mininet>
18+
pre-built virtual machine images from <http://mininet.org/>
1919

2020
Boot up the VM image, log in, and follow the instructions on the
2121
Mininet web site.
@@ -42,29 +42,46 @@ like to contribute an installation script, we would welcome it!)
4242
sudo rm /usr/local/bin/ovs*
4343
sudo rm /usr/local/sbin/ovs*
4444

45-
3. Native installation from source on Ubuntu 11.10+
45+
3. Native installation from source
46+
47+
3.1. Native installation from source on Ubuntu 12.04+
4648

4749
If you're reading this, you've probably already done so, but the
4850
command to download the Mininet source code is:
4951

5052
git clone git://github.com/mininet/mininet.git
5153

52-
If you are running Ubuntu, you may be able to use our handy
53-
`install.sh` script, which is in `mininet/util`.
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, you can look at the release tags using
57+
58+
cd mininet
59+
git tag
60+
61+
and then
62+
63+
git checkout <release tag>
64+
65+
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+
our handy `install.sh` script, which is in `util/`.
5469

5570
*WARNING: USE AT YOUR OWN RISK!*
5671

5772
`install.sh` is a bit intrusive and may possibly damage your OS
5873
and/or home directory, by creating/modifying several directories
59-
such as `mininet`, `openflow`, `oftest`, `pox`, or `noxcosre`.
74+
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+
6077
Although we hope it won't do anything completely terrible, you may
6178
want to look at the script before you run it, and you should make
6279
sure your system and home directory are backed up just in case!
6380

6481
To install Mininet itself, the OpenFlow reference implementation, and
6582
Open vSwitch, you may use:
6683

67-
mininet/util/install.sh -fnv
84+
util/install.sh -fnv
6885

6986
This should be reasonably quick, and the following command should
7087
work after the installation:
@@ -73,14 +90,55 @@ like to contribute an installation script, we would welcome it!)
7390

7491
To install ALL of the software which we use for OpenFlow tutorials,
7592
including POX, the OpenFlow WireShark dissector, the `oftest`
76-
framework, and other potentially useful software (and to add some
77-
stuff to `/etc/sysctl.conf` which may or may not be useful) you may
78-
use:
93+
framework, and other potentially useful software, you may use:
7994

80-
mininet/util/install.sh -a
95+
util/install.sh -a
8196

8297
This takes about 4 minutes on our test system.
8398

99+
You can change the directory where the dependencies are installed using
100+
the -s <directory> flag.
101+
102+
util/install.sh -s <directory> -a
103+
104+
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+
util/install.sh -fnv
132+
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+
84142
4. Creating your own Mininet/OpenFlow tutorial VM
85143

86144
Creating your own Ubuntu Mininet VM for use with the OpenFlow tutorial
@@ -103,12 +161,10 @@ like to contribute an installation script, we would welcome it!)
103161

104162
* A Linux kernel compiled with network namespace support enabled
105163

106-
* An OpenFlow implementation (either the reference user or kernel
107-
space implementations, or Open vSwitch.) Appropriate kernel
108-
modules (e.g. tun and ofdatapath for the reference kernel
109-
implementation) must be loaded.
164+
* An compatible software switch such as Open vSwitch or
165+
the Linux bridge.
110166

111-
* Python, `bash`, `ping`, `iperf`, etc.`
167+
* Python, `bash`, `ping`, `iperf`, etc.
112168

113169
* Root privileges (required for network device access)
114170

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Mininet 2.0.0 License
1+
Mininet 2.3.0d1 License
22

3-
Copyright (c) 2012 Open Networking Laboratory
3+
Copyright (c) 2013-2016 Open Networking Laboratory
44
Copyright (c) 2009-2012 Bob Lantz and The Board of Trustees of
55
The Leland Stanford Junior University
66

Makefile

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
MININET = mininet/*.py
22
TEST = mininet/test/*.py
3-
EXAMPLES = examples/*.py
3+
EXAMPLES = mininet/examples/*.py
44
MN = bin/mn
5-
SOURCES = sources/*.py
5+
PYMN = python -B bin/mn
66
BIN = $(MN)
7-
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN) $(SOURCES)
7+
PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
88
MNEXEC = mnexec
99
MANPAGES = mn.1 mnexec.1
10-
P8IGN = E251,E201,E302,E202
10+
P8IGN = E251,E201,E302,E202,E126,E127,E203,E226
1111
BINDIR = /usr/bin
1212
MANDIR = /usr/share/man/man1
1313
DOCDIRS = doc/html doc/latex
1414
PDF = doc/latex/refman.pdf
1515

16+
CFLAGS += -Wall -Wextra
17+
1618
all: codecheck test
1719

1820
clean:
@@ -23,7 +25,8 @@ codecheck: $(PYSRC)
2325
util/versioncheck.py
2426
pyflakes $(PYSRC)
2527
pylint --rcfile=.pylint $(PYSRC)
26-
pep8 --repeat --ignore=$(P8IGN) $(PYSRC)
28+
# Exclude miniedit from pep8 checking for now
29+
pep8 --repeat --ignore=$(P8IGN) `ls $(PYSRC) | grep -v miniedit.py`
2730

2831
errcheck: $(PYSRC)
2932
-echo "Running check for errors only"
@@ -35,14 +38,21 @@ test: $(MININET) $(TEST)
3538
mininet/test/test_nets.py
3639
mininet/test/test_hifi.py
3740

41+
slowtest: $(MININET)
42+
-echo "Running slower tests (walkthrough, examples)"
43+
mininet/test/test_walkthrough.py -v
44+
mininet/examples/test/runner.py -v
45+
3846
mnexec: mnexec.c $(MN) mininet/net.py
39-
cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(MN) --version`\" $< -o $@
47+
cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@
4048

41-
install:
49+
install: $(MNEXEC) $(MANPAGES)
50+
install $(MNEXEC) $(BINDIR)
51+
install $(MANPAGES) $(MANDIR)
4252
python setup.py install
4353

4454
develop: $(MNEXEC) $(MANPAGES)
45-
# Perhaps we should link these as well
55+
# Perhaps we should link these as well
4656
install $(MNEXEC) $(BINDIR)
4757
install $(MANPAGES) $(MANDIR)
4858
python setup.py develop
@@ -51,11 +61,11 @@ man: $(MANPAGES)
5161

5262
mn.1: $(MN)
5363
PYTHONPATH=. help2man -N -n "create a Mininet network." \
54-
--no-discard-stderr $< -o $@
64+
--no-discard-stderr "$(PYMN)" -o $@
5565

5666
mnexec.1: mnexec
5767
help2man -N -n "execution utility for Mininet." \
58-
-h "-h" -v "-v" --no-discard-stderr ./$< -o $@
68+
-h "-h" -v "-v" --no-discard-stderr ./$< -o $@
5969

6070
.PHONY: doc
6171

README_mininet.md

+31-36
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
Mininet: Rapid Prototyping for Software Defined Networks
32
========================================================
43

54
*The best way to emulate almost any network on your laptop!*
65

7-
Version 2.0.0
6+
Mininet 2.3.0d1
87

98
### What is Mininet?
109

@@ -67,32 +66,27 @@ Mininet includes:
6766

6867
`mn -c`
6968

70-
### New features in 2.0.0
71-
72-
Mininet 2.0.0 is a major upgrade and provides
73-
a number of enhancements and new features, including:
74-
75-
* "Mininet-HiFi" functionality:
76-
77-
* Link bandwidth limits using `tc` (`TCIntf` and `TCLink` classes)
78-
79-
* CPU isolation and bandwidth limits (`CPULimitedHost` class)
69+
### New features in this release
8070

81-
* Support for Open vSwitch 1.4+ (including Ubuntu OVS packages)
71+
This is primarily a performance improvement and bug fix release.
8272

83-
* Debian packaging (and `apt-get install mininet` in Ubuntu 12.10)
73+
- Batch startup has been implemented for Open vSwitch, improving
74+
startup performance.
8475

85-
* First-class Interface (`Intf`) and Link (`Link`) classes for easier
86-
extensibility
76+
- OVS patch links have been implemented via OVSLink and --link ovs
8777

88-
* An upgraded Topology (`Topo`) class which supports node and link
89-
customization
78+
Warning! These links have *serious limitations* compared to
79+
virtual Ethernet pairs: they are not attached to real Linux
80+
interfaces so you cannot use tcpdump or wireshark with them;
81+
they also cannot be used in long chains - we don't recommend more
82+
than 64 OVSLinks, for example --linear,64. However, they can offer
83+
significantly better performance than veth pairs, for certain
84+
configurations.
9085

91-
* Man pages for the `mn` and `mnexec` utilities.
86+
- You can now easily install Mininet on a Raspberry Pi ;-)
9287

93-
[Since the API (most notably the topology) has changed, existing code
94-
that runs in Mininet 1.0 will need to be changed to run with Mininet
95-
2.0. This is the primary reason for the major version number change.]
88+
- Additional information for this release and previous releases
89+
may be found in the release notes on docs.mininet.org
9690

9791
### Installation
9892

@@ -103,7 +97,7 @@ See `INSTALL` for installation instructions and details.
10397
In addition to the API documentation (`make doc`), much useful
10498
information, including a Mininet walkthrough and an introduction
10599
to the Python API, is available on the
106-
[Mininet Web Site](http://openflow.org/mininet).
100+
[Mininet Web Site](http://mininet.org).
107101
There is also a wiki which you are encouraged to read and to
108102
contribute to, particularly the Frequently Asked Questions (FAQ.)
109103

@@ -114,21 +108,22 @@ Mininet mailing list, `mininet-discuss` at:
114108

115109
<https://mailman.stanford.edu/mailman/listinfo/mininet-discuss>
116110

117-
### Contributing
111+
### Join Us
118112

119-
Mininet is an open-source project and is currently hosted at
120-
<https://github.com/mininet>. You are encouraged to download the code,
121-
examine it, modify it, and submit bug reports, bug fixes, feature
122-
requests, and enhancements!
113+
Thanks again to all of the Mininet contributors!
123114

124-
Best wishes, and we look forward to seeing what you can do with
125-
Mininet to change the networking world!
115+
Mininet is an open source project and is currently hosted
116+
at <https://github.com/mininet>. You are encouraged to download
117+
the code, examine it, modify it, and submit bug reports, bug fixes,
118+
feature requests, new features and other issues and pull requests.
119+
Thanks to everyone who has contributed code to the Mininet project
120+
(see CONTRIBUTORS for more info!) It is because of everyone's
121+
hard work that Mininet continues to grow and improve.
126122

127-
### Credits
123+
### Enjoy Mininet
128124

129-
The Mininet Team:
125+
Best wishes, and we look forward to seeing what you can do with
126+
Mininet to change the networking world!
130127

131-
* Bob Lantz
132-
* Brandon Heller
133-
* Nikhil Handigol
134-
* Vimal Jeyakumar
128+
Bob Lantz
129+
Mininet Core Team

bin/miniccnxedit

+7-6
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ from sources.miniccnx import CCNTopo, execute
5656

5757
print 'MiniCCNxEdit running...' #+VERSION
5858
MININET_VERSION = re.sub(r'[^\d\.]', '', VERSION)
59-
if StrictVersion(MININET_VERSION) > StrictVersion('2.0'):
60-
from mininet.node import IVSSwitch
59+
#if StrictVersion(MININET_VERSION) > StrictVersion('2.0'):
60+
# from mininet.node import IVSSwitch
6161

6262
TOPODEF = 'none'
6363
TOPOS = { 'minimal': lambda: SingleSwitchTopo( k=2 ),
@@ -3135,13 +3135,14 @@ class MiniEdit( Frame ):
31353135
self.selection not in self.itemToWidget ):
31363136
return
31373137
name = self.itemToWidget[ self.selection ][ 'text' ]
3138+
#pdb.set_trace()
31383139
if name not in self.net.nameToNode:
31393140
return
31403141
term = makeTerm( self.net.nameToNode[ name ], 'Host', term=self.appPrefs['terminalType'] )
3141-
if StrictVersion(MININET_VERSION) > StrictVersion('2.0'):
3142-
self.net.terms += term
3143-
else:
3144-
self.net.terms.append(term)
3142+
#if StrictVersion(MININET_VERSION) > StrictVersion('2.0'):
3143+
#self.net.terms += term
3144+
#else:
3145+
self.net.terms.append(term)
31453146

31463147
def iperf( self, _ignore=None ):
31473148
"Make an xterm when a button is pressed."

0 commit comments

Comments
 (0)