Openvswitch

Openvswitch tricks

Openvswitch DB

$ ovs-vsctl -V

Show configuration

$ ovs-vsctl show

List bridges

$ ovs-vsctl list-br

List ports on bridge

$ ovs-vsctl list-ports <bridge>

Add bridge

ovs-vsctl add-br <bridge>

Add port on bridge

ovs-vsctl add-port <bridge> <interface>

Set controller

ovs-vsctl set-controller <bridge> tcp:<IP>:<port> tcp:<IP>:<port>

Get controller information

ovs-vsctl get-controller <bridge>

Delete controller

ovs-vsctl del-controller <bridge>

Set fail mode

Standalone

ovs-vsctl set-fail-mode <bridge> standalone

Secure

ovs-vsctl set-fail-mode <bridge> secure

Get fail mode

ovs-vsctl get-fail-mode <bridge>

Openvswitch Open Flows

Dump flows for a bridge

ovs-ofctl dump-flows <bridge>

Delete flows for a bridge

ovs-ofctl del-flows <bridge>