Re: [Ryu-devel] Ryu with mininet wifi

2018-04-22 Thread IWAMOTO Toshihiro
On Thu, 19 Apr 2018 17:58:21 +0900,
nadia mouawad wrote:
> 
> [1  ]
> [1.1  ]
> hello,
> I have a question about group tables. I am trying to add a group table
> using the following method:
> 
> def send_group_mod(self, datapath,):
> ofproto = datapath.ofproto
> ofp_parser = datapath.ofproto_parser
> port_1 = 3
> queue_1 = ofp_parser.OFPActionSetQueue(0)
> actions_1 = [queue_1, ofp_parser.OFPActionOutput(port_1)]
> port_2 = 2
> queue_2 = ofp_parser.OFPActionSetQueue(0)
> actions_2 = [queue_2, ofp_parser.OFPActionOutput(port_2)]
> weight_1 = 50
> weight_2 = 50
> watch_port = ofproto_v1_3.OFPP_ANY
> watch_group = ofproto_v1_3.OFPQ_ALL
> buckets = [
> ofp_parser.OFPBucket(weight_1, watch_port, watch_group, actions_1),
> ofp_parser.OFPBucket(weight_2, watch_port, watch_group, actions_2)]
> group_id = 50
> req = ofp_parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
> ofproto.OFPGT_SELECT, group_id, buckets)
> datapath.send_msg(req)
> 
> 
> However, when the method is called , the ping stops and no flow rules are
> added to the switch with actions: group:50
> 
> Can you help me to figure out where is the problem?

Did you get any OpenFlow error messages? If not, the group entry
should have been set.
I guess you can use ovs-ofctl dump-groups and dump-group-stats for
debugging.

--
IWAMOTO Toshihiro

--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-19 Thread nadia mouawad
hello,
I have a question about group tables. I am trying to add a group table
using the following method:

def send_group_mod(self, datapath,):
ofproto = datapath.ofproto
ofp_parser = datapath.ofproto_parser
port_1 = 3
queue_1 = ofp_parser.OFPActionSetQueue(0)
actions_1 = [queue_1, ofp_parser.OFPActionOutput(port_1)]
port_2 = 2
queue_2 = ofp_parser.OFPActionSetQueue(0)
actions_2 = [queue_2, ofp_parser.OFPActionOutput(port_2)]
weight_1 = 50
weight_2 = 50
watch_port = ofproto_v1_3.OFPP_ANY
watch_group = ofproto_v1_3.OFPQ_ALL
buckets = [
ofp_parser.OFPBucket(weight_1, watch_port, watch_group, actions_1),
ofp_parser.OFPBucket(weight_2, watch_port, watch_group, actions_2)]
group_id = 50
req = ofp_parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
ofproto.OFPGT_SELECT, group_id, buckets)
datapath.send_msg(req)


However, when the method is called , the ping stops and no flow rules are
added to the switch with actions: group:50

Can you help me to figure out where is the problem?

Thanks in advance,
Nadia

On Wed, Apr 18, 2018 at 7:35 AM, IWAMOTO Toshihiro 
wrote:

> On Sun, 15 Apr 2018 15:30:24 +0900,
> nadia mouawad wrote:
> >
> > [1  ]
> > [1.1  ]
> > Hello,
> > I have another question about making the Ryu controller know about the
> RSSI
> > of the AP ( in mininet-wifi) and take handover decisions. I searched
> about
> > this topic in  the mailing list, but didn't get any clear answer. I want
> to
> > start from a point where the Ryu controller can receive beacons if the
> > signal is going under a certain threshold.
> > Do you have an idea how to do this?
> >
>
> Ryu is about OpenFlow and nothing to do with WiFi signals.
>
> --
> IWAMOTO Toshihiro
>
--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-17 Thread IWAMOTO Toshihiro
On Sun, 15 Apr 2018 15:30:24 +0900,
nadia mouawad wrote:
> 
> [1  ]
> [1.1  ]
> Hello,
> I have another question about making the Ryu controller know about the RSSI
> of the AP ( in mininet-wifi) and take handover decisions. I searched about
> this topic in  the mailing list, but didn't get any clear answer. I want to
> start from a point where the Ryu controller can receive beacons if the
> signal is going under a certain threshold.
> Do you have an idea how to do this?
> 

