Hi, Fahmy
----
1) What other apps should I initialize with my ryu-manager (other than
ryu.app.otctl_rest) so that the controller deals with ARP requests in
the beginning for example without installing any actual flow forwarding
rules (i.e. h1 cannot ping h4 until I add in all dedicated switches the
correct flow rules (see previous email))
You have to install flow rules which instructs to pass ARP packets to
switches.
I think there are two ways to do this:
* Installing flow rules to every switch in advance
* Make and run an application, which installs flow rules when it
receives a Packet-In message from switches.
For the latter, you might find some clues from Ryu-Book:
https://osrg.github.io/ryu-book/en/html/switching_hub.html
(FYI, if you want to match ARP packets, dl_type" must be specified to 2054.
For details, please see "3.4 Matching" in this specification:
https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-spec-v1.0.0.pdf)
----
2) I was also wondering if there is a way to control the hosts and nor
only the switches (I am using mininet). For example let's say I have
host h1 that is connected to both s1 and s2 and when h1 pings h4 I want
it to pass by s1 and not s2. My solution was to only add forwarding
rules in s1 and not s2, is that enough?
Yes, I think it is enough.
However, how about making a topology that h1 is not connected to s2?
By using Python API, you can make a topology as you want :)
https://github.com/mininet/mininet/wiki/Introduction-to-Mininet#working-with-mininet
Thanks,
Fujimoto
On 2017年04月26日 18:59, Fahmy Sherif Alaa Salaheldin wrote:
Sorry to bother you again! But I would basically like to only add
forwarding rules for flows as you saw in my previous mail.
But when I am testing it out now ping get stuck at ARP requests.
1) What other apps should I initialize with my ryu-manager (other than
ryu.app.otctl_rest) so that the controller deals with ARP requests in
the beginning for example without installing any actual
flow forwarding rules (i.e. h1 cannot ping h4 until I add in all
dedicated switches the correct flow rules (see previous email))
2) I was also wondering if there is a way to control the hosts and nor
only the switches (I am using mininet). For example let's say I have
host h1 that is connected to both s1 and s2 and when h1 pings h4 I
want it to pass by s1 and not s2. My solution was to only add
forwarding rules in s1 and not s2, is that enough?
Thank you in advance,
I apologize if the questions seem stupid but I am pretty new to this,
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
<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
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
------------------------------------------------------------------------------
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