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