Spanning Tree and OpenFlow

Questions I often get asked include:

  • Can you run Spanning Tree and OpenFlow together?
  • What happens when Spanning Tree blocks a port? What will OpenFlow do?
  • Will not having redundant links in an OpenFlow network result in loops?

Firstly, it is possible to run an OpenFlow network connected to the HP VAN SDN Controller with Spanning Tree turned off. This is because the HP controller has a built in mechanism to stop loops.

In this blog entry I will show you a simple network with a look and demonstrate what happens with Spanning Tree turned off as well as on using HP Comware switches.

stp-comware-network-topology

Summary:

  • VLAN 1 = Management VLAN (Used for communication with the Controller. This VLAN does not have OpenFlow enabled.
  • VLAN 10 = OpenFlow VLAN
  • 5900-1: IP address 192.168.56.101
  • 5900-2: IP address 192.168.56.102
  • Switch software version: HP Comware Software, Version 7.1.045, Release 2307
  • Controller: HP VAN SDN Controller, version 2.0.0.4253

Switch Code versions:

In this topology I am using two 5900AF-48G-4XG-2QSFP+ switches with the following details:

Switch 1:

[5900-1]dis version
HP Comware Software, Version 7.1.045, Release 2307
Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
HP 5900AF-48G-4XG-2QSFP+ Switch uptime is 0 weeks, 1 day, 23 hours, 48 minutes
Last reboot reason : User reboot

Boot image: flash:/5900_5920-cmw710-boot-r2307.bin
Boot image version: 7.1.045P08, Release 2307
  Compiled Jan 09 2014 18:02:55
System image: flash:/5900_5920-cmw710-system-r2307.bin
System image version: 7.1.045, Release 2307
  Compiled Jan 09 2014 18:03:06

Slot 1
HP 5900AF-48G-4XG-2QSFP+ Switch with 2 Processors
Last reboot reason : User reboot
2048M   bytes SDRAM
4M      bytes Nor Flash Memory
512M    bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is Ver.A
CPLD Version is 001
BootRom Version is 127
[SubSlot 0] 48GE+4SFP Plus+2QSFP Plus Hardware Version is Ver.A

[5900-1]

Switch 2:

[5900-2]dis version
HP Comware Software, Version 7.1.045, Release 2307
Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
HP 5900AF-48G-4XG-2QSFP+ Switch uptime is 0 weeks, 1 day, 23 hours, 51 minutes
Last reboot reason : User reboot

Boot image: flash:/5900_5920-cmw710-boot-r2307.bin
Boot image version: 7.1.045P08, Release 2307
  Compiled Jan 09 2014 18:02:55
System image: flash:/5900_5920-cmw710-system-r2307.bin
System image version: 7.1.045, Release 2307
  Compiled Jan 09 2014 18:03:06

Slot 1
HP 5900AF-48G-4XG-2QSFP+ Switch with 2 Processors
Last reboot reason : User reboot
2048M   bytes SDRAM
4M      bytes Nor Flash Memory
512M    bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is Ver.A
CPLD Version is 001
BootRom Version is 127
[SubSlot 0] 48GE+4SFP Plus+2QSFP Plus Hardware Version is Ver.A

[5900-2]

Spanning Tree configuarion:

In the output below, you can see that Spanning Tree is disabled on VLAN 10:

5900-1 STP:

<5900-1>dis cur | i stp
 undo stp vlan 10 enable
 stp mode pvst
 stp global enable
 <5900-1>

VLAN 192 is the link to the HP VAN SDN Controller:

<5900-1>dis stp brief
VLAN ID Port Role STP State Protection
192 GigabitEthernet1/0/3 DESI FORWARDING NONE
<5900-1>

<5900-2>dis cur | i stp
undo stp vlan 10 enable
stp mode pvst
stp global enable
<5900-2>

VLAN 192 is the link to the HP VAN SDN Controller:

<5900-2>dis stp brief
 VLAN ID  Port                                Role  STP State   Protection
 192      GigabitEthernet1/0/3                DESI  FORWARDING  NONE
 <5900-2>

5900-1 OpenFlow configuration:

OpenFlow has also been configured as follows on the switches. Please refer to my Comware OpenFlow configuration blog entry for information about how to configure the basics of OpenFlow.

openflow instance 10
 description vlan10
 classification vlan 10
 controller 1 address ip 192.168.56.7

Display command showing interfaces and other OpenFlow information:

[5900-1]dis openflow instance 10
Instance 10 information:

Configuration information:
 Description   : vlan10
 Active status : active
 Inactive configuration:
  none
 Active configuration:
  Classification VLAN, total VLANs(1)
   10
  In-band management VLAN, total VLANs(0)
   empty VLAN
  Connect mode: multiple
  MAC address learning: Enabled
  Flow table:
   Table ID(type): 0(Extensibility), count: 5
  Flow-entry max-limit: 65535
  Datapath ID: 0x000a4431925faa3b
Port information:
 GigabitEthernet1/0/2
 GigabitEthernet1/0/4
 GigabitEthernet1/0/5
 GigabitEthernet1/0/7
 GigabitEthernet1/0/8
 GigabitEthernet1/0/9
Active channel information:
 Controller 1 IP address: 192.168.56.7 port: 6633

[5900-1]

This information is communicated to the SDN Controller. Note that both g1/0/4 and g1/0/5 area LIVE:

stp-comware-ports-for-data-path

5900-2 OpenFlow configuration:

Similar configuration on 5900-2:

openflow instance 10
 description vlan10
 classification vlan 10
 controller 1 address ip 192.168.56.7

And the result:

<5900-2>dis openflow instance 10
Instance 10 information:

Configuration information:
 Description   : vlan10
 Active status : active
 Inactive configuration:
  none
 Active configuration:
  Classification VLAN, total VLANs(1)
   10
  In-band management VLAN, total VLANs(0)
   empty VLAN
  Connect mode: multiple
  MAC address learning: Enabled
  Flow table:
   Table ID(type): 0(Extensibility), count: 5
  Flow-entry max-limit: 65535
  Datapath ID: 0x000a44319261869e
Port information:
 GigabitEthernet1/0/2
 GigabitEthernet1/0/4
 GigabitEthernet1/0/5
 GigabitEthernet1/0/7
 GigabitEthernet1/0/8
Active channel information:
 Controller 1 IP address: 192.168.56.7 port: 6633
 
<5900-2>

Both ports g1/0/4 and g1/0/5 are live:

stp-comware-both-port
Does LLDP neighbor information display? Yes it does:

[5900-1-GigabitEthernet1/0/5]dis lldp neighbor-information list
Chassis ID : * -- -- Nearest nontpmr bridge neighbor
             # -- -- Nearest customer bridge neighbor
             Default -- -- Nearest bridge neighbor
System Name          Local Interface Chassis ID      Port ID
5900-2               GE1/0/4         4431-9261-869e  GigabitEthernet1/0/4
-                    GE1/0/4         4431-9261-869e  0x4
5900-2               GE1/0/5         4431-9261-869e  GigabitEthernet1/0/5
-                    GE1/0/5         4431-9261-869e  0x5
[5900-1-GigabitEthernet1/0/5]

<5900-2>dis lldp neighbor-information list
Chassis ID : * -- -- Nearest nontpmr bridge neighbor
             # -- -- Nearest customer bridge neighbor
             Default -- -- Nearest bridge neighbor
System Name          Local Interface Chassis ID      Port ID
5900-1               GE1/0/4         4431-925f-aa3b  GigabitEthernet1/0/4
-                    GE1/0/4         4431-925f-aa3b  0x4
5900-1               GE1/0/5         4431-925f-aa3b  GigabitEthernet1/0/5
-                    GE1/0/5         4431-925f-aa3b  0x5

<5900-2>

This is the view on the OpenFlow Topology view on the HP Controller. Both ports 4 and 5 (g1/0/4 and g1/0/5) are shown:

stp-comware-general-openflow-topology
Here is a zoomed in version of the topology in case the above picture is not clear:

stp-comware-zoom-version-topology
The node devices (hosts) can be viewed by their MAC address:

stp-comware-devices-host-on-mac
And a zoomed in version:

stp-comware-node-mac-zoom
So, how is traffic flowing between the two devices?

In this example, note that traffic is using the SPF algorithm and is going via port 5:

stp-comware-spf-algorithm
Once again, note that STP is not enabled on VLAN 10:

[5900-1]dis cur | i stp
 undo stp vlan 10 enable
 stp mode pvst
 stp global enable
[5900-1]

And on 5900-2:

<5900-2>dis cur | i stp
 undo stp vlan 10 enable
 stp mode pvst
 stp global enable
<5900-2>

Enable Spanning Tree:

Let’s enable STP and see what happens:

5900-1:

[5900-1]stp vlan 10 enable

5900-2:

[5900-2]stp vlan 10 enable

What are the results ? 5900-1 is forwarding on all ports:

[5900-1]dis stp brief
 VLAN ID  Port                                Role  STP State   Protection
 10       GigabitEthernet1/0/2                DESI  FORWARDING  NONE
 10       GigabitEthernet1/0/4                DESI  FORWARDING  NONE
 10       GigabitEthernet1/0/5                DESI  FORWARDING  NONE
 192      GigabitEthernet1/0/3                DESI  FORWARDING  NONE
[5900-1]

stp-comware-ports
What about on 5900-2? In this case, g1/0/5 is blocking (discarding):

[5900-2]dis stp brief
 VLAN ID  Port                                Role  STP State   Protection
 10       GigabitEthernet1/0/2                DESI  LEARNING    NONE
 10       GigabitEthernet1/0/4                ROOT  FORWARDING  NONE
 10       GigabitEthernet1/0/5                ALTE  DISCARDING  NONE
 192      GigabitEthernet1/0/3                DESI  FORWARDING  NONE
[5900-2]

The controller also displays this information (note port g1/0/5 is blocked, live):

stp-comware-port-blocked
LLDP information is still visible across both ports:

[5900-1]dis lldp neighbor-information list
Chassis ID : * -- -- Nearest nontpmr bridge neighbor
             # -- -- Nearest customer bridge neighbor
             Default -- -- Nearest bridge neighbor
System Name          Local Interface Chassis ID      Port ID
5900-2               GE1/0/4         4431-9261-869e  GigabitEthernet1/0/4
-                    GE1/0/4         4431-9261-869e  0x4
5900-2               GE1/0/5         4431-9261-869e  GigabitEthernet1/0/5
-                    GE1/0/5         4431-9261-869e  0x5
[5900-1]

[5900-2]dis lldp neighbor-information list
Chassis ID : * -- -- Nearest nontpmr bridge neighbor
             # -- -- Nearest customer bridge neighbor
             Default -- -- Nearest bridge neighbor
System Name          Local Interface Chassis ID      Port ID
5900-1               GE1/0/4         4431-925f-aa3b  GigabitEthernet1/0/4
-                    GE1/0/4         4431-925f-aa3b  0x4
5900-1               GE1/0/5         4431-925f-aa3b  GigabitEthernet1/0/5
-                    GE1/0/5         4431-925f-aa3b  0x5
[5900-2]

What about the SPF algorithm?

In this case the traffic is now sent using port 4:

stp-comware-traffic-using-port-4
And showing the MAC addresses:

stp-comware-showing-macc-address
On 5900-2, the following can be seen in the flow table – in the yellow highlights, note the port g1/0/4 is now being used:

[5900-2]dis openflow instance 10 flow-table
Instance 10 flow table information:

Table 0 information:
 Table type: Extensibility, flow entry count: 5, total flow entry count: 5

MissRule flow entry information:
 cookie: 0x0, priority: 0, hard time: 0, idle time: 0, flags: flow_send_rem,
 byte count: --, packet count: 20532
Match information: any
Instruction information:
 Write actions:
  Output interface: Controller, send length: 65509 bytes

Flow entry 1 information:
 cookie: 0x2328, priority: 29999, hard time: 0, idle time: 60, flags:
 flow_send_rem, byte count: --, packet count: 301
Match information:
 Input interface: GE1/0/4
 Ethernet destination MAC address: 000c-290b-4a33
 Ethernet destination MAC address mask: ffff-ffff-ffff
 Ethernet source MAC address: 000c-291c-ca3e
 Ethernet source MAC address mask: ffff-ffff-ffff
 Ethernet type: 0x0800
Instruction information:
 Write actions:
  Output interface: GE1/0/2

Flow entry 2 information:
 cookie: 0x2328, priority: 29999, hard time: 0, idle time: 60, flags:
 flow_send_rem, byte count: --, packet count: 91
Match information:
 Input interface: GE1/0/2
 Ethernet destination MAC address: 000c-291c-ca3e
 Ethernet destination MAC address mask: ffff-ffff-ffff
 Ethernet source MAC address: 000c-290b-4a33
 Ethernet source MAC address mask: ffff-ffff-ffff
 Ethernet type: 0x0800
Instruction information:
 Write actions:
  Output interface: GE1/0/4

Summary

In this blog entry I showed how Spanning Tree and OpenFlow interact on HP Comware switches.



Tags: , , , , , ,


About :

These days I am involved in some exciting SDN and OpenFlow projects involving the HP VAN SDN Controller, HP ProVision and HP Comware switches. These new developments in the networking world combine my passions of networking and application development. I hope to write some interesting blog entries on these exiting topics. I am both a Cisco CCIE #11023 and HP MASE as well as a Cisco Certified Systems Instructor (CCSI #22787) and Certified HP Instructor. I have been training networking courses for well over 10 years teaching on a wide range of topics including routing and switching, VoIP, OpenFlow and SDN. I have delivered instructor led courses all over the world. I started working with Cisco Unified Communications Manager when it was still called Cisco Call Manager and have been deploying, troubleshooting and teaching Unified Communications products since version 3.0. I have developed various network utilities such as the VPN Config Generator and others to help engineers in their day to day jobs. I also develop software, training materials, EBooks, videos and other products which are used throughout the world. I have designed, implemented and managed networks ranging from single sites to those that span 50 countries.

View all posts by


2 Responses to “Spanning Tree and OpenFlow”

  • dany, May 2, 2014 at 7:48 am #

    Have you ever make a raspberry based openlow switch/controller?
    How about subtitute the HP VAN controller with that..

    Reply

    • David Bombal, July 11, 2014 at 7:24 pm #

      Hi Dany,

      I don’t think a raspberry pi will have the processing capability required, even though that may be a cool project :)

      There are other open source controllers in the market place.

      Regards,
      David

      Reply

Leave a Reply

  • Proper format "info@pakiti.com"