OpenFlow Datapath ID (DPID)

How are OpenFlow switches identified?

Each OpenFlow instance on a switch is identified by a Datapath Identifier. This is a 64 bit number determined as follows according to the OpenFlow specification:

“The datapath_id fleld uniquely identifies a datapath. The lower 48 bits are intended for the switch MAC address, while the top 16 bits are up to the implementer. An example use of the top 16 bits would be a VLAN ID to distinguish multiple virtual switch instances on a single physical switch.”

Network topology:

Here is an OpenFlow Topology diagram as seen on the HP VAN SDN Controller:

network-topology

In case that is not clear, here is a version with just the switches:

HP-ProVision-ProCurve- switches

The two switches at the bottom of the network topology are HP ProVision (ProCurve) switches and the top two switches are HP Comware switches.

HP ProVision switches (ProCurve):

On HP ProVision switches, the DPID is calculated as follows:

  • The most significant 16 bits are the VLAN number associated with the OpenFlow instance. So for the OpenFlow instance configured on VLAN 10, this number will be “A”. (10 in decimal equates to “A” in hexadecimal). Hence the switches are identified by 00:0a.
  • Least significant 48 bits: Switch MAC address.

This is the code on the HP ProVision switches:

openflow
   controller-id 1 ip 192.168.56.7 controller-interface vlan 1
   instance "vlan10"
      member vlan 10
      controller-id 1
      enable
      exit
      exit
   enable
   exit

Here is the output of a show command on one of the switches:

3800-1# show openflow instance vlan10

 Configured OF Version    : 1.0
 Negotiated OF Version    : 1.0
 Instance Name            : vlan10
 Admin. Status            : Enabled
 Member List              : VLAN 10
 Listen Port              : None
 Oper. Status             : Up
 Oper. Status Reason      : NA
 Datapath ID              : 000a009c02d81800
 Mode                     : Active
 Flow Location            : Hardware and Software
 No. of Hw Flows          : 3
 No. of Sw Flows          : 0
 Hw. Rate Limit           : 0 kbps
 Sw. Rate Limit           : 100 pps
 Conn. Interrupt Mode     : Fail-Secure
 Maximum Backoff Interval : 60 seconds
 Probe Interval           : 10 seconds
 Hw. Table Miss Count     : 2967
 No. of Sw Flow Tables    : NA
 Egress Only Ports        : None
 Table Model              : Single Table

 Controller Id Connection Status Connection State Secure Role
 ------------- ----------------- ---------------- ------ ------
 1             Connected         Active           No     Equal

HP Comware switches:

On HP Comware switches, the DPID is calculated as follows:

  • Comprises the instance ID and the bridge MAC address:
  • The most significant 16 bits are the instance ID
  • The least significant 48 bits are the bridge MAC address

The switch on the top right of the diagram is following this convention. This is the configuration of the switch:

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

Here is display command showing the DPID of the switch:

display openflow summary
Fail-open mode: Se - Secure mode, Sa - Standalone mode

ID    Status    Datapath-ID         Channel     Table-num  Port-num  Reactivate
10    Active    0x000a44319261869e  Connected   1          5         N

However, the switch on the top left switch has a number of 00:00:00:00:00:00:00:01? Where did that come from?

Well, HP Comware switches allow you to set the Datapath ID of a switch manually using the following command:

datapath-id

where the datapath-id value is a hexadecimal number in a range of 1 to 0xFFFFFFFFFFFFFFFF.

Here is the configuration of the switch:

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

And here is the output of a display command on the switch:

[5900-1]display openflow summary
Fail-open mode: Se - Secure mode, Sa - Standalone mode

ID    Status    Datapath-ID         Channel     Table-num  Port-num  Reactivate
10    Active    0x0000000000000001  Connected   1          6         N

[5900-1]

Summary

In this blog entry I explained how Datapath IDs are selected on HP switches.

All the best!



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


No comments yet.

Leave a Reply

  • Proper format "info@pakiti.com"