0

I'm very new to sdn and virtualization world
after a lot of headache, I finally could do a successful GET request to
http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes
but when I tried to add flows it never works.
the problem is that most of the actual useful docs or links are either for older releases which still use

  1. old features
  2. old urls like restconf/...

either the links are just broken, and the official documentation is not very beginner-friendly.
however I tried:

if I send to http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/table=0/flow=1
via put or post it says:

"error-tag": "data-missing",
 "error-message": "Schema for '(urn:opendaylight:inventory?revision=2013年08月19日)table' not found"

if I send to http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=1
via put it says:
500 Server Error
via post it says :

"error-tag": "malformed-message",
 "error-info": "Schema node with name in_port was not found under (urn:opendaylight:flow:inventory?revision=2013年08月19日)match.",
 "error-message": "Error parsing input: Schema node with name in_port was not found under (urn:opendaylight:flow:inventory?revision=2013年08月19日)match."

I did on the parameter "in_port" :

"match": {
 "in_port": "openflow:1:1",

I tried to send to that link first because I saw it somewhere on stack exchange
second because I at least could access http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0 and see its content on the browser

I know I'm lacking a lot and it might look like a mess to you, but I really am very new to this but I need to configure flow rules as soon as possible,I keep looking everywhere but it's really hard to get this without a good background on networking, please help and thanks in advance.

if I need to add more information like what features did I install, and how much nodes are there please tell me to add it.

asked May 12, 2024 at 20:15

2 Answers 2

0

BTW, there is a new guide that describes how to configure OpenDaylight and add flows for an SDN network. You may find it here:

http://repositorioinstitucional.uaslp.mx/xmlui/handle/i/8772

answered Sep 4, 2024 at 14:15
Sign up to request clarification or add additional context in comments.

1 Comment

sorry, I've just noticed you, can't thank you enough as you answered when nobody else did anywhere. even tho it's too late for my needs. however the problem here was because of "in_port" instead of "in-port" and other problem was because of the wrong endpoint which was provided in the original documentation (didn't check if they corrected it now). thank you again. if anybody else need help about using openflow in odl feel free to reach me here, I learnt a couple of things I may be able to help.
0

To add a flow in ODL, it is necessary to define the flow in a JSON or XML file and to provide the instruction where the flow needs to be installed. For example, if you want to add flow 12, at table 0 in node openflow:1 and the flow is defined at file myflow12.json, you may use the following instruction:

curl -u admin:admin -X PUT -d "@myflow12.json" -H "Content-Type: application/json" http://127.0.0.1:8181/rests/data/opendaylight-inventory:nodes/node=openflow:1/flow-node-inventory:table=0/flow=12

Additionally, you need to provide the myflow12.json file with flow instructions. An example of a flow that instructs openflow:1 to flood all packets received at port 3 would be:

{
 "flow": [
 {
 "table_id": 0,
 "id": "12",
 "priority": "1001",
 "match": {
 "in-port": "openflow:1:3"
 },
 "instructions": {
 "instruction": [
 {
 "order": 0,
 "apply-actions": {
 "action": [
 {
 "order": 0,
 "output-action": {
 "output-node-connector": "FLOOD"
 }
 }
 ]
 }
 }
 ]
 }
 }
 ]
}

Notice that table_id and id (flow id) match the restconf instruction.

answered Jul 2, 2024 at 17:54

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.