openvswitch ovs-appctl 使用

参考链接:https://www.cnblogs.com/zqyanywn/p/10501590.html

1. fdb/show bridge 列出指定桥上每个MAC直至与VLAN的对应信息,并且包含该学习到该MAC的端口号还有该条目的age信息,单位为秒 

[root@ostack1 ~]# ovs-appctl fdb/show br-eth1
 port  VLAN  MAC                Age
    1     4  fa:16:3e:e2:af:d7  225
    1   200  fa:16:3e:12:d2:92  145
    2     0  fa:16:3e:ef:95:a9   89
    2     0  fa:16:3e:0e:74:20   39
    1   256  fa:16:3e:0a:2c:4a    8
    1   256  fa:16:3e:d6:4d:7d    8
    1   256  fa:16:3e:20:cf:bf    8
    1   256  fa:16:3e:7a:1c:9c    8
    1   256  fa:16:3e:ff:78:24    8
    1   256  fa:16:3e:ec:54:5f    7
    1   256  fa:16:3e:2e:ff:f5    7
    1   256  fa:16:3e:f4:fb:9d    7
    2   256  0c:c6:cc:f9:07:76    1
    1   256  fa:16:3e:90:a0:11    1
    3   256  52:54:00:b8:dc:37    0
    1   256  fa:16:3e:e2:af:d7    0

2.fdb/flush [bridge]
清除指定桥的MAC学习表,没有指定桥则应用于所有桥 

3.bridge/dump-flows bridge 列出桥上所有的流,包括那些在其他命令中(例如 ovs-ofctl dump-flows)默认隐藏的流.一些机制比如带内管理等设置的流策略是不行允许修改和覆盖的,所以对控制器来说他们是隐藏的。

[root@ostack1 ~]# ovs-appctl bridge/dump-flows br-eth3
duration=306s, n_packets=52, n_bytes=2336, priority=2,in_port=2,actions=resubmit(,1)
duration=325s, n_packets=329, n_bytes=22978, priority=0,actions=NORMAL
duration=306s, n_packets=5574, n_bytes=387046, priority=1,actions=resubmit(,3)
table_id=1, duration=306s, n_packets=51, n_bytes=2294, priority=0,actions=resubmit(,2)
table_id=2, duration=305s, n_packets=51, n_bytes=2294, priority=2,in_port=2,actions=drop
table_id=3, duration=305s, n_packets=5563, n_bytes=386275, priority=1,actions=NORMAL
table_id=254, duration=10276157s, n_packets=0, n_bytes=0, priority=2,recirc_id=0,actions=drop
table_id=254, duration=10276157s, n_packets=0, n_bytes=0, priority=0,reg0=0x1,actions=controller(reason=no_match)
table_id=254, duration=10276157s, n_packets=31, n_bytes=8887, priority=0,reg0=0x2,actions=drop
table_id=254, duration=10276157s, n_packets=0, n_bytes=0, priority=0,reg0=0x3,actions=drop
原文地址:https://www.cnblogs.com/wangjq19920210/p/11833464.html