174 | | ovs-vsctl set-controller br0 tcp:172.16.0.14:6633 |
175 | | }}} |
176 | | In this example, the OVS process is pointed to a BSN controller (kvm-big) on 172.16.0.14, listening on port 6633^1^. `ovs-vsctl` will spit out a bunch of messages as it attempts to connect to the controller: |
177 | | {{{ |
178 | | ##screencap here |
| 174 | ovs-vsctl set-controller br0 tcp:172.16.0.14:6633 |
| 175 | }}} |
| 176 | In this example, the OVS process is pointed to a BSN controller (kvm-big) on 172.16.0.14, listening on port 6633^1^. With a properly initialized and configured database, `ovs-vswitchd` will spit out a bunch of messages as it attempts to connect to the controller. Its output should look something similar to this: |
| 177 | {{{ |
| 178 | root@node1-4:/opt/openvswitch-1.2.2# vswitchd/ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --pidfile --detach |
| 179 | Nov 07 17:37:02|00001|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connecting... |
| 180 | Nov 07 17:37:02|00002|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected |
| 181 | Nov 07 17:37:02|00003|bridge|INFO|created port br0 on bridge br0 |
| 182 | Nov 07 17:37:02|00004|bridge|INFO|created port eth0.101 on bridge br0 |
| 183 | Nov 07 17:37:02|00005|bridge|INFO|created port eth0.102 on bridge br0 |
| 184 | Nov 07 17:37:02|00006|ofproto|INFO|using datapath ID 0000002320b91d13 |
| 185 | Nov 07 17:37:02|00007|ofproto|INFO|datapath ID changed to 000002972599b1ca |
| 186 | Nov 07 17:37:02|00008|rconn|INFO|br0<->tcp:172.16.0.14:6633: connecting... |
180 | | Given that you have a controller ready, the node should be usable once the virtual switch(es) connect(s) to the controller. The function of the switch will be determined by the flow matching rules generated by the conteoller. |
| 188 | The !OpenvSwitch !OpenFlow switch should be functional as soon as it finds and connects to the controller. As you can see above, a DPID is chosen at random; if a random DPID does not suit your needs, a DPID may be specified manually using ovs-vsctl: |
| 189 | {{{ |
| 190 | ovs-vsctl set bridge <mybr> other-config:datapath-id=<datapathid> |
| 191 | }}} |
| 192 | Where <datapathid> is a 16-digit hex value. For our network node, this becomes: |
| 193 | {{{ |
| 194 | ovs-vsctl set bridge br0 other-config:datapath-id=0000009900113300 |
| 195 | }}} |
| 196 | |