我在mininet上制作了这个拓扑,有两个交换机,主机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请求获取流信息,但当交换机检测到IP(ICMP)消息时,主机仍有ping,并且没有推送MPLS标签。