查看ovs中流表中,流表的port

来源:互联网 发布:创新发展的理念知乎 编辑:程序博客网 时间:2024/06/18 06:13

1、查看ovs br-tun中port 对应的 number

[root@compute ~]# ovs-ofctl show br-tunOFPT_FEATURES_REPLY (xid=0x2): dpid:0000f29a1024c747n_tables:254, n_buffers:256capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IPactions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst 10(patch-int): addr:de:e7:04:cb:20:a8     config:     0     state:      0     speed: 0 Mbps now, 0 Mbps max 11(vxlan-0a1b181e): addr:c6:06:23:9c:db:af     config:     0     state:      0     speed: 0 Mbps now, 0 Mbps max LOCAL(br-tun): addr:f2:9a:10:24:c7:47     config:     PORT_DOWN     state:      LINK_DOWN     speed: 0 Mbps now, 0 Mbps maxOFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

2、查看ovs br-屯中的流表项

[root@compute ~]# ovs-ofctl dump-flows br-tunNXST_FLOW reply (xid=0x4): cookie=0x0, duration=848584.013s, table=0, n_packets=12760, n_bytes=4260054, idle_age=6, hard_age=65534, priority=1,in_port=10 actions=resubmit(,2) cookie=0x0, duration=848581.871s, table=0, n_packets=68, n_bytes=9560, idle_age=640, hard_age=65534, priority=1,in_port=11 actions=resubmit(,4) cookie=0x0, duration=848583.964s, table=0, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=0 actions=drop cookie=0x0, duration=848583.914s, table=2, n_packets=46, n_bytes=7896, idle_age=640, hard_age=65534, priority=0,dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,20) cookie=0x0, duration=848583.865s, table=2, n_packets=12714, n_bytes=4252158, idle_age=6, hard_age=65534, priority=0,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=resubmit(,22) cookie=0x0, duration=848583.816s, table=3, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=0 actions=drop cookie=0x0, duration=848582.338s, table=4, n_packets=68, n_bytes=9560, idle_age=640, hard_age=65534, priority=1,tun_id=0x44c actions=mod_vlan_vid:1,resubmit(,10) cookie=0x0, duration=848583.767s, table=4, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=0 actions=drop cookie=0x0, duration=848583.718s, table=10, n_packets=68, n_bytes=9560, idle_age=640, hard_age=65534, priority=1 actions=learn(table=20,hard_timeout=300,priority=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:10 cookie=0x0, duration=848581.871s, table=20, n_packets=40, n_bytes=7420, idle_age=640, hard_age=65534, priority=2,dl_vlan=1,dl_dst=fa:16:3e:b5:29:b7 actions=strip_vlan,set_tunnel:0x44c,output:11 cookie=0x0, duration=848483.395s, table=20, n_packets=6, n_bytes=476, idle_age=65534, hard_age=65534, priority=2,dl_vlan=1,dl_dst=fa:16:3e:bc:eb:68 actions=strip_vlan,set_tunnel:0x44c,output:11 cookie=0x0, duration=848583.669s, table=20, n_packets=0, n_bytes=0, idle_age=65534, hard_age=65534, priority=0 actions=resubmit(,22) cookie=0x0, duration=848581.813s, table=22, n_packets=22, n_bytes=924, idle_age=645, hard_age=65534, dl_vlan=1 actions=strip_vlan,set_tunnel:0x44c,output:11 cookie=0x0, duration=848583.621s, table=22, n_packets=12692, n_bytes=4251234, idle_age=6, hard_age=65534, priority=0 actions=drop

通过上面两步就可分析流表中的in_port字段


3、查看mac表项

[root@compute ~]# ovs-appctl fdb/show br-provider port  VLAN  MAC                Age    4     0  00:0c:29:4e:78:de  290    4     0  44:37:e6:75:c8:70  285    4     0  28:f3:66:27:20:90  270    4     0  f4:4d:30:13:6e:29  264    4     0  50:7b:9d:12:40:b1  261    4     0  90:fb:a6:0c:1e:e2  234    4     0  00:24:ac:35:bc:9b  230    4     0  00:24:ac:0e:b6:60  230    4     0  00:24:ac:85:11:11  230    4     0  00:24:ac:ff:fc:0c  230    4     0  00:24:ac:ab:c0:5a  229    4     0  00:24:ac:45:47:02  229    4     0  00:24:ac:36:ef:70  229    4     0  d8:cb:8a:b7:0a:3b  224    4     0  00:0c:29:e6:74:e7  212    4     0  28:f3:66:27:23:34  190    4     0  00:0c:29:96:89:06  172    4     0  00:0c:29:42:ae:11  161    4     0  00:0c:29:32:12:1d  150    4     0  d4:3d:7e:45:4d:ee  144



原创粉丝点击