Update and rename MantenerFIFO to MantenerFIFO.md
[vsorcdistro/.git] / mininet / examples / README.md
1 Mininet Examples
2 ========================================================
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 #### bind.py:
15
16 This example shows how you can create private directories for each
17 node in a Mininet topology.
18
19 #### cluster.py:
20
21 This example contains all of the code for experimental cluster
22 edition. Remote classes and MininetCluster can be imported from
23 here to create a topology with nodes on remote machines.
24
25 #### clusterSanity.py:
26
27 This example runs cluster edition locally as a sanity check to test
28 basic functionality.
29
30 #### clustercli.py:
31
32 This example contains a CLI for experimental cluster edition.
33
34 #### clusterdemo.py:
35
36 This example is a basic demo of cluster edition on 3 servers with
37 a tree topology of depth 3 and fanout 3.
38
39 #### consoles.py:
40
41 This example creates a grid of console windows, one for each node,
42 and allows interaction with and monitoring of each console, including
43 graphical monitoring.
44
45 #### controllers.py:
46
47 This example creates a network with multiple controllers, by
48 using a custom `Switch()` subclass.
49
50 #### controllers2.py:
51
52 This example creates a network with multiple controllers by
53 creating an empty network, adding nodes to it, and manually
54 starting the switches.
55
56 #### controlnet.py:
57
58 This examples shows how you can model the control network as well
59 as the data network, by actually creating two Mininet objects.
60
61 #### cpu.py:
62
63 This example tests iperf bandwidth for varying CPU limits.
64
65 #### emptynet.py:
66
67 This example demonstrates creating an empty network (i.e. with no
68 topology object) and adding nodes to it.
69
70 #### hwintf.py:
71
72 This example shows how to add an interface (for example a real
73 hardware interface) to a network after the network is created.
74
75 #### intfoptions.py:
76
77 This example reconfigures a TCIntf during runtime with different
78 traffic control commands to test bandwidth, loss, and delay.
79
80 #### limit.py:
81
82 This example shows how to use link and CPU limits.
83
84 #### linearbandwidth.py:
85
86 This example shows how to create a custom topology programatically
87 by subclassing Topo, and how to run a series of tests on it.
88
89 #### linuxrouter.py:
90
91 This example shows how to create and configure a router in Mininet
92 that uses Linux IP forwarding.
93
94 #### miniedit.py:
95
96 This example demonstrates creating a network via a graphical editor.
97
98 #### mobility.py:
99
100 This example demonstrates detaching an interface from one switch and
101 attaching it another as a basic way to move a host around a network.
102
103 #### multiLink.py:
104
105 This example demonstrates the creation of multiple links between
106 nodes using a custom Topology class.
107
108 #### multiping.py:
109
110 This example demonstrates one method for
111 monitoring output from multiple hosts, using `node.monitor()`.
112
113 #### multipoll.py:
114
115 This example demonstrates monitoring output files from multiple hosts.
116
117 #### multitest.py:
118
119 This example creates a network and runs multiple tests on it.
120
121 #### nat.py:
122
123 This example shows how to connect a Mininet network to the Internet
124 using NAT. It also answers the eternal question "why can't I ping
125 `google.com`?"
126
127 #### natnet.py:
128
129 This example demonstrates how to create a network using a NAT node
130 to connect hosts to the internet.
131
132 #### numberedports.py:
133
134 This example verifies the mininet ofport numbers match up to the ovs port numbers.
135 It also verifies that the port numbers match up to the interface numbers
136
137 #### popen.py:
138
139 This example monitors a number of hosts using `host.popen()` and
140 `pmonitor()`.
141
142 #### popenpoll.py:
143
144 This example demonstrates monitoring output from multiple hosts using
145 the `node.popen()` interface (which returns `Popen` objects) and `pmonitor()`.
146
147 #### scratchnet.py, scratchnetuser.py:
148
149 These two examples demonstrate how to create a network by using the lowest-
150 level Mininet functions. Generally the higher-level API is easier to use,
151 but scratchnet shows what is going on behind the scenes.
152
153 #### simpleperf.py:
154
155 A simple example of configuring network and CPU bandwidth limits.
156
157 #### sshd.py:
158
159 This example shows how to run an `sshd` process in each host, allowing
160 you to log in via `ssh`. This requires connecting the Mininet data network
161 to an interface in the root namespace (generaly the control network
162 already lives in the root namespace, so it does not need to be explicitly
163 connected.)
164
165 #### tree1024.py:
166
167 This example attempts to create a 1024-host network, and then runs the
168 CLI on it. It may run into scalability limits, depending on available
169 memory and `sysctl` configuration (see `INSTALL`.)
170
171 #### treeping64.py:
172
173 This example creates a 64-host tree network, and attempts to check full
174 connectivity using `ping`, for different switch/datapath types.
175
176 #### vlanhost.py:
177
178 An example of how to subclass Host to use a VLAN on its primary interface.
179