6.10. 监控 OpenFlows

您可以使用 ovs-ofctl dump-flows 命令监控 Red Hat Openstack Platform (RHOSP)网络中逻辑交换机上的 OpenFlow 流。

先决条件

  • 使用 ML2/OVN 作为网络服务(neutron)默认机制驱动程序的 RHOSP 部署。

流程

  1. 以具有访问 OVN 容器所需的权限的用户身份登录到 Controller 主机。

    示例

    $ ssh heat-admin@controller-0.ctlplane

  2. 运行 ovs-ofctl dump-flows 命令。

    示例

    $ sudo ovs-ofctl dump-flows br-int

  3. 检查输出,类似于以下输出。

    输出示例

    $ ovs-ofctl dump-flows br-int
    NXST_FLOW reply (xid=0x4):
     cookie=0x0, duration=72.132s, table=0, n_packets=0, n_bytes=0, idle_age=72, priority=10,in_port=1,dl_src=00:00:00:00:00:01 actions=resubmit(,1)
     cookie=0x0, duration=60.565s, table=0, n_packets=0, n_bytes=0, idle_age=60, priority=10,in_port=2,dl_src=00:00:00:00:00:02 actions=resubmit(,1)
     cookie=0x0, duration=28.127s, table=0, n_packets=0, n_bytes=0, idle_age=28, priority=0 actions=drop
     cookie=0x0, duration=13.887s, table=1, n_packets=0, n_bytes=0, idle_age=13, priority=0,in_port=1 actions=output:2
     cookie=0x0, duration=4.023s, table=1, n_packets=0, n_bytes=0, idle_age=4, priority=0,in_port=2 actions=output:1

其他资源

  • ovs-ofctl --help 命令