Munim, I noticed a few errors: - you should include a prerequisite when you match an IPv4 address dl_type=2048 - your IP address is formatted wrong "nw_src":10:0.0.1", - the action type is OUTPUT
This statement worked for me. try it first then add the other fields you want. curl -X POST -d '{"dpid": 1,"table_id": 0,"match":{"dl_type": 2048, "nw_src": "10.0.0.1"},"actions":[{"port":"CONTROLLER","type": "OUTPUT"}]}' http://192.168.2.235:8080/stats/flowentry/add On Sat, Apr 27, 2019 at 9:02 AM Munim Shabir <munim...@hotmail.com> wrote: > > > I have added flow with priority=100 to drop all packets and it is working > fine. > > Now I want to add another flow with higher priority for 10.0.0.1 to > 10.0.0.2 to match and send packets to controller, in short allow the > access. when I use below combination on API it throws as error that port > "CONTROLLER" isn't acceptable. however when I use physical port number 1, 2 > ,3 etc. flows get added. ? > > $ curl -X POST -d '{ > "dpid": 1, > "cookie": 1, > "cookie_mask": 1, > "table_id": 0, > "idle_timeout": 30, > "hard_timeout": 30, > "priority":200 , > "flags": 1, > "match":{ > "nw_src":10:0.0.1", > "nw_dst=10.0.0.2" > > * }, * > > * "actions":[ * > > * { * > > * "type":"OUTPORT", * > > * "port": "CONTROLLER" * > * }* > ] > }' http://localhost:8080/stats/flowentry/add > > > Thanks > Munim > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel