Pure OVSDB:
ovsdb-client dump
ovsdb-client dump <table_name>
ovsdb-client dump unix:///run/ovn/ovnnb_db.sock <table_name>
For DB-specific:
ovn northbound:
ovn-nbctl list logical-router
ovn-nbctl list logical-router <uuid>/<name>
ovs-vsctl list interface br-int
Search all routes by ip_prefix and nexthop:
ovn-nbctl find logical-router-static-route ip_prefix=<cidr> nexthop=<nexthop>
For standalone/active-standby:
ovsdb-tool convert Open_vSwitch /usr/share/openvswitch/vswitch.ovsschema
For clustered DB:
ovsdb-client -t 30 convert unix:///run/ovn/ovnnb_db.sock /usr/share/ovn/ovn-nb.ovsschema
View ovsdb queries in logs
ovs-appctl -t /var/run/ovn/ovnnb_db.ctl vlog/set file:jsonrpc:info
Dump openflow table for br-int:
ovs-ofctl dump-flows br-int
Dump only table 8:
ovs-ofctl dump-flows br-int table=8
Dump full ovs DP cache flows (for simplicity, pass --names
to see real ports names):
ovs-dpctl dump-flows --names
Trace DP flow against openflow tables:
ovs-appctl ofproto/trace '<dp flow match portion>'
Trace DP flow against openflow with OVN:
ovs-appctl ofproto/trace '<dp flow match portion>' | ovn-detrace
List supported commands
ovs-appctl -t ovs-vswitchd list-commands
Show bfd information
ovs-appctl -t ovs-vswitchd bfd/show
View NB cluster status:
ovs-appctl -t /run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound
View SB cluster status:
ovs-appctl -t /run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound