Configuring an OpenFlow POX SDN Controller and HP Switches
There is an updated post with the newest HP OpenFlow firmware that can be found at: Configure an HP OpenFlow Switch for Floodlight →
Configuring an OpenFlow POX SDN Controller and HP Switches: HP has been supporting OpenFlow v1.0 with general availability longer than anyone in the industry. While there are limitations, just as most vendors will have as we start exploring exposing and/or decoupling control planes. Installing the SDN / OpenFlow controller to attach to the HP switch is very simple using open source controllers like POX and FloodLight. Specific limitations revolve around attempting to modify multiple headers in the OFAction function. This is likely a TCAM width limitation.
POX is a Python based OpenFlow Controller developed by Murphy McCauley at UC Berkeley. POX is great for fast development proofing, along with being platform independent by virtue of being Python based. Mre information can be found here. I highly recommend it over NOX for learning and prototyping since Python is a more abstracted language unless you need to manage hardware resources for performance. Also the development seems to be more focused on POX. Murphy has a nice set of modules to load different features. He has some new ones in the pipe that will help with experimentation for people to get more comfortable with SDN. I really like it for terrible programmers like myself to have an interpreted option to tweak or add modules to.
Here is the algorithm for each new flow that POX follows using the L2 learning python module. This will have your switch operate similarly to your L2 forwarding switch today. Notice step 2. typically an LLDP will trigger a OFPT_PACKET_IN event which would punt the packet to the controller thus ignore if transparent.
- Use source address and port to update address/port table.
- Is destination address a Bridge Filtered address, or is Ethertpe LLDP? * This step is ignored if transparent = True * Yes: Drop packet to avoid forwarding link-local traffic (LLDP, 802.1x) DONE
- Is destination multicast? if Yes:Flood the packet DONE
- Port for destination address in our address/port table? No: Flood the packet DONE
- Is output port the same as input port? Yes: Drop packet and similar ones for a while
- Install flow table entry in the switch so that this
- flow goes out the appopriate port
- Send buffered packet out appropriate port
Figure 1. The Layer2 access edge can function in this manner.
Figure 2. The traffic flow between Vlans/Networks/bcast domains will punt to traditional routers/L3 switches to find a default gateway using an SDN switch with L2 learning. To begin integrating your L3 gateways refer to OpenFlow normal functionality. OFP_Normal
Install POX OpenFlow Controller
sudo apt-get install git git clone http://github.com/noxrepo/pox cd pox ./pox.py forwarding.l2_learning
Configure the HP OpenFlow Switch
J8693A Configuration Editor; Created on release #K.15.06.5008 Ver #02:10.0d:1f hostname "HP-1" module 1 type J86yyA module 2 type J86xxA ip routing vlan 1 name "Controller Traffic OOB" untagged 24 (To Controller Port 24) ip address ip address (Source of Switch to Controller) exit vlan 10 name "User Segment OF Controlled Paths Vlan10 10.100.1.10-24" untagged 10 (Port 10 Access) tagged 1 (Trunk) exit vlan 20 name "User Segment OF Controlled Paths Vlan20 10.200.1.10-24" untagged 11 (Port 11 Access) tagged 1 (Trunk) exit openflow vlan 10 enable controller "tcp::6633" sw-rate 10000 hw-rate 10000 exit exit openflow vlan 20 enable controller "tcp::6633" sw-rate 10000 hw-rate 10000 exit exit
There is a problem with the values in the OFPT_HELLO version being sent from the HP firmware and does not send an explanation in the OFPHFC_COMPATIBLE optional ASCII explanation but it still negotiates and works. I have not seen a new firmware release from HP since February for the 3500, humph :/
% ./pox.py forwarding.l2_learning POX 0.0.0 / Copyright 2011 James McCauley DEBUG:core:POX 0.0.0 going up... DEBUG:core:Running on CPython (2.7.3/Apr 20 2012 22:39:59) INFO:core:POX 0.0.0 is up. This program comes with ABSOLUTELY NO WARRANTY. This program is free software, and you are welcome to redistribute it under certain conditions. Type 'help(pox.license)' for details. DEBUG:openflow.of_01:Listening for connections on 0.0.0.0:6633 Ready. POX> POX> ERROR:openflow.of_01:[Con 1/176766955434440384] OpenFlow Error: [Con 1/176766955434440384] Error: header: [Con 1/176766955434440384] Error: version: 1 [Con 1/176766955434440384] Error: type: 1 (OFPT_ERROR) [Con 1/176766955434440384] Error: length: 20 [Con 1/176766955434440384] Error: xid: 9 [Con 1/176766955434440384] Error: type: OFPET_BAD_REQUEST (1) [Con 1/176766955434440384] Error: code: OFPBRC_BAD_TYPE (1) INFO:openflow.of_01:[Con 1/176766955434440384] Connected to 00-9c-02-b2-76-c0|628
- Next will be how to setup an SDN lab without any hardware.