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

Revision history [back]

click to hide/show revision 1
initial version

asked 2015-02-24 07:03:28 -0700

Nuno gravatar image

REST API - Flows are replaced on switch

Hello. I'm trying to send a flow to the switches matching the ipv4 source and destination address. However, when i try to add a flow that allows packets from S1 to S2 and another from S1 to H1 it replaces me the first flow for the last one. On the xml request im changing the flow ID, so why is this happening ? Basically I'm trying to send a packet with a given source and destination IP to a port that i define according to the current topology.

The first XML request:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <priority>10</priority> <flow-name>S1-S2</flow-name> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.1/24</ipv4-source> <ipv4-destination>10.0.0.2/24</ipv4-destination> </match> <id>7</id> <table_id>0</table_id> <hard-timeout>0</hard-timeout> <idle-timeout>0</idle-timeout> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>2</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> </flow>

The second XML request:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <priority>10</priority> <flow-name>S1-H1</flow-name> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.2/24</ipv4-source> <ipv4-destination>10.0.0.1/24</ipv4-destination> </match> <id>6</id> <table_id>0</table_id> <hard-timeout>0</hard-timeout> <idle-timeout>0</idle-timeout> <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> </flow>

I'm using mininet and ODL HeliumSr2, both with OF13. Another question, to use <ipv4-source>10.0.0.2/24</ipv4-source> is the same as <ipv4-source>10.0.0.0/24</ipv4-source> ? If yes, how can i match a specific IP, because if i simply use <ipv4-source>10.0.0.2</ipv4-source> the controller throws an exception.

Regards, Nuno B.