Control channel Establishment and Maintenance
a control channel is established over a TCP connection. Devices on both ends of a channel exchange heartbeat packets to maintain the connection. Figure 1 shows the process of control channel establishment and maintenance.
- After the controller and forwarder are both configured, the controller and forwarder establish a TCP connection.
- The controller and forwarder exchange Hello packets carrying version information over the TCP connection to negotiate a channel with each other.
- After the negotiation is complete, the controller sends a Features Request packet to query the attribute information of the forwarder. Upon receipt of the packet, the forwarder replies with the requested attribute information, such as the flow table format and buffer size, to the controller. Then, a control channel is successfully established.
- The controller and forwarder periodically send Echo Request packets to each other to detect the connection status. After receiving an Echo Request packet sent from the initiator, the peer returns an Echo Reply packet. If the initiator neither receives an Echo_Reply packet nor receives any other valid CUSP packet after a specified number of attempts, the initiator considers the peer faulty and tears down the connection. If the initiator does not receive any Echo_Reply packet but receives another valid CUSP packet, it does not tear down the connection.
Figure 1 Flowchart for establishing and maintaining a CUSP connection