Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 3.19 KB

Learn-More.mediawiki

File metadata and controls

63 lines (37 loc) · 3.19 KB

Table of Contents

OpenFlow

To learn more about OpenFlow in general, consult the http://www.openflowswitch.org. There are videos, blog entries, and more. Check the wiki for link to OpenFlow-based projects and demos.

Additional Tools

Old Regression Tests

Note: you will need to install additional stuff to get the old regression tests working. See the install instructions for your platform, referenced at the top of the http://openflow.org/wk

The OpenFlow reference distribution includes a set of tests to verify that an OpenFlow switch correctly sends and receives packets. In this section, you'll run through some of the "Black Box" tests, where the regression switch acts as a controller and verifies that a switch responds properly to OpenFlow messages, as well as properly forwards packets sent to the input ports of the switch. The Black Box regression tests use this layout:

images/Regression_tests.png


First, exit from the Mininet console:

 mininet> exit

To run the tests, log in as root, from the same SSH terminal:

 $ sudo su

Run a script to start up virtual ethernet pairs locally.

 # openflow/regress/bin/veth_setup.pl 

Veth0 connects to veth1, for example, and anytime a packet is sent to veth0, it'll pop out veth1, and vice versa. The regression suite will allocate four veth pair halves to a software OpenFlow switch and the other four to the test suite, which sends packets and checks the contents and locations of responses.

In an SSH terminal:

 # ifconfig -a

You should see 8 new virtual interfaces, veth0..veth7.

Configure Wireshark to show OpenFlow messages and TCP resets in red (which delimit individual tests). In the Wireshark filter box, enter:

 of || tcp.flags.reset == 1

Start running the tests, with Wireshark running on lo (loopback interface):

 # openflow/regress/bin/of_kmod_veth_test.pl

You may see OpenFlow messages for each test - if not, hit Ctrl-C to stop the tests, and clean up any leftover state:

 # openflow/regress/bin/of_kmod_veth_teardown.pl

Sometimes on the first run, the tests fail; we're not sure why this is happening. Restart after tearing down and they should work.

Then, re-run the tests:

 # openflow/regress/bin/of_kmod_veth_test.pl

When you get bored, stop the tests and check the messages. Then clean up any state:

 # openflow/regress/bin/of_kmod_veth_teardown.pl

The regression suite is useful for verifying new switch features, as well as diagnosis divergent behavior between different switches. The suite is generally used with 4 physical ports on hardware switches. We won't do anything more with it in this tutorial, but feel free to peruse the code. See the openflow/regress/projects/black_box directory, which has a file for each test.

To teardown virtual ethernet pairs, run:

 # openflow/regress/bin/veth_teardown.pl 

A replacement test suite is in the making, and is expected for mid 2010. The new suite will be based on Python and reorganized to make switch-specific tests and port configurations much easier to define and debug.

Exit back to regular username:

 # exit