SD-WAN

 View Only
  • 1.  Unable to delete specific flows(openflow version-1.3)

    Posted Jun 09, 2014 07:28 AM

    I am using hp 2920-24G(J9726A) switch with oft controller, i am able to write the flows on the switch successfully but when i want to delete the flow with specific out_port and table_id it is not getting deleted. Although all the flows get deleted when i specify table_id only.

     

    The software for openflow 1.3 installed on the switch is WB 15.14.0002.

    i have also tried with "dpctl" to add and delete flow.

    Command to add the flow given was "dpctl tcp:192.168.3.140:6635 flow-mod table=200,cmd=add in_port=5actions=output:9". This adds the flow on switch.

    But when try to delete the flow with specific parameters like table_id and output port then it is not getting deleted. Although all flows are deleted with that table_id.

    dpctl tcp:192.168.3.140:6635 flow-mod table=200,cmd=del

     

    Is there any command to delete the flow from switch's cli?

     

     

    Thanks and regards
    Chhavi Kant



  • 2.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jun 13, 2014 08:53 AM

    As for deleting flows from the switch, there doesn't appear a way to delete a specific flow.

    There are only configuration commands to disable/enable openflow instances.

     

    Disabling and then enabling an instance would delete all of the flows.

     

    In case you wanted to pursue deleting just one flow at a time, have you tried the CURL command(s).

     

    It would be something like this:

     

    curl -sk -H "X-Auth-Token:$token" -X DELETE -H 'Content-Type:application/json' https://15.234.166.46:8443/sdn/v2.0/of/datapaths/$dpid/flows -d @flow.json

     

    where

     

    flow.json has the following:

     

    {"flow": {
    "byte_count": 0,
    "cookie": "0x0",
    "duration_nsec": 845000000,
    "duration_sec": 323,
    "flow_mod_flags": [],
    "hard_timeout": 0,
    "idle_timeout": 0,
    "instructions": [
    {
    "write_actions": [
    {
    "output": 25
    }
    ]
    }
    ],
    "match": [
    {
    "eth_type": "arp"
    }
    ],
    "packet_count": 0,
    "priority": 30000,
    "table_id": 200
    }
    }

     

    which is the exact same JSON script used for creating the flow.

     

    Let me know if you need a full example of creation/deletion using CURL.

     

     



  • 3.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jun 17, 2014 01:55 PM

    Hello Chhavi Kant,

     

    Doing a follow up to check if you need any further assistance with respect to the query posted.

    Did you try curl command as suggested in earlier post?

    Please do let us know  if your problem is solved.

     

    If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.

     

     

    Thanks

    HP SDN Team



  • 4.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jun 23, 2014 06:49 AM

    Hi , Can you provide me with the complete script for the same to test the flow deletion on the switch.

     

    Thank you



  • 5.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jun 24, 2014 05:21 AM

    Hi ScottReeve,

     

    Thanks for your response, but i am new to curl commands for inserting and deleting flows on switch.

     

    Could you please show the commands to install a particular flow and then delete the same.



  • 6.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jul 07, 2014 02:34 PM

    Hello Chhavi Kant,

     

    To add a flow you can also use REST API [REST API document page 62]

    However below are the commands – here token is already exported

    To add a flow- 

    Format is  curl -sk -H "X-Auth-Token:$token" -X POST -H ‘Content-Type:application/json’ -d @flow.json  https://Controller_IP:8443/sdn/v2.0/of/datapaths/$dpid/flows

     

    To delete the flow-

    Format is curl -sk -H "X-Auth-Token:$token" -X DELETE -H 'Content-Type:application/json' https://Controller_IP:8443/sdn/v2.0/of/datapaths/$dpid/flows -d '{"flow":{"priority":30000,"table_id":0,"idle_timeout":0,"match":[{"eth_src":"00:10:94:00:00:01"},{"eth_dst":"00:10:94:00:00:09"},{"eth_type":"ipv6"}],"instructions":[]}}'

     

    e.g.

    $curl -sk -H "X-Auth-Token:$token" -X DELETE -H 'Content-Type:application/json' https://Controller_IP:8443/sdn/v2.0/of/datapaths/0bb8d07e283eb7d0 /flows -d @flow.json

     

    Here flow.json is the json file.

     

    Please let us know if this helps.

     

    Thanks,

    HP SDN Team



  • 7.  RE: Unable to delete specific flows(openflow version-1.3)

    Posted Jun 19, 2014 04:34 AM

    HI HP-SDN Team,

     

    Im not able to delete a specific flow from HP_VAN controller.

    COntroller version used is:2.0.0.4253( Trial Version)

    Curl Command used is: curl -Lk -v -DELETE --header "X-Auth-Token: bf9ad321555f41e4852e2ce7fa31a450 " --header Content-Type:application/json  -d '{"flow": {"priority": 7779,"table_id": 0,"idle_timeout": 60,"hard_timeout": 60,"cookie": "0xf","out_port" :12","flow_mod_cmd": "delete","match": [{"eth_type": "ipv4"}]}}' --url " https:// 127.0.0.1:8443/sdn/v2.0/of/datapaths/$dpid/flows"

     

    Switch used: Openflow reference switch(v1.3)

     

    Controller Logs:

    * upload completely sent off: 153out of 153 bytes
    < HTTP/1.1 400 Bad Request
    < Server: Apache-Coyote/1.1
    < X-FRAME-OPTIONS: deny
    < Access-Control-Allow-Origin: *
    < Access-Control-Allow-Methods: GET, POST, PUT, HEAD, PATCH
    < Access-Control-Allow-Headers: Content-Type, Accept, X-Auth-Token
    < Content-Type: application/json
    < Transfer-Encoding: chunked
    < Date: Thu, 19 Jun 2014 05:03:45 GMT
    < Connection: close
    <
    * Closing connection #0
    * SSLv3, TLS alert, Client hello (1):
    {"error":"java.lang.IllegalArgumentException","message":"Bad command"}=== Flow Tables for each = 00:00:00:00:00:00:01:11

     

     

    Am i missing something here, Kindly help us to know. Your response would help me out in my observation.