Hi, 

I think that the curl command has two mistakes as follows.

 1) syntax error
    
    Please correct commands as follows.

before:

>      "actions":[
>          {
>              "type":"OUTPUT",
>              "port": 4,
>              "type":"DEC_NW_TTL"
>          }

after:

     "actions":[
        {"type":"DEC_NW_TTL"},
        {"type":"OUTPUT","port":4}
     ]

    FYI, how to use "stats/flowentry/add" is described in following document.
    http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#add-a-flow-entry

 2) Error in match    

    "6.4 Flow Table Modification Messages" of OF1.3.4spec says: 
        set TTL action with a match wildcarding the Ethertype, 
        the switch may optionally reject the flow mod and immediately return 
        an ofp_error_msg with OFPET_BAD_ACTION type and 
OFPBAC_MATCH_INCONSISTENT code.

For example, following curl command works fine in my environment.

curl -X POST -d '{
     "dpid": 1,
     "cookie": 1,
     "cookie_mask": 1,
     "table_id": 0,
     "idle_timeout": 3600,
     "hard_timeout": 3600,
     "priority": 0,
     "flags": 1,
     "match":{
         "in_port": 1,
         "eth_type": 2048
     },
     "actions":[
        {"type":"DEC_NW_TTL"},
        {"type":"OUTPUT","port":4}
     ]
  }' http://localhost:8080/stats/flowentry/add

thanks,


On 2015年10月24日 05:16, Andre Schütze wrote:
> Hello ryu-devel-mailinglist,
> 
> I use Mininet with a custom topology and the RYU-REST controller 
> "ofctl-rest.py". After installing some flowentries in the switches, 
> sending some packets over the network and capturing traffic I recognize 
> that the switches do not decrease the ttl - field in the ip - layer. I 
> figure out that i have to tell the switches to decrease the ttl field 
> (this is possible since OpenFlow - version 1.1). To do so I try the line 
> "type": "DEC_NW_TTL", but it does not work. My compleate command look 
> like this:
> 
> curl -X POST -d '{
>      "dpid": 1,
>      "cookie": 1,
>      "cookie_mask": 1,
>      "table_id": 0,
>      "idle_timeout": 3600,
>      "hard_timeout": 3600,
>      "priority": 0,
>      "flags": 1,
>      "match":{
>          "in_port": 1
>      },
>      "actions":[
>          {
>              "type":"OUTPUT",
>              "port": 4,
>              "type":"DEC_NW_TTL"
>          }
>      ]
>   }' http://localhost:8080/stats/flowentry/add
> 
> What do I wrong? How do I have to modify the comand to let the switch 
> reduce ttl? Please help me.
> Thank you in advance.
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to