Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

Flow rule get replaced after adding new rule

asked 2016-09-11 07:46:19 -0800

baila gravatar image

Hi all, I am very much confused with this issue. I have one Mininet switch and ODL controller. If i push a flow rule for the first time, it is added properly. But if i add another flow rule, it is replacing the old rule. Please help. I am sharing my 2 flow rules.

<table xmlns="urn:opendaylight:flow:inventory">
<id>0</id>
<flow>
    <id>1</id>
    <instructions>
        <instruction>
        <order>0</order>
        <apply-actions>
            <action>
            <order>0</order>
            <output-action>
                <output-node-connector>1</output-node-connector>
            </output-action>
        </action>
        </apply-actions>
        </instruction>
    </instructions>
    <match>
    <ethernet-match>
        <ethernet-type>
            <type>2048</type>
        </ethernet-type>
    </ethernet-match>
    <ipv4-source>192.168.1.10/32</ipv4-source>
    </match>
    <hard-timeout>0</hard-timeout>
    <priority>11</priority>
    <table_id>0</table_id>
    <idle-timeout>0</idle-timeout>
</flow>

and another is :

<table xmlns="urn:opendaylight:flow:inventory">
<id>0</id>
<flow>
    <id>2</id>
    <instructions>
        <instruction>
        <order>0</order>
        <apply-actions>
            <action>
            <order>0</order>
            <output-action>
                <output-node-connector>3</output-node-connector>
            </output-action>
        </action>
        </apply-actions>
        </instruction>
    </instructions>
    <match>
    <ethernet-match>
        <ethernet-type>
            <type>2048</type>
        </ethernet-type>
    </ethernet-match>
    <in-port>1</in-port>
    </match>
    <hard-timeout>0</hard-timeout>
    <priority>10</priority>
    <table_id>0</table_id>
    <idle-timeout>0</idle-timeout>
</flow>

Thanks in advance.

edit retag flag offensive close merge delete

Comments

What are the URL you're using to perform the add flow operation?

adetalhouet ( 2016-10-21 09:43:15 -0800 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-09-11 10:16:02 -0800

baila gravatar image

If we mention the table in the xml, it will replace the old flow rule. Use of flow only maintains all flow rules as desired.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-09-11 07:46:19 -0800

Seen: 20 times

Last updated: Sep 11 '16