我在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 Created并且我可以通过邮递员GET请求获得流信息,但是当交换机检测到IP(ICMP)消息时,主机仍然具有ping并且没有推送MPLS标签 .
1 回答
流程是否出现在运营商店中?只需在GET中将'config'更改为'operational'即可验证流程是否存在 .
是否在OVS上配置了流量(ovs-vsctl dump-flows ...)?