OpenFlow Link Discovery

The OpenFlow Link Discovery application is the default OpenFlow link supplier application that is installed with the controller. This application implements the com.hp.sdn.supplier.LinkSuppliersBroker interface and uses LinkSupplierService and LinkService APIs to create and maintain link information for OpenFlow datapaths that register with the controller.

The OpenFlow Link Discovery application pushes flow-mods to steal discovery packets, injects discovery packets to all ports on all datapaths, and discovers links on the controlled network by listening for PACKET_IN messages. It discovers two types a link:

  • direct links

  • multi-hop links

The OpenFlow Link Discovery application distinguishes the link type by injecting two packets to each port in an OpenFlow instance. These packets have the same Ethernet type (0x8999), but are sent to different destination MAC addresses.

The ControllerManager configuration specifies the hybrid mode that has one of the following values:

  • hybrid.mode=true

    The OpenFlow Link Discovery application installs a flow rule on every OpenFlow devices to steal these packets. Packets that match this flow rule are forwarded to the controller from the OpenFlow instance and port where they were received. Using the origin information contained within the received packet, the controller derives the source and destination of the link that this packet traversed and records a link between the OpenFlow instances.

    The link type is derived from the destination MAC address of the packet (direct or multi-hop). If a link is direct, it will be discovered as both direct and multi-hop from the reporting OpenFlow instance, but the type direct has precedence over the type multi-hop, so the link is recorded as direct.

  • hybrid.mode=false

    All packets are stolen to the controller by default. Therefore, the OpenFlow Link Discovery application does not push flow-mods to devices.

A controller-generated link discovery packet:

  • Uses a non-standard protocol, BDDP, which uses a payload format similar to LLDP.

  • Is sent to either a link-local MAC address (to discover direct links) or a multicast MAC address (to discover multihop links).

    The link-local MAC address is: 01:08:c2:00:00:0e

    The multicast MAC address used for link discovery is: 01:1B:78:E9:7B:CD.

  • Contains the source device and port that introduced the packet to the controlled network.

The OpenFlow Link Discovery application listens for PACKET_IN messages that contain the BDDP protocol. Each discovery packet has the source device ID embedded within its payload, and the destination device can be derived from the PACKET_IN message. This design enables the OpenFlow Link Discovery application to populate the link table with information it learns from such received packets.


[NOTE: ]

NOTE: Because PACKET_IN messages that contain the BDDP protocol are for controller-generated link discovery packets, no corresponding PACKET_OUT is sent back to the device that sent the PACKET_IN.


The OpenFlow Link Discovery application also listens to device and interface events and registers with the ControllerService API to send OpenFlow packets to datapaths.

If the OpenFlowLinkDiscoveryComponent configuration has age.multihop.links=true, the OpenFlow Link Discovery application periodically injects discovery packets into the controlled network to refresh the multihop links. Any multihop links that are not refreshed at the interval configured for the multihop.poll.interval key are considered to be invalid and are removed from the link table. Additionally, network events such as a port going down or a device status change causes relevant links to be removed from the link table, and causes discovery packets to be sent to all datapaths that are in a ready state.