Thanks san. Yep I wanted for destination mac and this worked!
On 5/28/15, 12:13 AM, "Yusuke Iwase" <[email protected]> wrote: >Hi Ashok, > >On 2015年05月28日 15:32, Ashok Jude wrote: >> >> Hi All, >> >> I am looking for the curl syntax to do mac rewrite action. Can someone >> help. >> I looking to change the incoming DMAC to different MAC on egress. > >Does DMAC mean destination MAC Address? >If so, how about the followings? > >$ curl -X POST -d '{ >> "dpid": 1, >> "match": {"in_port": 1}, >> "actions":[ >> { >> "type": "SET_FIELD", >> "field": "eth_dst", >> "value": "aa:bb:cc:11:22:33" >> }, >> { >> "type": "OUTPUT", >> "port": 2 >> } >> ] >> }' http://localhost:8080/stats/flowentry/add >$ >$ >$ curl -X GET http://localhost:8080/stats/flow/1 | jq . > % Total % Received % Xferd Average Speed Time Time Time >Current > Dload Upload Total Spent Left >Speed >100 293 100 293 0 0 54653 0 --:--:-- --:--:-- --:--:-- >58600 >{ > "1": [ > { > "match": { > "in_port": 1 > }, > "flags": 0, > "table_id": 0, > "duration_sec": 10, > "priority": 0, > "actions": [ > "SET_FIELD: {eth_dst:aa:bb:cc:11:22:33}", > "OUTPUT:2" > ], > "idle_timeout": 0, > "cookie": 0, > "packet_count": 0, > "hard_timeout": 0, > "byte_count": 0, > "length": 104, > "duration_nsec": 4.78e+08 > } > ] >} > >The available keywords for "field" in SET_FIEL actions is the same as the >match field. >Please refer to the Ryu-Documentation. > >http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#description-of-ma >tch-on-request-messages > >Thanks, >Iwase > >> >> Ashok >> >> >> >>------------------------------------------------------------------------- >>----- >> _______________________________________________ >> 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
