添加了 ODL 流程但没有生效

ODL flow added but doesn´t making effect

我在 mininet 上做了这个拓扑,有 2 个交换机,主机 h1 连接到一个交换机,h2 连接到另一个。

sudo mn --mac --controller,remote,ip=xx.xx.xx.xx --topo=linear,2 --switch=ovsk,datapath=user

使用 Postman 和 ODL,我将此流程推送到其中一台交换机,目的是在 h1 ping h2 时推送 MPLS 标签。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>push-mpls-action</flow-name>
<instructions>
<instruction>
    <order>3</order>
    <apply-actions>
        <action>
            <push-mpls-action>
                <ethernet-type>34887</ethernet-type>
            </push-mpls-action>
            <order>0</order>
        </action>
        <action>
            <set-field>
                <protocol-match-fields>
                    <mpls-label>27</mpls-label>
                </protocol-match-fields>
            </set-field>
            <order>1</order>
        </action>
        <action>
            <output-action>
                <output-node-connector>2</output-node-connector>
            </output-action>
            <order>2</order>
        </action>
    </apply-actions>
    </instruction>
</instructions>
<strict>false</strict>
<id>100</id>
<match>
<ethernet-match>
    <ethernet-type>
        <type>2048</type>
    </ethernet-type>
  </ethernet-match>
</match>
<idle-timeout>0</idle-timeout>
<cookie_mask>255</cookie_mask>
<cookie>401</cookie>
<priority>8</priority>
<hard-timeout>0</hard-timeout>
<installHw>false</installHw>
<table_id>0</table_id>
</flow>

post 请求已创建 201,我可以使用 postman GET 请求获取流信息,但主机仍然可以 ping,并且当交换机检测到IP(ICMP) 消息。

流量是否出现在运营商店中?只是改变 'config' 到您正在执行的 GET 中的 'operational' 以验证流程是否存在。

是否在OVS上配置了流程(ovs-vsctl dump-flows ...)?