| 227 | === 3. Configuration example === |
| 228 | The following is a virtual switch on an IP8800 running the new firmware: |
| 229 | {{{ |
| 230 | sw-gp(config)# openflow openflow-id 1 |
| 231 | !sw-gp(config-of)# sh |
| 232 | openflow openflow-id 1 |
| 233 | controller controller-name nox-gp 1 172.16.0.240 port 6633 |
| 234 | connect timeout 10 |
| 235 | connect timeout retry 3 |
| 236 | openflow-interface gigabitethernet 0/17-32, gigabitethernet 0/48 |
| 237 | l2-inband-secure-channel vlan 1 gigabitethernet 0/48 |
| 238 | enable |
| 239 | }}} |
| 240 | |
| 241 | The basic steps are the following: |
| 242 | 1. A real or virtual !OpenFlow switch can be instantiated with the `openflow openflow-id [id] context. [id] is a value of up to 16. |
| 243 | 2. As seen above, step 1 takes you into the `(config-of)` context. Once an !OpenFlow switch (VSI) is instantiated, ports are added to it with the `openflow-interface [add]` context, which follows similar syntax to trunk configurations. |
| 244 | 3. If a port that is part of a VSI is to be used as the control channel, specify it with the `l2-inband-secure-channel` context. You must specify the VLAN the controller is in. |
| 245 | 4. The controller is specified with the `controller` context. The command will force you to give a human-readable name to the controller (nox-gp in the example above), and an IP address and port where the controller process can be reached. |
| 246 | 5. The switch must be enabled with the `enable` option. |
| 247 | |
| 248 | In addition to the basics, several specific aspects of the VSI can be configured. The above example shows the timeout parameters of the VSI have been changed so that: |
| 249 | * `connect timeout 10` = The VSI detects controller disconnection in 10 seconds, and |
| 250 | * `connect timeout retry 3` = When disconnected, the VSI attempts to re-connect with the controller thrice before giving up. |
| 251 | |
| 252 | The full list of knobs are shown in the previous section, third block quote. |
| 253 | |