Controller-to-switch messages

These messages are used to directly manage or inspect the state of the switch:

  • Handshake: Upon the establishment of the TLS session (for example, the TLS TCP session on port 6633), the controller sends an OFPT_FEATURES_REQUEST message to the switch and the OpenFlow switch reports back (via the OFPT_FEATURES_REPLY message) the features and capabilities that it has and that it supports. The datapath_id field uniquely identifies an OpenFlow switch (datapath). It is a 64-bit entity and the lower 48 bits are intended for the switch MAC address, while the top 16 bits are up to the manufacturer. Datapath identifier (datapath_id) has a maximum number of packets the switch can buffer when sending packets to the controller using packet-in messages number of supported flow tables by data path (OpenFlow switch); switch capabilities, supported actions, and definition of ports are the important features that are reported to the controller. In the switch capabilities field, the OFPC_PORT_BLOCKED bit signifies that a switch protocol that is not OpenFlow, such as Spanning Tree, will detect and mitigate packet loops in the network.

  • Switch configuration: The controller is able to set and query configuration parameters in the switch with the OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY messages, respectively. The switch responds to a configuration request with an OFPT_GET_CONFIG_REPLY message; it does not reply to a request to set the configuration. In OFPT_GET_CONFIG_REPLY, the only content is the OpenFlow header that contains two major contents:

    • The flag that is used to indicate whether the IP fragment should be treated normally, dropped, or reassembled. Normal handling of a fragment is mandatory for an OpenFlow switch, and it kicks in when a fragment misses any perquisite field, such as the TCP/UDP port; in such a scenario, the packet should not match any entry that has that field set.

    • The miss_send_len field defines the number of bytes sent to the controller by the OpenFlow pipeline when an output action is not used to the OFP_CONTROLLER logical port. An instance can be when a packet has an invalid TTL sent; with this field set as 0, the switch must send zero bytes of the packet in the ofp_packet_in message, and if the value is set to OFPCL_NO_BUFFER, the complete packet must be included in the message and should not be buffered.

  • Flow table configuration: This is used by the switch to determine which tables the configuration should be applied to. The table numbering is from 0 and can take any number until OFPTT_MAXOFPTT_ALL is a reserved value used when the configuration is to be applied to all the tables in the switch.

  • Modify state: Modifications to the flow table from the controller are done with the OFPT_FLOW_MOD message, and the controller uses the OFPT_PORT_MOD message to modify the behavior of the physical ports. The flow modification commands are ADD, MODIFY, MODIFY_STRICT, DELETE, and DELETE_STRICT, which were explained in Chapter 2, Introducing OpenFlow. The port configuration bits indicate whether a port has been administratively brought down, the options for handling 802.1D Spanning Tree Protocol (STP) packets, and how to handle incoming and outgoing packets. The controller may set OFPPFL_NO_STP to 0 to enable STP on a port or to 1 in order to disable STP on a port. The OpenFlow reference implementation sets this bit to 0 (enabling STP) by default.

  • Read State (Statistics): The controller can query the status of the switch using the OFPT_STAT_REQUEST message. The switch responds with one or more OFPT_STATS_REPLY messages. There is a type field in these message exchange, which specifies the kind of information that are begin exchanged (OpenFlow switch description, individual flow statistics, aggregate flow statistics, flow table statistics, physical port statistics, queue statistics for a port, and vendor-specific messages) and determines how the body field should be interpreted.

  • Queue query: An OpenFlow switch provides limited Quality of Service (QoS) support through a simple queuing mechanism. One (or more) queue(s) can be attached to a port and can be used to map flows on it (them). The flows, which are mapped to a specific queue, will be treated according to the configuration of that queue (for example, the minimum rate control). Note that queue configuration takes place outside the OpenFlow protocol (for example, through the command-line interface) or an external dedicated configuration protocol. The controller can query the switch for configured queues on a port using the queue query message.

  • Send packet: Using this message (that is, OFPT_PACKET_OUT), the controller is able to send packets out of a specified port of the OpenFlow switch.

  • Barrier: This message is sent whenever the controller wants to ensure message dependencies have been met or wants to receive notifications for completed operations. The message is OFPT_BARRIER_REQUEST and has no message body. Upon receipt, the OpenFlow switch must finish processing all previously received messages before executing any message beyond the barrier request. When current processing is completed, the switch must send an OFPT_BARRIER_REPLY message the transaction ID (xid) of the original request.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset