commit | fe52550a5b80ac31de21c6bfa3e58d892659f7e8 | [log] [tgz] |
---|---|---|
author | Zsolt Haraszti <zharaszt@ciena.com> | Wed Mar 02 05:18:52 2016 +0000 |
committer | Ali Al-Shabibi <ali@onlab.us> | Wed Mar 02 05:36:55 2016 +0000 |
tree | 1190c83f76fc686d2a4c7150e672c696c231028f | |
parent | 533955996b72ece7a305f9276762e47f8f1da52d [diff] |
Improve support for CPqD and parameterize tests Changes: - Made device_type a test_params so it can be controller from the command line and can be used to switch between device-specific behavior. The current device types are: pmc: To work with the PMC OLT. On this device when the inner VLAN tag is popped, the device actually emits a frame with VLAN tag 0 and PCP 0. Or, put it another way, the way to emit a frame with a zero VLAN tag and zero PCP is to pop the vlan header. Weird. cpqd: User-space switch which cannot receive zero-tagged vlans due to kernel limitations. On this device when a frame arrives with a VLAN tag 0 and PCP 0, the kernel removes the VLAN header before the frame is passed to the user-space switch. Wireshark/tcpdump still shows the header, but not the app. This is addressed in the tests with not expecting a VLAN header in such cases. normal: This is intended for "per-the-books" openflow switches that do exactly what the flow rules say - Adjusted some of the test-cases to support the 3 device types - IGMP packet generator using scapy. This is still work in progress, but this is a fairly accurate IGMP pkt generator using scapy. The membership query is considered complete, but the fields for the memberhip reports still need to be added. There is a simple self-test at the end of the lib which can be executed by just running 'python IGMP.py' - Added verbage to README.md how to run on CPqD - Added command line option -u to olt-topo to bring up mininet with user-space reference switch CPqD - Fixed mixed tab/space use in olt.py Conflicts: olt.py Change-Id: I23553c228c20614c5e97e097fad4c578817d62c3
OFTest suite for PMC OLT
Small suite of tests that describe the behaviour needed from the OLT for CORD.
This is based on the OFTest framework. See here for details on OFTest, including prerequisites and steps to set up: https://github.com/floodlight/oftest
Firstly make sure the prerequisites for OFTest are installed - Python and Scapy.
Clone both the OFTest repository and this repository side-by-side. You can find oftest at https://github.com/floodlight/oftest.
You'll need to connect the OLT port and one of the ONU ports connected to interfaces on the server - for example, ONU port 1 to eth1 on the server, and OLT port 129 to eth2 on the server.
Then you can run the tests as follows:
sudo oftest/oft --test-dir=olt-oftest/ -i 1@eth1 -i 129@eth2 --port 6633 -V 1.3
Most forwarding tests use 1 ONU port, and some multicast tests use 2 ONU ports. By default the tests use ONU ports 1 and 2, and OLT port 129. If you need to change the port numbers used by the tests, you can set them using test-params.
For example, to use the ONU ports 130 and 131, and OLT port 258, the following command can be used:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 130@h1-eth0 -i 131@h2-eth0 -i 258@h129-eth0 --port 6633 -V 1.3 --test-params="onu_port=130;onu_port2=131;olt_port:258;"
The port numbers must be set correctly in the -i arguments which are local interface connected to hardware ports, and in the --test-params argument.
We've also provided a Mininet topology that runs an OVS instance with port 1 and port 129 so we can run the tests and verify the correct behaviour without using the OLT. The OVS switch stands in for the OLT in the test framework.
First install Mininet and its dependencies.
Then start the switch:
sudo olt-oftest/olt-topo.py
Now you can run the tests on the OVS switch using:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 1@h1-eth0 -i 129@h129-eth0 --port 6633 -V 1.3
The above script can be used to start a mininet topology using the CPqD reference soft switch. CPqD can be installed with the Mininet installer using the following mode of the install script:
git clone git://github.com/mininet/mininet ./mininet/utils/install.sh -n3fxw
For further information on how to install CPqD, please refer to, e.g., https://github.com/CPqD/ofsoftswitch13/wiki/OpenFlow-1.3-Tutorial
Once CPqD and mininet are installed, start the topology using:
sudo ./olt-oftest/olt-topo.py -u
Now you can run the tests on the switch using:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 1@h1-eth0 -i 2@h2-eth0 -i 3@h129-eth0 --port 6633 -V 1.3 \ -t "onu_port=1;onu_port2=2;olt_port=3;device_type='cpqd'"
Please note that as of this writing, the following tests known to fail:
olt.TestGroupForwarding ... FAIL olt.TestGroupModForwarding ... FAIL olt.TestMeter ... FAIL olt.TestCyclingDoubleVlan ... FAIL