Statistics
| Branch: | Tag: | Revision:

mininet / README.md @ 73da7204

History | View | Annotate | Download (4.68 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.0.0rc1
7

    
8
### What is Mininet?
9

    
10
Mininet emulates a complete network of hosts, links, and switches on a single
11
machine.  To create a sample two-host, one-switch network, just run:
12

    
13
    sudo mn
14

    
15
Mininet is useful for interactive development, testing, and demos, especially
16
those using OpenFlow and SDN.  OpenFlow-based network controllers prototyped in
17
Mininet can usually be transferred to hardware with minimal changes for full
18
line-rate execution.
19

    
20
### How does it work?
21

    
22
Mininet creates virtual networks using process-based virtualization and network
23
namespaces - features that are available in recent Linux kernels.  In Mininet,
24
hosts are emulated as bash processes running in a network namespace, so any
25
code that would normally run on a Linux server (like a web server or client
26
program) should run just fine within a Mininet "Host".  The Mininet "Host" will
27
have its own private network interface and can only see its own processes.
28
Switches in Mininet are software-based switches like Open vSwitch or the
29
OpenFlow reference switch.  Links are virtual ethernet pairs, which live in the
30
Linux kernel and connect our emulated switches to emulated hosts (processes).
31

    
32
### Features
33

    
34
Mininet includes:
35

    
36
* A command-line launcher ('mn') to instantiate networks.
37

    
38
* A handy Python API for creating networks of varying sizes and topologies.
39

    
40
* Examples (in the examples/ directory) to help you get started.
41

    
42
* Full API documentation via Python `help()` docstrings, as well as the ability
43
  to generate PDF/HTML documentation with "make doc."
44

    
45
* Parametrized topologies (`Topo` subclasses) using the Mininet object.  For
46
  example, a tree network may be created with the command:
47
  
48
    mn --topo tree,depth=2,fanout=3`
49

    
50
* A command-line interface (CLI class) which provides useful diagnostic
51
  commands (like iperf and ping), as well as the ability to run a command to a 
52
  node. For example,
53
  
54
    mininet> h11 ifconfig -a`
55
  
56
  tells host h11 to run the command `ifconfig -a`
57

    
58
* A 'cleanup' command to get rid of junk (interfaces, processes, files in
59
  /tmp, etc.) which might be left around by Mininet or Linux. Try this if 
60
  things stop working!
61
  
62
     mn -c
63

    
64
### New features in 2.0.0:
65

    
66
Mininet 2.0.0 is a major upgrade and provides
67
a number of enhancements and new features, including:
68

    
69
* Link bandwidth limits using `tc` (`TCIntf` and `TCLink` classes)
70

    
71
* CPU isolation and bandwidth limits (`CPULimitedHost` class)
72

    
73
* Support for the Open vSwitch 1.4+ (including Ubuntu OVS packages)
74

    
75
* Debian packaging (and apt-get install in Ubuntu 12.10)
76

    
77
* First-class Interface (`Intf`) and Link (`Link`) classes for easier extensibility
78

    
79
* An upgraded Topology (`Topo`) class which supports node and link
80
  customization
81

    
82
* Man pages for the `mn` and `mnexec` utilities.
83

    
84
[Since the API (most notably the topology) has changed, existing code that
85
runs in Mininet 1.0 will need to be changed to run with Mininet 2.0. This
86
is the primary reason for the major version number change.]
87

    
88
### Install
89

    
90
To install Mininet, the easiest approach is to start with an Ubuntu system like 12.04 and run util/vm/install.sh, which will install any needed dependencies.
91

    
92
In general, you must have:
93

    
94
* A Linux kernel compiled with network namespace support
95
  enabled (see `INSTALL` for additional information.)
96

    
97
* An OpenFlow implementation (either the reference user or kernel
98
  space implementations, or Open vSwitch.) Appropriate kernel modules
99
  (e.g. tun and ofdatapath for the reference kernel implementation) must
100
  be loaded.
101

    
102
* Python, `bash`, `ping`, `iperf`, etc.
103

    
104
* Root privileges (required for network device access)
105

    
106
Further installation instructions are available in INSTALL.
107

    
108
### Documentation
109

    
110
In addition to the API documentation (`make doc`) much useful information,
111
including a Mininet walkthrough and an introduction to the Python API is
112
available on the [Mininet Web Site](http://openflow.org/mininet). There is
113
also a wiki which you are encouraged to read and to contribute to,
114
particularly the Frequently Asked Questions (FAQ.)
115

    
116
### Support
117

    
118
Mininet community-supported. We encourage you to
119
join the Mininet mailing list, `mininet-discuss` at:
120

    
121
<https://mailman.stanford.edu/mailman/listinfo/mininet-discuss>
122

    
123
### Contributing
124

    
125
Mininet is an open-source project and is currently hosted at
126
<https://github.com/mininet>. You are encouraged to download the code,
127
examine it, modify it, and submit bug reports, bug fixes, feature
128
requests, and enhancements!
129

    
130
Best wishes, and we look forward to seeing what you can do with Mininet
131
to change the networking world!
132

    
133
### Credits
134

    
135
The Mininet Team:
136

    
137
* Bob Lantz
138
* Brandon Heller
139
* Nikhil Handigol
140
* Vimal Jeyakumar
141