Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Sending a packet-in message to the controller

Packet-in messages (OFP_PACKET_IN) are sent from the switch to the controller to transfer a packet received from one of the switch-ports to the controller for further processing.

Tip

By default, a packet-in message should be sent to all the controllers that are in equal (OFPCR_ROLE_EQUAL) and master (OFPCR_ROLE_MASTER) roles. This message should not be sent to controllers that are in the slave state.

There are three ways by which the switch can send a packet-in event to the controller:

  1. Table-miss entry: When there is no matching flow entry for the incoming packet, the switch can send the packet to the controller. Refer to the Handling switch configuration messages from the controller recipe in Chapter 1, OpenFlow Channel Connection Establishment (Part 1), for the switch configuration required to send a table-miss packet to the controller.
  2. TTL checking: When the TTL value in a packet reaches zero, the switch can send the packet to the controller....