Statistics
| Branch: | Tag: | Revision:

mininet / examples / README @ 3484389d

History | View | Annotate | Download (2.91 KB)

1

    
2
Mininet Examples
3

    
4
These examples are intended to help you get started using
5
Mininet's Python API.
6

    
7
---
8

    
9
baresshd.py:
10

    
11
This example uses Mininet's medium-level API to create an sshd
12
process running in a namespace. Doesn't use OpenFlow.
13

    
14
consoles.py:
15

    
16
This example creates a grid of console windows, one for each node, 
17
and allows interaction with and monitoring of each console, including
18
graphical monitoring.
19

    
20
controllers.py:
21

    
22
This example creates a network with multiple controllers, by
23
using a custom Switch() subclass.
24

    
25
controllers2.py:
26

    
27
This example creates a network with multiple controllers by
28
creating an empty network, adding nodes to it, and manually
29
starting the switches.
30

    
31
cpu.py:
32

    
33
This example tests iperf bandwidth for varying CPU limits.
34

    
35
emptynet.py:
36

    
37
This example demonstrates creating an empty network (i.e. with no
38
topology object) and adding nodes to it.
39

    
40
hwintf.py:
41

    
42
This example shows how to add an interface (for example a real
43
hardware interface) to a network after the network is created.
44

    
45
limit.py:
46

    
47
This example shows how to use link and CPU limits.
48

    
49
linearbandwidth.py:
50

    
51
This example shows how to create a custom topology programatically
52
by subclassing Topo, and how to run a series of tests on it.
53

    
54
miniedit.py:
55

    
56
This example demonstrates creating a network via a graphical editor.
57

    
58
multiping.py:
59

    
60
This example demonstrates one method for 
61
monitoring output from multiple hosts, using node.monitor().
62

    
63
multipoll.py:
64

    
65
This example demonstrates monitoring output files from multiple hosts.
66

    
67
multitest.py:
68

    
69
This example creates a network and runs multiple tests on it.
70

    
71
nat.py:
72

    
73
This example shows how to connect a Mininet network to the Internet
74
using NAT. It also answers the eternal question "why can't I ping
75
google?"
76

    
77
popen.py:
78

    
79
This example monitors a number of hosts using host.popen() and
80
pmonitor().
81

    
82
popenpoll.py:
83

    
84
This example demonstrates monitoring output from multiple hosts using
85
the node.popen() interface (which returns Popen objects) and pmonitor().
86

    
87
scratchnet.py, scratchnetuser.py:
88

    
89
These two examples demonstrate how to create a network by using the lowest-
90
level Mininet functions. Generally the higher-level API is easier to use,
91
but scratchnet shows what is going on behind the scenes.
92

    
93
simpleperf.py:
94

    
95
A simple example of configuring network and CPU bandwidth limits.
96

    
97
sshd.py:
98

    
99
This example shows how to run an sshd process in each host, allowing
100
you to log in via ssh. This requires connecting the Mininet data network
101
to an interface in the root namespace (generaly the control network
102
already lives in the root namespace, so it does not need to be explicitly
103
connected.)
104

    
105
treeping64.py:
106

    
107
This example creates a 64-host tree network, and attempts to check full
108
connectivity using ping, for different switch/datapath types.
109

    
110
tree1024.py:
111

    
112
This example attempts to create a 1024-host network, and then runs the
113
CLI on it. It may run into scalability limits, depending on available
114
memory and sysctl configuration (see INSTALL.)
115