Have questions? Stuck? Please check our FAQ for some common questions and answers.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

OpenFlow Conformance Test

The OF switch used to support the Fabric has to support a number of data-plane operations such as MPLS encapsulation and others described below.

In order to guarantee conformance of the switches, we decided to create a few use cases using the OFTEST framework.

The OFTEST code can be found at https://github.com/floodlight/oftest.

In this document we will describe how you can setup your own testbed as well as describe the test cases implemented.

OFTEST Overview


OFTEST framework consists of a testserver that connects to a target switch through an OpenFlow channel. The testserver also connects directly to the dataplane ports of the OFswitch. After programming the switch the testserver inserts packets in the dataplane and verify if the output is as expected.

We recommend using a server connected to a management network, a switch connected to the same management network, and then a minimum of 2 ports directly connected between the server and the switch. A few tests will fail if you have less than 3 ports.

To install OFTEST on ubuntu, type the following:

$ sudo apt-get install python 
$ sudo apt-get install python-pip -y
$ sudo apt-get install python-lxml
$ sudo pip install ncclient
$ sudo apt-get install python-ecdsa git
$ git clone https://github.com/castroflavio/oftest

Now let's configure the switch and point it to the testserver. Notice that we are pointing to port 6653 rather than 6633.

# cd /usr/bin/ofdpa-i.12.1.1/examples/
# ./client_cfg_purge
# brcm-indigo-ofdpa-ofagent -t 10.128.0.210:6653

Now, assuming that you plugged the ports 12 and 24 of the switch to interfaces eth1 and eth2 of the server, respectively, then the following command can tell you if everything is working.

$ cd oftest
$ sudo ./oft -V1.3 --test-dir=ofdpa flows.PacketInArp -i 12@eth1 -i 24@eth2
WARNING: No route found for IPv6 destination :: (no default route?)
flows.PacketInArp ... ok
----------------------------------------------------------------------
Ran 1 test in 4.044s
OK

Segment Routing Tests

 The following tests were implemented:

  1. Packet In Src Mac Miss
  2. Packet In UDP
  3. Arp and L2
  4. Packet In Arp
  5. L2FloodQinQ
  6. L2Flood Tagged 
  7. L2Flood Unknown Src 
  8. L2 Unicast Tagged 
  9. MTU 1500 
  10. MTU 4100
  11. L3 Unicast Tagged 
  12. L3VPNMPLS 
  13. L3 VPN_32 
  14. MPLS Termination
  15. MPLSBUG
  16. L3 Mcast To L2
  17. L3 Mcast To L3

The command below should give you the following result:

$ sudo ./oft -V1.3 --test-dir=ofdpa flows -i 12@eth1 -i 24@eth2
flows.ArpNL2 ... FAIL
flows.L2FloodQinQ ... ok
flows.L2FloodTagged ... ok
flows.L2FloodTaggedUnknownSrc ... ok
flows.L2UnicastTagged ... ok
flows.L3McastToL2 ... FAIL
flows.L3McastToL3 ... FAIL
flows.L3McastToVPN ... FAIL
flows.L3UcastTagged ... ok
flows.L3VPNMPLS ... ok
flows.L3VPN_32 ... FAIL
flows.MPLSBUG ... ok
flows.MplsTermination ... FAIL
flows.Mtu1500 ... ok
flows.Mtu4000 ... ERROR
flows.PacketInArp ... ok
flows.PacketInSrcMacMiss ... FAIL
flows.PacketInUDP ... ok

For example, in this case, all the multicast failed because we don't have three ports, the test L3VPN failed as well, and that is a bug of the current build. The PacketInSrcMac Miss failed because Mac learning is not enabled. 

Oftest can't successfully delete all groups using an OF message, because of that some tests interfere with others. If the results seem suspicious, erase the flowtables and group tables and run the test alone.

Latest results from OFTEST

At this date the most stable version of ofdpa is i12_1.7.  The following tests are passing.

 i12_1.7

flows._24EcmpVpn

ok
flows.PacketInUDPok
flows._24ECMPL3ok
flows._32EcmpVpnok
flows.L2UnicastTaggedok
flows.L3McastToL3ok
flows._32UcastTaggedok
flows.L3McastToL2ok
flows._MplsTerminationok
flows.PacketInArpok
flows._32ECMPL3ok
flows._32VPNok
flows.Mtu1500ok
flows._24VPNok
flows.L2FloodQinQok
flows._24UcastTaggedok

 

How to test a new switch

  • Install OFTEST
  • Run baseline test
  • Update OFDPA
  • Run the test again.

 

  • No labels