OFTest OpenFlow Testing Framework


Introduction

OFTest is a Python based framework for OpenFlow switch testing.

In this project we use OFTest to ensure OpenFlow conformance of the switches used to implement the network infrastructure of the OpenCord project.

At this moment the switches supported are OF-DPA based Accton switches. For more information, check the wiki page at wiki.opencord.org/display/CORD/Underlay+Fabric

This code base was forked from macauleycheng which was forked from floodlight. This documentationn aims to describe the specific test cases developed for OpenCord. To get started on the basics of OFTest please check their documentation.


How it is organized

This codebase is organized by branches. Each OFDPA release correspond to a different branch. At this moment the following releases are available:

OFDPA versionBranchStatus
i19i19Archived
i12i12Archived
i12_1.7cord-1.0Released
2.0 GA2.0-gaArchived
3.0 EA4masterDeveloping <- current branch

The test case collection for OpenCord are under the folder ofdpa. They are listed under the section Test case collection.

Installing Prerequisites

Following packages need to be installed before running OFTest:

sudo apt-get install python python-pip python-dev python-lxml -y
sudo pip install ncclient
sudo pip install scapy pycrypto
sudo apt-get install python-ecdsa git

Start Testing

On the switch side (for OF-DPA version 3.0 EA4):

  1. Connect the switch to the VM running OFTest on the management network

    	launcher ofagentapp  -t <controller_ip>
    

On the controller side:

  1. Clone the source code and switch to the correct branch

    	git clone -b master git://github.com/opencord/fabric-oftest
    
  2. Run all test cases (that are not disabled) in a sequence

    	sudo ./oft -V1.3 --test-dir=ofdpa flows -i 24@eth1 -i 12@eth2
    

    This command assumes you connected the switch port 24 to interface eth1 on the OFtest server and port 12 to eth2. It runs all the tests that are in ofdpa/flows.py

Useful commands

  • List all available test cases

    	./oft -V1.3 --list --test-dir=ofdpa flows
    
  • Run only specific test case. Can also be used to run tests that are currently disabled.

    	sudo ./oft -V1.3 --test-dir=ofdpa flows.PacketInArp -i 24@eth1 -i 12@eth2
    
  • Run specific test case for a specific switch type (only special case of switch type supported are Qumran based switches)

    	sudo ./oft -V1.3 -Y qmx --test-dir=ofdpa flows.PacketInArp -i 24@eth1 -i 12@eth2
    

Test Result Summary

The following tests are implemented and these are their results.

Test Resultsi12_1.72.0 GA3.0 EA03.0 EA43.0 EA4 QMX
/0UcastXokokokX
/24UnicastTaggedokokokokX
/32UnicastTaggedokokokokX
/24ECMPL3okokokokX
/32ECMPL3okokokokX
/24ECMPVPN~okokokokX
/32ECMPVPN~okokokokX
/32VPN~okokokokX
/24VPN~okokokokX
EcmpGroupModXXokokX
PacketInArpokokokokok
MTU1500okokokokok
MplsTermination~okokokokX
MplsFwd~Xokokokok
L2FloodQinQokokokokX
L2UnicastTaggedokokokokok
L3McastToL3okXokokX
L3McastToL2_1*??okokX
L3McastToL2_2**??okokX
L3McastToL2_3***??okokX
L3McastToL2_4****ok?okokX
L3McastToL2_5*****??okokX
FloodGroupModXXokokX
PacketInUDPokokokokok
UnfilteredXokXokok
Untaggedokn/aokokok
PacketInIPTable~XXokokX
~       Tests marked with tilda are currently disabled because of a bug which causes
        interference with other tests. The @disabled flag will be removed once the bug is fixed.
*       Untag -> Untag (4094 as internal vlan)
**      Untag -> Tag
***     Tag   -> Untag
****    Tag   -> Tag
*****   Tag   -> Tag (Translated)

n/a means test is not available for that version of the pipeline.

VLAN Test Result Summary

The following tests are implemented in vlan_flows.py and these are their results.

Test Results3.0 EA03.0 EA4
L2ForwardingStackedVLANokok
L2ForwardingStackedVLAN2okok
L2ForwardingStackedVLAN3okok
L2ForwardingStackedVLAN4okok
L2ForwardingStackedVLAN5okok

For major details on the test look the comments in the code.

Pseudowire Test Result Summary

The following tests are implemented in pw_flows.py and these are their results.

Test Results3.0 EA03.0 EA4
UntaggedPWInitiation_2_Labelsokok
Untagged2PWInitiation_2_Labelsokok
UntaggedPWInitiation_3_Labelsokok
Untagged2PWInitiation_3_Labelsokok
TaggedPWInitiation_2_Labelsxok*
Tagged2PWInitiation_2_Labelsxok*
TaggedPWInitiation_3_Labelsxok*
Tagged2PWInitiation_3_Labelsxok*
DoubleTaggedPWInitiation_2_Labelsxok*
DoubleTagged2PWInitiation_2_Labelsxok*
DoubleTaggedPWInitiation_3_Labelsxok*
DoubleTagged2PWInitiation_3_Labelsxok*
IntraCO_2_Labelsokok*
IntraCO_3_Labelsokok*
InterCOokok*
UntaggedPWTerminationokok
Untagged2PWTerminationxx
TaggedPWTerminationokok
DoubleTaggedPWTerminationokok
BoSBugxx
  • The test may fail intermittently

For major details on the test look the comments in the code.

IPv6 Test Result Summary

The following tests are implemented in ipv6_flows.py and these are their results.

Test Results3.0 EA03.0 EA4
PacketInICMPv6okok
PacketInIPv6Tableokok
_128UcastUnTaggedokok
_128ECMPVpnokok
_128ECMPL3okok
_64UcastUntaggedokok
_64ECMPVpnokok
_64ECMPL3okok
_0UcastV6okok
_MPLSTerminationV6okok

For major details on the test look the comments in the code.