[OPNFLWPLUG-664] Failed to add flows with actions ICMP code and type in OF1.3 Created: 29/Mar/16 Updated: 27/Sep/21 Resolved: 18/Jul/16 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Karthik Sivasamy | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 5618 |
| Description |
|
I have been testing with Beryllium SR1 distribution for VTN project, and faced issue while adding flows with action ICMP code and type for OF1.3. That is after adding flows when i verify using dump-flows in mininet actions mod_tp_src and mod_tp_dst are not displayed in OF1.3. But for OF1.0 mod_tp_src and mod_tp_dst are shown in dump-flows. To cross verify, i have tested the above scenario with Openflowplugin Restconf command and faced same issue. Below are the steps i have followed, 1) Configured mininet with sudo mn --topo tree,2 --controller remote,ip=10.106.138.117 --switch ovsk,protocols=OpenFlow10 2) Add flows with action set-tp-dst-action and set-tp-src-action using below command, and response code is success curl -v --user "admin":"admin" -H "Content-type: application/xml" -X PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/134 -d '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <set-tp-dst-action> <port>109</port> </set-tp-dst-action> </action> <action> <order>1</order> <set-tp-src-action> <port>108</port> </set-tp-src-action> </action> <action> <output-action> <output-node-connector>3</output-node-connector> </output-action> <order>2</order> </action> </apply-actions> </instruction> </instructions> <table_id>2</table_id> <id>134</id> <cookie_mask>255</cookie_mask> <match> <ethernet-match> <ethernet-type> <type>0x800</type> </ethernet-type> <ethernet-destination> <address>ff:ff:29:01:19:61</address> </ethernet-destination> <ethernet-source> <address>00:00:00:11:23:ae</address> </ethernet-source> </ethernet-match> <ipv4-source>17.0.0.0/8</ipv4-source> <ipv4-destination>172.168.0.0/16</ipv4-destination> <ip-match> <ip-protocol>1</ip-protocol> </ip-match> <in-port>0</in-port> </match> <cookie>11</cookie> <flow-name>FooXf11</flow-name> <priority>11</priority> </flow>' < HTTP/1.1 200 OK 3) Checked flowentries in mininet for OF1.0 and actions mod_tp_src and mod_tp_dst are applied in node.
I have followed the same above scenario in OF1.3, failed to display flows in mininet. 1)1) Configured mininet with sudo mn --topo tree,2 --controller remote,ip=10.106.138.117 --switch ovsk,protocols=OpenFlow13 2) Add flows with action set-tp-dst-action and set-tp-src-action using below command, and response code is success. Used the same command which i tried for OF1.0, which is above. 3) Checked flowentries in mininet for OF1.3 and but flow is not created. Output is as below,
I would like to know is there any issues in adding flows with actions ICMP code and type. Since the scenario which is working for OF1.0. For your information i have attached karaf.log with TRACE enabled for Openflowplugin. Attached with of_karaf_log.zip file. |
| Comments |
| Comment by Karthik Sivasamy [ 29/Mar/16 ] |
|
Attachment of_karaf_logs.zip has been added with description: Trace Enabled logs for Openflowplugin |
| Comment by Anil Vishnoi [ 30/Mar/16 ] |
|
set-tp-src and set-tp-dst fields are specific to openflow 1.0 switches, these actions were removed from openflow 1.3 spec. For openflow 1.3, please use set-field actions to set any packet header value. |
| Comment by Karthik Sivasamy [ 30/Mar/16 ] |
|
Hi Anil, As you said i have used set-field for icmpv4 actions. Below is the command which i have tried, curl -v --user "admin":"admin" -H "Content-type: application/xml" -X PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:3/table/2/flow/256 -d '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <flow-name>set-field-tcp-src</flow-name> <id>256</id> <cookie_mask>255</cookie_mask> <cookie>101</cookie> <table_id>2</table_id> <priority>2</priority> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <set-field> <icmpv4-match> <icmpv4-type>3</icmpv4-type> <icmpv4-code>1</icmpv4-code> </icmpv4-match> </set-field> </action> </apply-actions> </instruction> </instructions> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.1/32</ipv4-source> <ipv4-destination>10.0.0.3/32</ipv4-destination> <ip-match> <ip-protocol>1</ip-protocol> </ip-match> </match> </flow>' The above command to add flows executed successfully with return code 200. In Dumpflow i have checked flows which are not displayed
Note: Using OVS version 2.3.1 I have captured packets for port 6633 in controller side, and analysed in pcap file in wireshark tool. Here i have Attahced pcap file --> icmp_of13.pcap In attached icmp_of13.pcap file Line 401 which is OFPT_FLOW_MOD , In attahced icmp_of13.pcap file Line 402 OFPT_ERROR, The same above error which i observed in pcap file when i installed flows with ICMP actions using VTN Manager RESTCONF. So, please clarify my query below. b) If the command is correct, is it OFplugin BUG ? Kindly correct me if i missed anything in testing. In Karaf log i have observed below error messages, 2016-03-30 15:59:01,728 | TRACE | OFmsgHarvester-0 | QueueKeeperHarvester | 261 - org.opendaylight.openflowplugin - 0.2.1.Beryllium-SR1 | messageHarvester is about to make a starve sleep |
| Comment by Karthik Sivasamy [ 31/Mar/16 ] |
|
Anil, I have modified the OFPlugin resctconf command by having two different action filed for ICMP code and type. Now i can see in pcap file two actions which contains action Field: Below are the command which i tried to have two different action field for ICMP type and code. curl -v --user "admin":"admin" -H "Content-type: application/xml" -X PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:3/table/2/flow/256 -d '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <flow-name>set-field-tcp-src</flow-name> <id>256</id> <cookie_mask>255</cookie_mask> <cookie>101</cookie> <table_id>2</table_id> <priority>2</priority> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <set-field> <icmpv4-match> <icmpv4-type>3</icmpv4-type> </icmpv4-match> </set-field> </action> <action> <order>1</order> <set-field> <icmpv4-match> <icmpv4-code>1</icmpv4-code> </icmpv4-match> </set-field> </action> </apply-actions> </instruction> </instructions> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.1/32</ipv4-source> <ipv4-destination>10.0.0.3/32</ipv4-destination> <ip-match> <ip-protocol>1</ip-protocol> </ip-match> </match> </flow>' The same BAD_ACTION and BAD_SET_ARGUMENT error we had seen in pcap file while testing using VTN Manger restconf to add ICMP codee and type. But in VTN manager karaf log we didnt see any issue regarding adding flows. So to cross check we tested using OFPlugin to know the issues. I would like to know the issue is in "OVS" or openflowplugin. please let me know what is the actual reason for the failure. Attached karaf logs and pcap file in OF13_FLOW_ICMP.zip |
| Comment by Karthik Sivasamy [ 31/Mar/16 ] |
|
Attached zip file OF13_FLOW_ICMP.zip which has, OF_ICMP.pcap --> pcap file which i have captured while using OpenFlowPlugin restconf command to test with ICMP code and type. VTN_ICMP.pcap --> pcap file which i have captured while using VTN Manager restconf command to test with ICMP code and type. Trace enabled karaf logs. In which i have observed error message in karaf.log.3. |
| Comment by Karthik Sivasamy [ 31/Mar/16 ] |
|
Attachment OF13_FLOW_ICMP.zip has been added with description: OFPlugin and VTN pcap file and Karaf logs |
| Comment by Karthik Sivasamy [ 14/Jul/16 ] |
|
Bug Verification : Tested with Beryllium SR2 dsitro to check/verify ICMP code and type are added in flowentries with OFplugin. Since ICMP code and type are not supported in ovs2.3.0 for OF1.3 Issue is not reproduced. Now i can see in flowentries created with ICMP code and type actions successfully. Below are the command which i tried to have two different action field for ICMP type and code. And i followed the same steps which i tested earlier when i got issue. 1) Configured mininet with sudo mn --topo tree,2 --controller remote,ip=10.106.138.117 --switch ovsk,protocols=OpenFlow13 2) Add flows with action set-tp-dst-action and set-tp-src-action using below command, and response code is success. curl -v --user "admin":"admin" -H "Content-type: application/xml" -X PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:3/table/2/flow/256 -d '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <flow-name>set-field-tcp-src</flow-name> <id>256</id> <cookie_mask>255</cookie_mask> <cookie>101</cookie> <table_id>2</table_id> <priority>2</priority> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <set-field> <icmpv4-match> <icmpv4-type>3</icmpv4-type> </icmpv4-match> </set-field> </action> <action> <order>1</order> <set-field> <icmpv4-match> <icmpv4-code>1</icmpv4-code> </icmpv4-match> </set-field> </action> </apply-actions> </instruction> </instructions> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-source>10.0.0.1/32</ipv4-source> <ipv4-destination>10.0.0.3/32</ipv4-destination> <ip-match> <ip-protocol>1</ip-protocol> </ip-match> </match> </flow>' In Mininet i can see actions "ICMP code and type" changes: Mininet Flowentries Output: Here in below output in switch s3 you can see ICMP type and code entries. mininet> dpctl dump-flows
====================================================================== |