Ryu is about OpenFlow and nothing to do with WiFi signals.

--
IWAMOTO Toshihiro

--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-14 Thread nadia mouawad
Hello,
I have another question about making the Ryu controller know about the RSSI
of the AP ( in mininet-wifi) and take handover decisions. I searched about
this topic in  the mailing list, but didn't get any clear answer. I want to
start from a point where the Ryu controller can receive beacons if the
signal is going under a certain threshold.
Do you have an idea how to do this?

Thanks in advance,
Nadia

On Thu, Apr 12, 2018 at 8:06 AM, nadia mouawad 
wrote:

> Good morning,
>
> Actually, I was sure about the matching field. And I didn't want to take
> the priority in consideration. My problem
> was solved when i changed this:
>
> mod = parser.OFPFlowMod(datapath=datapath,match=match, cookie=0,command=
> *ofproto_v1_3*.OFPFC_DELETE,out_port=*ofproto_v1_3*.OFPP_ANY,
> out_group=*ofproto_v1_3*.OFPG_ANY, idle_timeout=0,
> hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
> datapath.send_msg(mod)
>
> I don't know if it is because I am using the OpenFlow 1.3 despite the fact
> that I saw several codes examples using OpenFlow 1.3 and using
> ofproto.OFPFC_DELETE.
>
> Anyway thank you for your response.
>
> On Thu, Apr 12, 2018 at 4:34 AM, IWAMOTO Toshihiro 
> wrote:
>
>> On Wed, 11 Apr 2018 23:41:18 +0900,
>> nadia mouawad wrote:
>> >
>> > Good morning,
>> > I have a question concerning deleting flows.  My code is the following:
>> > def del_flow(self, datapath, match):
>> > ofproto = datapath.ofproto
>> > parser = datapath.ofproto_parser
>> > #actions1 = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
>> > ofproto.OFPCML_NO_BUFFER)]
>> > #if actions!=actions1:
>> > mod = parser.OFPFlowMod(datapath=datapath,match=match,
>> > cookie=0,command=ofproto.OFPFC_DELETE,out_port=ofproto.OFPP_ANY,
>> > out_group=ofproto.OFPG_ANY, idle_timeout=0,
>> > hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
>>
>> You are using the non-strict delete command. The priority field
>> (and timeout fields too, IIRC) will be ignored.
>>
>> > datapath.send_msg(mod)
>> > # get buffer from the send queue
>> > #buf = datapath.send_q.get()
>> > # send buffer
>> > #datapath.socket.sendall(buf)
>> > print("delete flow %s",datapath.id ,mod)
>> > """
>> >
>> >
>> > However, when I try to call del_flow, flows are not deleted. Can you
>> help
>> > me fix this problem??
>> >
>>
>> Do you get any errors? I guess the match field isn't matching against
>> your flows.
>>
>> --
>> IWAMOTO Toshihiro
>>
>
>
--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-11 Thread nadia mouawad
 Good morning,

Actually, I was sure about the matching field. And I didn't want to take
the priority in consideration. My problem
was solved when i changed this:

mod = parser.OFPFlowMod(datapath=datapath,match=match, cookie=0,command=
*ofproto_v1_3*.OFPFC_DELETE,out_port=*ofproto_v1_3*.OFPP_ANY,
out_group=*ofproto_v1_3*.OFPG_ANY, idle_timeout=0,
hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
datapath.send_msg(mod)

I don't know if it is because I am using the OpenFlow 1.3 despite the fact
that I saw several codes examples using OpenFlow 1.3 and using
ofproto.OFPFC_DELETE.

Anyway thank you for your response.

On Thu, Apr 12, 2018 at 4:34 AM, IWAMOTO Toshihiro 
wrote:

> On Wed, 11 Apr 2018 23:41:18 +0900,
> nadia mouawad wrote:
> >
> > Good morning,
> > I have a question concerning deleting flows.  My code is the following:
> > def del_flow(self, datapath, match):
> > ofproto = datapath.ofproto
> > parser = datapath.ofproto_parser
> > #actions1 = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
> > ofproto.OFPCML_NO_BUFFER)]
> > #if actions!=actions1:
> > mod = parser.OFPFlowMod(datapath=datapath,match=match,
> > cookie=0,command=ofproto.OFPFC_DELETE,out_port=ofproto.OFPP_ANY,
> > out_group=ofproto.OFPG_ANY, idle_timeout=0,
> > hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
>
> You are using the non-strict delete command. The priority field
> (and timeout fields too, IIRC) will be ignored.
>
> > datapath.send_msg(mod)
> > # get buffer from the send queue
> > #buf = datapath.send_q.get()
> > # send buffer
> > #datapath.socket.sendall(buf)
> > print("delete flow %s",datapath.id ,mod)
> > """
> >
> >
> > However, when I try to call del_flow, flows are not deleted. Can you help
> > me fix this problem??
> >
>
> Do you get any errors? I guess the match field isn't matching against
> your flows.
>
> --
> IWAMOTO Toshihiro
>
--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-11 Thread IWAMOTO Toshihiro
On Wed, 11 Apr 2018 23:41:18 +0900,
nadia mouawad wrote:
> 
> Good morning,
> I have a question concerning deleting flows.  My code is the following:
> def del_flow(self, datapath, match):
> ofproto = datapath.ofproto
> parser = datapath.ofproto_parser
> #actions1 = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
> ofproto.OFPCML_NO_BUFFER)]
> #if actions!=actions1:
> mod = parser.OFPFlowMod(datapath=datapath,match=match,
> cookie=0,command=ofproto.OFPFC_DELETE,out_port=ofproto.OFPP_ANY,
> out_group=ofproto.OFPG_ANY, idle_timeout=0,
> hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)

