OpenFlow channel
The OpenFlow channel is the interface that connects each OpenFlow switch to a controller. The controller uses the OpenFlow channel to exchange control messages to configure and manage the switch, receive events from the switch, and send packets out the switch. The OpenFlow channel is usually encrypted by using TLS. Also, an OpenFlow channel can be run directly over TCP.
The OpenFlow protocol supports the following message types: controller-to-switch, asynchronous, and symmetric. Each message type has its own subtypes.
Controller-to-Switch messages
IMPORTANT: Support for Controller-to-Switch messages varies by device mode. | ||
Controller-to-Switch messages are initiated by the controller and used to directly manage or inspect the state of the switch. Controller-to-Switch messages might or might not require a response from the switch.
The Controller-to-Switch messages include the following subtypes:
Features—The controller requests the basic capabilities of a switch by sending a features request. The switch must respond with a features reply that specifies the basic capabilities of the switch.
Configuration—The controller sets and queries configuration parameters in the switch. The switch only responds to a query from the controller.
Modify-State—The controller sends Modify-State messages to manage state on the switches. Their primary purpose is to add, delete, and modify flow or group entries in the OpenFlow tables and to set switch port properties.
Read-State—The controller sends Read-State messages to collect various information from the switch, such as current configuration and statistics.
Packet-out—These are used by the controller to send packets out of the specified port on the switch, or to forward packets received through Packet-in messages. Packet-out messages must contain a full packet or a buffer ID referencing a packet stored in the switch. The message must also contain a list of actions to be applied in the order they are specified. An empty action list drops the packet.
Barrier—Barrier messages are used to confirm the completion of the previous operations. The controller send s Barrier request. The switch must send a Barrier reply when all the previous operations are complete.
Role-Request—Role-Request messages are used by the controller to set the role of its OpenFlow channel, or query that role. It is typically used when the switch connects to multiple controllers.
Asynchronous-Configuration—These are used by the controller to set an additional filter on the asynchronous messages that it wants to receive, or to query that filter. It is typically used when the switch connects to multiple controllers.
Asynchronous messages
IMPORTANT: Support for asynchronous messages varies by device mode. | ||
Switches send asynchronous messages to controllers to inform a packet arrival or switch state change. For example, when a flow entry is removed due to timeout, the switch sends a flow removed message to inform the controller.
The asynchronous messages include the following subtypes:
Packet-In—Transfer the control of a packet to the controller. For all packets forwarded to the Controller reserved port using a flow entry or the table-miss flow entry, a packet-in event is always sent to controllers. Other processing, such as TTL checking, can also generate packet-in events to send packets to the controller. The Packet-in events can include the full packet or can be configured to buffer packets in the switch. If the packet-in event is configured to buffer packets, the packet-in events contain only some fraction of the packet header and a buffer ID. The controller processes the full packet or the combination of the packet header and the buffer ID. Then, the controller sends a Packet-out message to direct the switch to process the packet.
Flow-Removed—Inform the controller about the removal of a flow entry from a flow table. These are generated due to a controller flow delete request or the switch flow expiry process when one of the flow timeouts is exceeded.
Port-status—Inform the controller of a state or setting change on a port.
Error—Inform the controller of a problem or error.
Symmetric messages
IMPORTANT: Support for symmetric messages varies by device mode. | ||
Symmetric messages are sent without solicitation, in either direction.
The symmetric messages contain the following subtypes:
Hello—Hello messages are exchanged between the switch and controller upon connection startup.
Echo—Echo request or reply messages can be sent from either the switch or the controller, and must return an echo reply. They are mainly used to verify the liveness of a controller-switch connection, and might also be used to measure its latency or bandwidth.
Experimenter—This is a staging area for features meant for future OpenFlow revisions.