0

I have made this topology on mininet, with 2 switches and the host h1 conected to one switch and h2 conected to the other.

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

With Postman and ODL, I am pushing this flow to one of the switches with the objebtive of pushing a MPLS label when h1 ping h2.

<?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>

The post request was 201 Created andI can get the flow information with a postman GET request, but the hosts still having ping and there is no MPLS label pushed when the switch detect the IP(ICMP) messages.

1 Answers1

1

Is the flow showing up in the operational store? just change 'config' to 'operational' in the GET you are doing to verify the flow is there.

Is the flow configured on the OVS (ovs-vsctl dump-flows ...)?

jamo
  • 742
  • 1
  • 4
  • 5
  • No, I can´t see it with ovs-vsctl dump-flows and I can´t see if I make an operational GET. – Juan Andrés Martinez Apr 20 '18 at 21:35
  • ok, that is the main problem then. you are not really programming your switch(es) with any flows. you need to debug it from that perspective. Are your switch(es) connected? Do you see any clues in karaf.log? – jamo Apr 24 '18 at 02:50