|
1 |
| -POX is a networking software platform written in Python |
| 1 | +# POX |
2 | 2 |
|
3 |
| -POX started life as an OpenFlow controller, but can now also function |
4 |
| -as an OpenFlow switch, and can be useful for writing networking software |
5 |
| -in general. |
| 3 | +POX is a networking software platform written in Python. |
6 | 4 |
|
7 |
| -POX officially requires Python 2.7 (though much of it will work fine |
8 |
| -fine with Python 2.6), and should run under Linux, Mac OS, and Windows. |
9 |
| -(And just about anywhere else -- we've run it on Android phones, |
10 |
| -under FreeBSD, Haiku, and elsewhere. All you need is Python!) |
11 |
| -You can place a pypy distribution alongside pox.py (in a directory |
12 |
| -named "pypy"), and POX will run with pypy (this can be a significant |
13 |
| -performance boost!). |
| 5 | +POX started life as an OpenFlow controller, but can now also function as an |
| 6 | +OpenFlow switch, and can be useful for writing networking software in |
| 7 | +general. It currently supports OpenFlow 1.0 and includes special support |
| 8 | +for the Open vSwitch/Nicira extensions. |
14 | 9 |
|
15 |
| -POX currently communicates with OpenFlow 1.0 switches and includes |
16 |
| -special support for the Open vSwitch/Nicira extensions. |
| 10 | +POX versions are named. Starting with POX "gar", POX officially requires |
| 11 | +Python 3. The last version with support for Python 2 was POX "fangtooth". |
| 12 | +POX should run under Linux, Mac OS, and Windows. (And just about anywhere |
| 13 | +else -- we've run it on Android phones, under FreeBSD, Haiku, and elsewhere. |
| 14 | +All you need is Python!) Some features are not available on all platforms. |
| 15 | +Linux is the most featureful. |
17 | 16 |
|
18 |
| -pox.py boots up POX. It takes a list of module names on the command line, |
19 |
| -locates the modules, calls their launch() function (if it exists), and |
| 17 | +This README contains some information to get you started, but is purposely |
| 18 | +brief. For more information, please see the full documentation. |
| 19 | + |
| 20 | + |
| 21 | +## Running POX |
| 22 | + |
| 23 | +`pox.py` boots up POX. It takes a list of component names on the command line, |
| 24 | +locates the components, calls their `launch()` function (if it exists), and |
20 | 25 | then transitions to the "up" state.
|
21 | 26 |
|
22 |
| -Modules are looked for everywhere that Python normally looks, plus the |
23 |
| -"pox" and "ext" directories. Thus, you can do the following: |
| 27 | +If you run `./pox.py`, it will attempt to find an appropriate Python 3 |
| 28 | +interpreter itself. In particular, if there is a copy of PyPy in the main |
| 29 | +POX directory, it will use that (for a potentially large performance boost!). |
| 30 | +Otherwise it will look for things called `python3` and fall back to `python`. |
| 31 | +You can also, of course, invoke the desired Python interpreter manually |
| 32 | +(e.g., `python3 pox.py`). |
| 33 | + |
| 34 | +The POX commandline optionally starts with POX's own options (see below). |
| 35 | +This is followed by the name of a POX component, which may be followed by |
| 36 | +options for that component. This may be followed by further components |
| 37 | +and their options. |
| 38 | + |
| 39 | + ./pox.py [pox-options...] [component] [component-options...] ... |
| 40 | + |
| 41 | +### POX Options |
| 42 | + |
| 43 | +While components' options are up to the component (see the component's |
| 44 | +documentation), as mentioned above, POX has some options of its own. |
| 45 | +Some useful ones are: |
| 46 | + |
| 47 | + | Option | Meaning | |
| 48 | + | ------------- | --------------------------------------------------------- | |
| 49 | + |`--verbose` | print stack traces for initialization exceptions | |
| 50 | + |`--no-openflow`| don't start the openflow module automatically | |
| 51 | + |
| 52 | + |
| 53 | +## Components |
| 54 | + |
| 55 | +POX components are basically Python modules with a few POX-specific |
| 56 | +conventions. They are looked for everywhere that Python normally looks, plus |
| 57 | +the `pox` and `ext` directories. Thus, you can do the following: |
24 | 58 |
|
25 | 59 | ./pox.py forwarding.l2_learning
|
26 | 60 |
|
27 |
| -You can pass options to the modules by specifying options after the module |
28 |
| -name. These are passed to the module's launch() funcion. For example, |
29 |
| -to set the address or port of the controller, invoke as follows: |
| 61 | +As mentioned above, you can pass options to the components by specifying |
| 62 | +options after the component name. These are passed to the corresponding |
| 63 | +module's `launch()` funcion. For example, if you want to run POX as an |
| 64 | +OpenFlow controller and control address or port it uses, you can pass those |
| 65 | +as options to the openflow._01 component: |
30 | 66 |
|
31 | 67 | ./pox.py openflow.of_01 --address=10.1.1.1 --port=6634
|
32 | 68 |
|
33 |
| -pox.py also supports a few command line options of its own which should |
34 |
| -be given first: |
35 |
| - --verbose print stack traces for initialization exceptions |
36 |
| - --no-openflow don't start the openflow module automatically |
| 69 | + |
| 70 | +## Further Documentation |
| 71 | + |
| 72 | +The full POX documentation is available on GitHub at |
| 73 | +https://noxrepo.github.io/pox-doc/html/ |
0 commit comments