blob: dd71bea4fc90b4903f0110a7054a5584c6e8caeb [file] [log] [blame]
carlosmscabralf40ecd12013-02-01 18:15:58 -02001
2Mininet Examples
3
4These examples are intended to help you get started using
5Mininet's Python API.
6
7---
8
9baresshd.py:
10
11This example uses Mininet's medium-level API to create an sshd
12process running in a namespace. Doesn't use OpenFlow.
13
14consoles.py:
15
16This example creates a grid of console windows, one for each node,
17and allows interaction with and monitoring of each console, including
18graphical monitoring.
19
20controllers.py:
21
22This example creates a network and adds multiple controllers to it.
23
24cpu.py:
25
26This example tests iperf bandwidth for varying CPU limits.
27
28emptynet.py:
29
30This example demonstrates creating an empty network (i.e. with no
31topology object) and adding nodes to it.
32
33hwintf.py:
34
35This example shows how to add an interface (for example a real
36hardware interface) to a network after the network is created.
37
38limit.py:
39
40This example shows how to use link and CPU limits.
41
42linearbandwidth.py:
43
44This example shows how to create a custom topology programatically
45by subclassing Topo, and how to run a series of tests on it.
46
47miniedit.py:
48
49This example demonstrates creating a network via a graphical editor.
50
51multiping.py:
52
53This example demonstrates one method for
54monitoring output from multiple hosts, using node.monitor().
55
56multipoll.py:
57
58This example demonstrates monitoring output files from multiple hosts.
59
60multitest.py:
61
62This example creates a network and runs multiple tests on it.
63
64popen.py:
65
66This example monitors a number of hosts using host.popen() and
67pmonitor().
68
69popenpoll.py:
70
71This example demonstrates monitoring output from multiple hosts using
72the node.popen() interface (which returns Popen objects) and pmonitor().
73
74scratchnet.py, scratchnetuser.py:
75
76These two examples demonstrate how to create a network by using the lowest-
77level Mininet functions. Generally the higher-level API is easier to use,
78but scratchnet shows what is going on behind the scenes.
79
80simpleperf.py:
81
82A simple example of configuring network and CPU bandwidth limits.
83
84sshd.py:
85
86This example shows how to run an sshd process in each host, allowing
87you to log in via ssh. This requires connecting the Mininet data network
88to an interface in the root namespace (generaly the control network
89already lives in the root namespace, so it does not need to be explicitly
90connected.)
91
92treeping64.py:
93
94This example creates a 64-host tree network, and attempts to check full
95connectivity using ping, for different switch/datapath types.
96
97tree1024.py:
98
99This example attempts to create a 1024-host network, and then runs the
100CLI on it. It may run into scalability limits, depending on available
101memory and sysctl configuration (see INSTALL.)
102