You are using the non-strict delete command. The priority field
(and timeout fields too, IIRC) will be ignored.

> datapath.send_msg(mod)
> # get buffer from the send queue
> #buf = datapath.send_q.get()
> # send buffer
> #datapath.socket.sendall(buf)
> print("delete flow %s",datapath.id ,mod)
> """
> 
> 
> However, when I try to call del_flow, flows are not deleted. Can you help
> me fix this problem??
> 

Do you get any errors? I guess the match field isn't matching against
your flows.

--
IWAMOTO Toshihiro

--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-11 Thread nadia mouawad
Good morning,
I have a question concerning deleting flows.  My code is the following:
def del_flow(self, datapath, match):
ofproto = datapath.ofproto
parser = datapath.ofproto_parser
#actions1 = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
ofproto.OFPCML_NO_BUFFER)]
#if actions!=actions1:
mod = parser.OFPFlowMod(datapath=datapath,match=match,
cookie=0,command=ofproto.OFPFC_DELETE,out_port=ofproto.OFPP_ANY,
out_group=ofproto.OFPG_ANY, idle_timeout=0,
hard_timeout=0,priority=2,flags=ofproto.OFPFF_SEND_FLOW_REM)
datapath.send_msg(mod)
# get buffer from the send queue
#buf = datapath.send_q.get()
# send buffer
#datapath.socket.sendall(buf)
print("delete flow %s",datapath.id ,mod)
"""


However, when I try to call del_flow, flows are not deleted. Can you help
me fix this problem??

Thanks in advance,


On Mon, Apr 9, 2018 at 5:03 AM, IWAMOTO Toshihiro 
wrote:

> On Fri, 06 Apr 2018 02:43:39 +0900,
> nadia mouawad wrote:
> >
> > [1  ]
> > Okay thank you for your answer.
> >
> > I have another question. I want to notify the controller about an
> upcoming
> > handover ( before it occurs) is there a specific type of message for this
> > notification? How can I achieve this?
>
> Assuming you are talking about OpenFlow controllers,
> searching OpenFlow specs for "role" would give you some info.
> (I'm not an expert here and have no idea how controller roles are
> actually implemented.)
>
> --
> IWAMOTO Toshihiro
>
--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-08 Thread IWAMOTO Toshihiro
On Fri, 06 Apr 2018 02:43:39 +0900,
nadia mouawad wrote:
> 
> [1  ]
> Okay thank you for your answer.
> 
> I have another question. I want to notify the controller about an upcoming
> handover ( before it occurs) is there a specific type of message for this
> notification? How can I achieve this?

