?Thank you very much Fujimoto! It worked perfectly I am trying to find out why 
pings on mininet are not working but Thanks again!!


Best,

Sherif

________________________________
De : Fujimoto Satoshi <satoshi.fujimo...@gmail.com>
Envoyé : mercredi 26 avril 2017 03:27
À : Fahmy Sherif Alaa Salaheldin; ryu-devel@lists.sourceforge.net
Objet : Re: [Ryu-devel] RYU INQUIRIES

Hi, Fahmy

"match" must be a dict, so the following command will be accepted.
        curl -H "Content-Type: application/json" -X POST -d '{"dpid": 2, 
"cookie": 42, "priority": 45000, "match": {"nw_src": 
"10.0.0.1","nw_dst":"10.0.0.4"}, "actions": [{"type":"OUTPUT", "port": 4}]}' 
http://localhost:8080/stats/flowentry/add

---

FYI, this rule will not be registered to your switch, because "dl_type" is not 
specified.
In OpenFlow 1.0, "dl_type" must be specified to 2048 if you want to match 
packets with "nw_src" and "nw_dst".
The following command will be work well:
        curl -H "Content-Type: application/json" -X POST -d '{"dpid": 2, 
"cookie": 42, "priority": 45000, "match": {"nw_src": 
"10.0.0.1","nw_dst":"10.0.0.4","dl_type": 2048}, "actions":[{"type":"OUTPUT", 
"port": 4}]}' http://localhost:8080/stats/flowentry/add


Thanks,
Fujimoto

On 2017?04?26? 01:58, Fahmy Sherif Alaa Salaheldin wrote:

Good Evening?,


I am currently using RYU for a proof on concept for my master thesis and I am 
facing a problem:


When i intialize tyu-manager with just the ryu.app.ofctl_rest I try to curl 
some rules and for some reason if I try to match more than one field it doesn't 
work and tells me Attribute Error!


For example this works: ( Match IP source)


curl -H "Content-Type: application/json" -X POST -d '{"dpid": 2, "cookie": 42, 
"priority": 45000, "match": {"nw_src": "10.0.0.1"}, "actions": 
[{"type":"OUTPUT", "port": 4}]}' http://localhost:8080/stats/flowentry/add


While this DOES NOT: (? Match IP source AND DESTINATION)


curl -H "Content-Type: application/json" -X POST -d '{"dpid": 2, "cookie": 42, 
"priority": 45000, "match": [{"nw_src": "10.0.0.1","nw_dst":"10.0.0.4"}], 
"actions": [{"type":"OUTPUT", "port": 4}]}' 
http://localhost:8080/stats/flowentry/add


DOES THAT MEAN RYU CONTROLLER CAN ONLY MATCH ONE FIELD?? THANK YOU


Thanks in advance,

Best,

Sherif



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net<mailto:Ryu-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/ryu-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to