Setting the controller mode
An OpenFlow instance can connect to one or more controllers, depending on the controller mode the OpenFlow instance uses:
Single—The OpenFlow instance connects to only one controller at a time. When communication with the current controller fails, the OpenFlow instance uses another controller. In this mode, an OpenFlow instance attempts to connect to a controller one by one in ascending order of controller ID until it successfully connects to a controller. If multiple controllers that are configured for the OpenFlow instance are unreachable, it might take a long time for the OpenFlow instance to connect to a reachable controller.
Multiple—The OpenFlow instance can simultaneously connect to multiple controllers. When communication with any controller fails, the OpenFlow instance attempts to reconnect to the controller after a reconnection interval.
To set the controller mode for an OpenFlow instance:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter OpenFlow instance view. | openflow instance instance-id | N/A |
3. Set the controller mode. | controller mode { multiple | single } | By default, the controller mode is multiple. |