Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

1

Create flow to remove (override) forwarding rules

asked 2015-06-09 11:26:08 -0800

jpete2477 gravatar image

updated 2015-06-11 11:34:11 -0800

I'm new to this but I seem to be having an unusually difficult time figuring out how to create a flow to drop all traffic. I recently migrated from Hydrogen to Helium and I'm trying to get the same functionality that I have in Hydrogen to also happen in Helium. I'm using the MD-SAL northbound api to create the flow. It will show up in the config data store but does not show up in the operational data store and does not block the traffic.

Here's the url I'm posting (put) to:

http://admin:admin@localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1

And here's the json I'm providing:

{"flow":{"flow-name":"BlockFlow:1","id":"1","priority":"500","table_id":"0","instructions":{"instruction":{"order":"0","apply-actions":{"action":{"order":"0","drop":null}}}},"match":{"ethernet-match":{"ethernet-type":{"type":"2048"}},"ipv4-destination":"10.0.0.2\/24"}}}

I get a 200 response code for the request.

A get to:

http://admin:admin@localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1

Gives me this json:

{"flow-node-inventory:flow":[{"id":"1","priority":500,"instructions":{"instruction":[{"order":0,"apply-actions":{"action":[{"order":0}]}}]},"match":{"ethernet-match":{"ethernet-type":{"type":2048}},"ipv4-destination":"10.0.0.2/24"},"table_id":0,"flow-name":"BlockFlow:2"}]}

A get to:

http://admin:admin@localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1

returns a 404 response code.

I'll admit I don't fully grasp the difference between config and operational and why the flow doesn't have any affect. (It also doesn't show up in mininet where I'm doing all this.)

Thanks in advance for any help or nods in the right direction.

edit retag flag offensive close merge delete

Comments

hi, i want do the same drop packet rule with yours, have you able to add that rule via opendaylight helium? may i know that? thank you

ryandahp ( 2015-11-12 18:17:01 -0800 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-09 08:50:16 -0800

jpete2477 gravatar image

updated 2015-07-09 08:50:46 -0800

As a follow up to this - the problem wasn't with any of the requests that I was making. They actually worked. The problem was with the fact that ODL wasn't talking to MiniNet correctly. Installing the correct set of features allowed ODL to talk to MiniNet correctly and everything started working.

# feature:install odl-l2switch-switch-ui

Thanks to jamoluhrsen for the info on this one

https://ask.opendaylight.org/question/2902/unable-to-add-flows-in-opendaylight-helium-using-rest-nor-using-dlux-ui/#4222

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-06-09 11:26:08 -0800

Seen: 837 times

Last updated: Jul 09 '15