mininet / README.md @ 96952b92
History | View | Annotate | Download (4.6 KB)
1 |
Mininet: Rapid Prototyping for Software Defined Networks |
---|---|
2 |
======================================================== |
3 |
|
4 |
*The best way to emulate almost any network on your laptop!* |
5 |
|
6 |
Version 2.1.0+ |
7 |
|
8 |
### What is Mininet? |
9 |
|
10 |
Mininet emulates a complete network of hosts, links, and switches |
11 |
on a single machine. To create a sample two-host, one-switch network, |
12 |
just run: |
13 |
|
14 |
`sudo mn` |
15 |
|
16 |
Mininet is useful for interactive development, testing, and demos, |
17 |
especially those using OpenFlow and SDN. OpenFlow-based network |
18 |
controllers prototyped in Mininet can usually be transferred to |
19 |
hardware with minimal changes for full line-rate execution. |
20 |
|
21 |
### How does it work? |
22 |
|
23 |
Mininet creates virtual networks using process-based virtualization |
24 |
and network namespaces - features that are available in recent Linux |
25 |
kernels. In Mininet, hosts are emulated as `bash` processes running in |
26 |
a network namespace, so any code that would normally run on a Linux |
27 |
server (like a web server or client program) should run just fine |
28 |
within a Mininet "Host". The Mininet "Host" will have its own private |
29 |
network interface and can only see its own processes. Switches in |
30 |
Mininet are software-based switches like Open vSwitch or the OpenFlow |
31 |
reference switch. Links are virtual ethernet pairs, which live in the |
32 |
Linux kernel and connect our emulated switches to emulated hosts |
33 |
(processes). |
34 |
|
35 |
### Features |
36 |
|
37 |
Mininet includes: |
38 |
|
39 |
* A command-line launcher (`mn`) to instantiate networks. |
40 |
|
41 |
* A handy Python API for creating networks of varying sizes and |
42 |
topologies. |
43 |
|
44 |
* Examples (in the `examples/` directory) to help you get started. |
45 |
|
46 |
* Full API documentation via Python `help()` docstrings, as well as |
47 |
the ability to generate PDF/HTML documentation with `make doc`. |
48 |
|
49 |
* Parametrized topologies (`Topo` subclasses) using the Mininet |
50 |
object. For example, a tree network may be created with the |
51 |
command: |
52 |
|
53 |
`mn --topo tree,depth=2,fanout=3` |
54 |
|
55 |
* A command-line interface (`CLI` class) which provides useful |
56 |
diagnostic commands (like `iperf` and `ping`), as well as the |
57 |
ability to run a command to a node. For example, |
58 |
|
59 |
`mininet> h11 ifconfig -a` |
60 |
|
61 |
tells host h11 to run the command `ifconfig -a` |
62 |
|
63 |
* A "cleanup" command to get rid of junk (interfaces, processes, files |
64 |
in /tmp, etc.) which might be left around by Mininet or Linux. Try |
65 |
this if things stop working! |
66 |
|
67 |
`mn -c` |
68 |
|
69 |
### New features in 2.1.0+ |
70 |
|
71 |
Mininet 2.1.0+ provides a number of bug fixes as well as |
72 |
several new features, including: |
73 |
|
74 |
* Convenient access to `Mininet()` as a dict of nodes |
75 |
* X11 tunneling (wireshark in Mininet hosts, finally!) |
76 |
* Accurate reflection of the `Mininet()` object in the CLI |
77 |
* Automatically detecting and adjusting resource limits |
78 |
* Automatic cleanup on failure of the `mn` command |
79 |
* Preliminary support for running OVS in user space mode |
80 |
* Preliminary support (`IVSSwitch()`) for the Indigo Virtual Switch |
81 |
* support for installing the OpenFlow 1.3 versions of the reference |
82 |
user switch and NOX from CPqD |
83 |
* The ability to import modules from `mininet.examples` |
84 |
|
85 |
We have provided several new examples (which can easily be |
86 |
imported to provide useful functionality) including: |
87 |
|
88 |
* Modeling separate control and data networks: `mininet.examples.controlnet` |
89 |
* Connecting Mininet hosts the internet (or a LAN) using NAT: `mininet.examples.nat` |
90 |
* Creating per-host custom directories using bind mounts: `mininet.examples.bind` |
91 |
|
92 |
Note that examples contain experimental features which might |
93 |
"graduate" into mainline Mininet in the future, but they should |
94 |
not be considered a stable part of the Mininet API! |
95 |
|
96 |
### Installation |
97 |
|
98 |
See `INSTALL` for installation instructions and details. |
99 |
|
100 |
### Documentation |
101 |
|
102 |
In addition to the API documentation (`make doc`), much useful |
103 |
information, including a Mininet walkthrough and an introduction |
104 |
to the Python API, is available on the |
105 |
[Mininet Web Site](http://mininet.org). |
106 |
There is also a wiki which you are encouraged to read and to |
107 |
contribute to, particularly the Frequently Asked Questions (FAQ.) |
108 |
|
109 |
### Support |
110 |
|
111 |
Mininet is community-supported. We encourage you to join the |
112 |
Mininet mailing list, `mininet-discuss` at: |
113 |
|
114 |
<https://mailman.stanford.edu/mailman/listinfo/mininet-discuss> |
115 |
|
116 |
### Contributing |
117 |
|
118 |
Mininet is an open source project and is currently hosted |
119 |
at <https://github.com/mininet>. You are encouraged to download |
120 |
the code, examine it, modify it, and submit bug reports, bug fixes, |
121 |
feature requests, new features and other issues and pull requests. |
122 |
Thanks to everyone who has contributed to the project |
123 |
(see CONTRIBUTORS for more info!) |
124 |
|
125 |
Best wishes, and we look forward to seeing what you can do with |
126 |
Mininet to change the networking world! |
127 |
|
128 |
### Credits |
129 |
|
130 |
The Mininet 2.1.0+ Team: |
131 |
|
132 |
* Bob Lantz |
133 |
* Brian O'Connor |