Working a bit on text files. Removed netns.
This commit is contained in:
@@ -10,12 +10,12 @@ Preliminary Mininet Installation/Configuration Notes
|
|||||||
This places the mininet package in /usr/lib/python-2.5/site-packages/,
|
This places the mininet package in /usr/lib/python-2.5/site-packages/,
|
||||||
so that 'import mininet' will work.
|
so that 'import mininet' will work.
|
||||||
|
|
||||||
- Installation is simplest with a distribution that includes a kernel
|
- Mininet requires a kernel built with support for the CLONE_NETNS unshare
|
||||||
which supports the CLONE_NETNS unshare flag by default. Debian 5.0+ does
|
flag by default.
|
||||||
(e.g. current debian-testing release); Ubuntu doesn't. If your kernel
|
|
||||||
doesn't support it, you will need to build and install a kernel that
|
If your kernel doesn't support it, you will need to build and install a
|
||||||
does! If you are using OpenVSwitch, 2.6.33 works best. For the reference
|
kernel that does! If you are using Open vSwitch, 2.6.33 works best. For
|
||||||
kernel switch, 2.6.30 is compatible.
|
the reference kernel switch, 2.6.30 should be compatible.
|
||||||
|
|
||||||
- Mininet should probably be run either on a machine with
|
- Mininet should probably be run either on a machine with
|
||||||
no other important processes, or on a virtual machine.
|
no other important processes, or on a virtual machine.
|
||||||
@@ -62,5 +62,3 @@ Preliminary Mininet Installation/Configuration Notes
|
|||||||
sudo sysctl -p
|
sudo sysctl -p
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
aka
|
aka
|
||||||
How to Squeeze a 1024-node OpenFlow Network onto your Laptop
|
How to Squeeze a 1024-node OpenFlow Network onto your Laptop
|
||||||
|
|
||||||
(Extremely Experimental Development Version 0.1, December 2009)
|
Development Release, March 2010
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -15,52 +15,51 @@ datapath) are created as processes in separate network namespaces. This
|
|||||||
allows a complete OpenFlow network to be simulated on top of a single
|
allows a complete OpenFlow network to be simulated on top of a single
|
||||||
Linux kernel.
|
Linux kernel.
|
||||||
|
|
||||||
Mininet provides a set of Python classes and functions which enable
|
Although Mininet may be invoked directly from the command line, it also
|
||||||
creation of OpenFlow networks of varying sizes and topologies.
|
incorporates a handy Python API, in the form of classes and functions
|
||||||
|
which enable creation of OpenFlow networks of varying sizes and topologies.
|
||||||
|
|
||||||
In order to run Mininet, you must have:
|
In order to run Mininet, you must have:
|
||||||
|
|
||||||
* A Linux 2.6.26 or greater kernel compiled with network namespace support
|
* A Linux 2.6.26 or greater kernel compiled with network namespace support
|
||||||
enabled. (debian-testing seems to have such a kernel, but it doesn't
|
enabled (see INSTALL for additional information.)
|
||||||
work for compiling nox, unfortunately.) 2.6.33 or greater is recommended
|
|
||||||
for faster switch shutdown.
|
|
||||||
|
|
||||||
* The OpenFlow reference implementation (either the user or kernel
|
* An OpenFlow implementation (either the reference user or kernel
|
||||||
datapath may be used, and the tun or ofdatapath kernel modules must be
|
space implementations, or Open vSwitch.) Appropriate kernel modules
|
||||||
loaded, respectively)
|
(e.g. tun and ofdatapath for the reference kernel implementation) must
|
||||||
|
be loaded.
|
||||||
|
|
||||||
* Python, bash, ping, iperf, etc.
|
* Python, bash, ping, iperf, etc.
|
||||||
|
|
||||||
* Root privileges (required for network device access)
|
* Root privileges (required for network device access)
|
||||||
|
|
||||||
* The netns program (included as netns.c), or an equivalent program
|
|
||||||
of the same name, installed in an appropriate path location
|
|
||||||
|
|
||||||
* mininet.py installed in an appropriate Python path location
|
|
||||||
|
|
||||||
Currently mininet includes:
|
Currently mininet includes:
|
||||||
|
|
||||||
- A simple node infrastructure (Host, Switch, Controller classes) for
|
- A simple node infrastructure (Host, Switch, Controller classes) for
|
||||||
creating virtual OpenFlow networks
|
creating virtual OpenFlow networks
|
||||||
|
|
||||||
- A simple network infrastructure (class Network and its descendants
|
- A simple network infrastructure (Mininet class) supporting parametrized
|
||||||
TreeNet, GridNet and LinearNet) for creating scalable topologies and
|
topologies (Topo subclasses.) For example, a tree network may be created
|
||||||
running experiments (e.g. TreeNet(2,3).run(pingTest) )
|
with the command
|
||||||
|
|
||||||
- Some simple tests which can be run using someNetwork.run( test )
|
# mn --topo tree,depth=2,fanout==3
|
||||||
|
|
||||||
- A simple command-line interface which may be invoked on a network using
|
- Basic tests, including connectivity (ping) and bandwidth (iperf)
|
||||||
.run( Cli ). It provides useful diagnostic commands, as well as the
|
|
||||||
ability to send a command to a node. For example,
|
- A command-line interface (CLI class) which provides useful
|
||||||
|
diagnostic commands, as well as the ability to send a command to a
|
||||||
|
node. For example,
|
||||||
|
|
||||||
mininet> h11 ifconfig -a
|
mininet> h11 ifconfig -a
|
||||||
|
|
||||||
tells host h11 to run the command 'ifconfig -a'
|
tells host h11 to run the command 'ifconfig -a'
|
||||||
|
|
||||||
- A 'cleanup' script to get rid of junk (interfaces, processes, files in
|
- A 'cleanup' command to get rid of junk (interfaces, processes, files in
|
||||||
/tmp, etc.) which might be left around by mininet. Try this if things
|
/tmp, etc.) which might be left around by mininet. Try this if things
|
||||||
stop working!
|
stop working!
|
||||||
|
|
||||||
|
# mn -c
|
||||||
|
|
||||||
- Examples (in examples/ directory) to help you get started.
|
- Examples (in examples/ directory) to help you get started.
|
||||||
|
|
||||||
Batteries are not included (yet!)
|
Batteries are not included (yet!)
|
||||||
@@ -71,5 +70,3 @@ file. Good luck!
|
|||||||
---
|
---
|
||||||
Bob Lantz
|
Bob Lantz
|
||||||
rlantz@cs.stanford.edu
|
rlantz@cs.stanford.edu
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
/* netns: run a command in a network namespace.
|
|
||||||
* Simplified from netunshare.c on lxc.sf.net
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
if (unshare(CLONE_NEWNET) == -1) {
|
|
||||||
perror("unshare");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argc) {
|
|
||||||
execve(argv[1], &argv[1], __environ);
|
|
||||||
perror("execve");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user