Ask Your Question
1

Change MAC address: rest Api and body of request

asked 2015-09-26 00:30:32 -0700

sanjaykumar2891987 gravatar image

I am using ODL ontroller, and OVS. I am able to add flows (like packet drop, forward etc on selected MAC) etc..to the Controller, and the flows are updated on the OVS. Now, I am trying to add a new flow with action to modify the destination MAC address.

What is the REST API to do that and what is the exact body of that request? I searched in the given examples at this page: https://wiki.opendaylight.org/view/EditingOpenDaylightOpenFlowPlugin:EndtoEndFlows:Example_Flows but not able to find any such example. Any help in this regard is appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-10-01 12:13:00 -0700

arthurc gravatar image

Here's a trimmed Preview of a flow created via the Dlux YANG UI interface that rewrites the destination MAC address and outputs it to a port. Hopefully this helps point you in the right direction:

http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/flow-node-inventory:table/2
{
    "id": "2",
    "flow": [
        {
            "id": "0",
            "match": {
                "in-port": "1",
                "ethernet-match": {
                    "ethernet-destination": {
                        "address": "aa:bb:cc:dd:ee:ff"
                    }
                },
            },
            "instructions": {
                "instruction": [
                    {
                        "order": "0",
                        "apply-actions": {
                            "action": [
                                {
                                    "order": 1,
                                    "set-dl-dst-action": {
                                        "address": "01:02:03:04:05:06"
                                    }
                                },
                                {
                                    "order": "0",
                                    "output-action": {
                                        "output-node-connector": "2",
                                        "max-length": "65535"
                                    }
                                }
                            ]
                        }
                    }
                ]
            },
            "priority": "0",
            "table_id": "2"
        }
    ]
}
edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2015-09-26 00:30:32 -0700

Seen: 232 times

Last updated: Oct 01 '15