Assuming you are talking about OpenFlow controllers,
searching OpenFlow specs for "role" would give you some info.
(I'm not an expert here and have no idea how controller roles are
actually implemented.)

--
IWAMOTO Toshihiro

--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-05 Thread nadia mouawad
Okay thank you for your answer.

I have another question. I want to notify the controller about an upcoming
handover ( before it occurs) is there a specific type of message for this
notification? How can I achieve this?

Thanks in advance,
Nadia


On Wed, Apr 4, 2018 at 6:06 AM, IWAMOTO Toshihiro 
wrote:

> On Mon, 02 Apr 2018 17:18:57 +0900,
> nadia mouawad wrote:
> > I newly started to learn Ryu and I am trying to integrate it with
> > mininet-wifi.
> >
> > This is my topology:
> > def topology():
> > "Create a network."
> > net = Mininet_wifi( controller=RemoteController,
> > accessPoint=OVSKernelAP)
> > print "*** Creating nodes"
> >
> > sta1 = net.addStation( 'sta1', mac='00:00:00:00:00:02', ip='
> 10.0.0.2/8',
> > position='40,40,0' )
> > sta2 = net.addStation( 'sta2', mac='00:00:00:00:00:03', ip='
> 10.0.0.3/8',
> > position='40,50,0')
> >
> > ap1 = net.addAccessPoint( 'ap1', ssid= 'new-ssid1', dpid='1', mode=
> > 'g', channel= '5', position='25,50,0' , range = 120,
> > mac='00:00:00:00:00:04')
> > ap2 = net.addAccessPoint( 'ap2', ssid= 'new-ssid2', dpid='2', mode=
> > 'g', channel= '5', position='50,100,0' , range = 120 ,
> > mac='00:00:00:00:00:05')
> > c0 = net.addController( 'c0' , controller = RemoteController,
> > ip='192.168.110.187')
> >
> >
> > When I try to run gui_topology.py or shortestpath,py  I get the following
> > (repeatable) output:
> >
> > DPSET: Multiple connections from 0001
> > Multiple connections from 0001
> >
> > However, I  can not see the topology or the links.
>
> You seem to be using the same dpid 0001 to make multiple
> connections to ryu. Please read the comment in ryu.controller.dpset
> and fix your code to use unique dpids.
>
> --
> IWAMOTO Toshihiro
>
--
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


Re: [Ryu-devel] Ryu with mininet wifi

2018-04-03 Thread IWAMOTO Toshihiro
On Mon, 02 Apr 2018 17:18:57 +0900,
nadia mouawad wrote:
> I newly started to learn Ryu and I am trying to integrate it with
> mininet-wifi.
> 
> This is my topology:
> def topology():
> "Create a network."
> net = Mininet_wifi( controller=RemoteController,
> accessPoint=OVSKernelAP)
> print "*** Creating nodes"
> 
> sta1 = net.addStation( 'sta1', mac='00:00:00:00:00:02', ip='10.0.0.2/8',
> position='40,40,0' )
> sta2 = net.addStation( 'sta2', mac='00:00:00:00:00:03', ip='10.0.0.3/8',
> position='40,50,0')
> 
> ap1 = net.addAccessPoint( 'ap1', ssid= 'new-ssid1', dpid='1', mode=
> 'g', channel= '5', position='25,50,0' , range = 120,
> mac='00:00:00:00:00:04')
> ap2 = net.addAccessPoint( 'ap2', ssid= 'new-ssid2', dpid='2', mode=
> 'g', channel= '5', position='50,100,0' , range = 120 ,
> mac='00:00:00:00:00:05')
> c0 = net.addController( 'c0' , controller = RemoteController,
> ip='192.168.110.187')
> 
> 
> When I try to run gui_topology.py or shortestpath,py  I get the following
> (repeatable) output:
> 
> DPSET: Multiple connections from 0001
> Multiple connections from 0001
> 
> However, I  can not see the topology or the links.

You seem to be using the same dpid 0001 to make multiple
connections to ryu. Please read the comment in ryu.controller.dpset
and fix your code to use unique dpids.

--
IWAMOTO Toshihiro

--
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