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 Accton switches. For more information abot that check the wiki page at wiki.opencord.org

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 EA0masterDeveloping <- 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 pycripto
sudo apt-get install python-ecdsa git

Start Testing

On the switch side:

  1. Purge the switch flow/group table by running

    	client_cfg_purge
    
  2. Connect the switch to the testing controller

    	brcm-indigo-ofdpa-ofagent -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 in OFTest

    	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

Useful commands

  • List all available test cases

    	./oft --list --test-dir=ofdpa flows
    
  • Run only specific test case

    	sudo ./oft -V1.3 --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 EA0
/0UcastXokok
/24UnicastTaggedokokok
/32UnicastTaggedokokok
/24ECMPL3okokok
/32ECMPL3okokok
/24ECMPVPNokokok
/32ECMPVPNokokok
/32VPNokokok
/24VPNokokok
EcmpGroupModXXok
PacketInArpokokok
MTU1500okokok
MplsTerminationokokok
MplsFwdXokok
L2FloodQinQokokok
L2UnicastTaggedokokok
L3McastToL3okXok
L3McastToL2_1*??ok
L3McastToL2_2**??ok
L3McastToL2_3***??ok
L3McastToL2_4****ok?ok
L3McastToL2_5*****??ok
FloodGroupModXXok
PacketInUDPokokok
UnfilteredXokX
Untaggedokn/aok
  •   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 EA0
L2ForwardingStackedVLAN1ok
L2ForwardingStackedVLAN2ok
L2ForwardingStackedVLAN3ok
L2ForwardingStackedVLAN4ok
L2ForwardingStackedVLAN5ok

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 EA0
UntaggedPWInitiation_2_Labelsok
Untagged2PWInitiation_2_Labelsok
UntaggedPWInitiation_3_Labelsok
Untagged2PWInitiation_3_Labelsok
TaggedPWInitiation_2_Labels?
Tagged2PWInitiation_2_Labels?
TaggedPWInitiation_3_Labels?
Tagged2PWInitiation_3_Labels?
DoubleTaggedPWInitiation_2_Labels?
DoubleTagged2PWInitiation_2_Labels?
DoubleTaggedPWInitiation_3_Labels?
DoubleTagged2PWInitiation_3_Labels?
IntraCO_2_Labelsok
IntraCO_3_Labelsok
InterCOok
UntaggedPWTerminationok
Untagged2PWTermination?
TaggedPWTerminationok
DoubleTaggedPWTerminationok

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 EA0
PacketInICMPv6ok
PacketInIPv6Tableok
_128UcastUnTaggedok
_128ECMPVpnok
_128ECMPL3ok
_64UcastUnTaggedok
_64ECMPVpnok
_64ECMPL3ok
_0UcastV6ok
_MPLSTerminationV6ok

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