Re: [Ryu-devel] Spliting flows through two ports

2018-04-04 Thread Jose Carlos Ferreira de Melo Junior
You mean;
- With OFPGT_ALL, group action works as expected
- But with OFPGT_SELECT, group action does not work
right?
*Yes that's exactly what is happening.*

I will check the specification of Open V Switch

and I will let you know any thing.

Thanks



2018-04-03 2:09 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> You mean;
> - With OFPGT_ALL, group action works as expected
> - But with OFPGT_SELECT, group action does not work
> right?
>
> If group and flow entries are installed as expected, it means this problem
> is
> not on Ryu (Controller) side, but I guess it is on your switch spec. Please
> confirm your switch supports OFPGT_SELECT on group table.
>
> Thanks,
> Iwase
>
>
> On 2018年04月03日 02:25, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hey Iwase,
>>
>> Good news  it's working although I couldn't really divide the flow.
>>
>> Here's what happened.
>>
>> The flow went to two ports of the switch but the flow is replicated on
>> the port 2 and 3.
>>
>>   in that case making the same bandwidth go on the port 2 and 3.
>>
>>
>> I used both *weight* variable as *0* and *ofp.OFPGT_ALL*
>>
>>  queue_1 = _parser_.OFPActionSetQueue(0)
>>  actions_1 = [queue_1, _parser_.OFPActionOutput(3)]
>>
>>
>>  queue_2 = _parser_.OFPActionSetQueue(0)
>>  actions_2 = [queue_2, _parser_.OFPActionOutput(2)]
>>
>> *weight_1 = 0*
>> *weight_2 = 0*
>>  watch_port = ofproto_v1_3.OFPP_ANY
>>  watch_group = ofproto_v1_3.OFPQ_ALL
>>
>>  req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
>> *ofp.OFPGT_ALL*,
>>  group_id, buckets)
>>
>>
>>
>> I would like to divide the flow in a  way that in port 2 have 50% of the
>> band and port 3 also have 50% of the band.
>> I changed the *weight* value to *50* and used *ofp.OFPGT_SELECT* but it
>> didn't work
>>
>>
>>
>> 2018-04-01 23:09 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>> Hi Carlos,
>>
>>  > *match = _parser_.OFPMatch(ipv4_src="192.168.2.2",
>> ipv4_dst="192.168.1.1")*
>>
>> This rule does not follow "7.2.3.6 Flow Match Field Prerequisite" in
>> the
>> OpenFlow Spec 1.3.5, I guess. See the OpenFlow Spec for more details.
>> Then, please confirm your flow entries are installed on your switch
>> like
>> "ovs-ofctl dump-flows s1".
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2018年04月02日 10:36, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hey Iwase,
>>
>> Right now my code looks like this OFPActionGroup is in Red
>>
>> *port_1 = 3*
>> *queue_1 = _parser_.OFPActionSetQueue(0)*
>> *actions_1 = [queue_1, _parser_.OFPActionOutput(4)]*
>> *
>> *
>> *
>> *
>> *port_2 = 2*
>> *queue_2 = _parser_.OFPActionSetQueue(0)*
>> *actions_2 = [queue_2, _parser_.OFPActionOutput(2)]*
>> *
>> *
>> *weight_1 = 50*
>> *weight_2 = 50*
>> *watch_port = ofproto_v1_3.OFPP_ANY*
>> *watch_group = ofproto_v1_3.OFPQ_ALL*
>> *
>> *
>> *buckets = [*
>> *_parser_.OFPBucket(weight_1, watch_port,
>> watch_group,
>> actions_1),*
>> *_parser_.OFPBucket(weight_2, watch_port,
>> watch_group,
>> actions_2)]*
>> *
>> *
>> *group_id = 1*
>> *
>> *
>> *req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
>> ofp.OFPGT_SELECT,*
>> *group_id, buckets)*
>>
>> *datapath.send_msg(req)*
>>
>> *match = _parser_.OFPMatch(ipv4_src="192.168.2.2",
>> ipv4_dst="192.168.1.1")*
>> *actions = [datapath.ofproto_parser.OFPActionGroup(1)]*
>> *inst = [_parser_.OFPInstructionAction
>> s(ofp.OFPIT_APPLY_ACTIONS,
>> actions)]*
>> *mod = datapath.ofproto_parser.OFPFlowMod(datapath,
>> match=match,
>> cookie=0, command=ofp.OFPFC_ADD, idle_timeout=0, hard_timeout=0,
>> priority=3, instructions=inst)*
>> *
>> *
>> *datapath.send_msg(mod)*
>>
>>
>> i was following the code in
>> http://csie.nqu.edu.tw/smallko/sdn/ryu_multipath_13.htm
>> 
>>
>> is it right ?
>>
>>
>>
>>
>>
>> thanks
>>
>>
>>
>> 2018-04-01 22:14 GMT-03:00 Iwase Yusuke >  > >>:
>>
>>  Hi Carlos,
>>
>>  H... have you installed any "flow" entry which contained
>> OFPActionGroup?
>>  Also, in your code, you uses "group_id = 50" in OFPGroupMod
>> message. Is
>>  OFPActionGroup using the same "group_id = 50"?
>>
>>   

Re: [Ryu-devel] Spliting flows through two ports

2018-04-02 Thread Iwase Yusuke

Hi Carlos,

You mean;
- With OFPGT_ALL, group action works as expected
- But with OFPGT_SELECT, group action does not work
right?

If group and flow entries are installed as expected, it means this problem is
not on Ryu (Controller) side, but I guess it is on your switch spec. Please
confirm your switch supports OFPGT_SELECT on group table.

Thanks,
Iwase


On 2018年04月03日 02:25, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,

Good news  it's working although I couldn't really divide the flow.

Here's what happened.

The flow went to two ports of the switch but the flow is replicated on the port 
2 and 3.


  in that case making the same bandwidth go on the port 2 and 3.


I used both *weight* variable as *0* and *ofp.OFPGT_ALL*

         queue_1 = _parser_.OFPActionSetQueue(0)
         actions_1 = [queue_1, _parser_.OFPActionOutput(3)]


         queue_2 = _parser_.OFPActionSetQueue(0)
         actions_2 = [queue_2, _parser_.OFPActionOutput(2)]

*weight_1 = 0*
*        weight_2 = 0*
         watch_port = ofproto_v1_3.OFPP_ANY
         watch_group = ofproto_v1_3.OFPQ_ALL

         req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD, *ofp.OFPGT_ALL*,
                 group_id, buckets)



I would like to divide the flow in a  way that in port 2 have 50% of the band 
and port 3 also have 50% of the band.

I changed the *weight* value to *50* and used *ofp.OFPGT_SELECT* but it didn't 
work



2018-04-01 23:09 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

 > *match = _parser_.OFPMatch(ipv4_src="192.168.2.2", 
ipv4_dst="192.168.1.1")*

This rule does not follow "7.2.3.6 Flow Match Field Prerequisite" in the
OpenFlow Spec 1.3.5, I guess. See the OpenFlow Spec for more details.
Then, please confirm your flow entries are installed on your switch like
"ovs-ofctl dump-flows s1".

Thanks,
Iwase


On 2018年04月02日 10:36, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,

Right now my code looks like this OFPActionGroup is in Red

*port_1 = 3*
*        queue_1 = _parser_.OFPActionSetQueue(0)*
*        actions_1 = [queue_1, _parser_.OFPActionOutput(4)]*
*
*
*
*
*        port_2 = 2*
*        queue_2 = _parser_.OFPActionSetQueue(0)*
*        actions_2 = [queue_2, _parser_.OFPActionOutput(2)]*
*
*
*        weight_1 = 50*
*        weight_2 = 50*
*        watch_port = ofproto_v1_3.OFPP_ANY*
*        watch_group = ofproto_v1_3.OFPQ_ALL*
*
*
*        buckets = [*
*                _parser_.OFPBucket(weight_1, watch_port, watch_group,
actions_1),*
*                _parser_.OFPBucket(weight_2, watch_port, watch_group,
actions_2)]*
*
*
*group_id = 1*
*
*
*        req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
ofp.OFPGT_SELECT,*
*                group_id, buckets)*

*        datapath.send_msg(req)*

*match = _parser_.OFPMatch(ipv4_src="192.168.2.2", 
ipv4_dst="192.168.1.1")*
*actions = [datapath.ofproto_parser.OFPActionGroup(1)]*
*        inst = [_parser_.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
actions)]*
*        mod = datapath.ofproto_parser.OFPFlowMod(datapath, match=match,
cookie=0, command=ofp.OFPFC_ADD, idle_timeout=0, hard_timeout=0,
priority=3, instructions=inst)*
*
*
*        datapath.send_msg(mod)*


i was following the code in
http://csie.nqu.edu.tw/smallko/sdn/ryu_multipath_13.htm


is it right ?





thanks



2018-04-01 22:14 GMT-03:00 Iwase Yusuke  >>:

     Hi Carlos,

     H... have you installed any "flow" entry which contained
OFPActionGroup?
     Also, in your code, you uses "group_id = 50" in OFPGroupMod 
message. Is
     OFPActionGroup using the same "group_id = 50"?

     Thanks,
     Iwase


     On 2018年04月02日 09:36, Jose Carlos Ferreira de Melo Junior wrote:

         Hi Iwase,

         Sorry for the late answer

         well... I checked the group stats as you said and it's not
being looked up

         *ovs-ofctl dump-group-stats -O OpenFlow s2*
         *OFPST_GROUP reply (OF1.3) (xid=0x2):*

*group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0*

         *
         *
         I'm really lost and don't know how to fix that

         Do you 

Re: [Ryu-devel] Spliting flows through two ports

2018-04-02 Thread Jose Carlos Ferreira de Melo Junior
Hey Iwase,

Good news  it's working although I couldn't really divide the flow.

Here's what happened.

The flow went to two ports of the switch but the flow is replicated on the
port 2 and 3.

 in that case making the same bandwidth go on the port 2 and 3.


I used both *weight* variable as *0* and *ofp.OFPGT_ALL*


queue_1 = _parser_.OFPActionSetQueue(0)
actions_1 = [queue_1, _parser_.OFPActionOutput(3)]



queue_2 = _parser_.OFPActionSetQueue(0)
actions_2 = [queue_2, _parser_.OFPActionOutput(2)]

   * weight_1 = 0*
*weight_2 = 0*
watch_port = ofproto_v1_3.OFPP_ANY
watch_group = ofproto_v1_3.OFPQ_ALL

req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD, *ofp.OFPGT_ALL*,
group_id, buckets)



I would like to divide the flow in a  way that in port 2 have 50% of the
band and port 3 also have 50% of the band.
I changed the *weight* value to *50* and used *ofp.OFPGT_SELECT* but it
didn't work



2018-04-01 23:09 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> > *match = _parser_.OFPMatch(ipv4_src="192.168.2.2",
> ipv4_dst="192.168.1.1")*
>
> This rule does not follow "7.2.3.6 Flow Match Field Prerequisite" in the
> OpenFlow Spec 1.3.5, I guess. See the OpenFlow Spec for more details.
> Then, please confirm your flow entries are installed on your switch like
> "ovs-ofctl dump-flows s1".
>
> Thanks,
> Iwase
>
>
> On 2018年04月02日 10:36, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hey Iwase,
>>
>> Right now my code looks like this OFPActionGroup is in Red
>>
>> *port_1 = 3*
>> *queue_1 = _parser_.OFPActionSetQueue(0)*
>> *actions_1 = [queue_1, _parser_.OFPActionOutput(4)]*
>> *
>> *
>> *
>> *
>> *port_2 = 2*
>> *queue_2 = _parser_.OFPActionSetQueue(0)*
>> *actions_2 = [queue_2, _parser_.OFPActionOutput(2)]*
>> *
>> *
>> *weight_1 = 50*
>> *weight_2 = 50*
>> *watch_port = ofproto_v1_3.OFPP_ANY*
>> *watch_group = ofproto_v1_3.OFPQ_ALL*
>> *
>> *
>> *buckets = [*
>> *_parser_.OFPBucket(weight_1, watch_port, watch_group,
>> actions_1),*
>> *_parser_.OFPBucket(weight_2, watch_port, watch_group,
>> actions_2)]*
>> *
>> *
>> *group_id = 1*
>> *
>> *
>> *req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
>> ofp.OFPGT_SELECT,*
>> *group_id, buckets)*
>>
>> *datapath.send_msg(req)*
>>
>> *match = _parser_.OFPMatch(ipv4_src="192.168.2.2",
>> ipv4_dst="192.168.1.1")*
>> *actions = [datapath.ofproto_parser.OFPActionGroup(1)]*
>> *inst = [_parser_.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
>> actions)]*
>> *mod = datapath.ofproto_parser.OFPFlowMod(datapath, match=match,
>> cookie=0, command=ofp.OFPFC_ADD, idle_timeout=0, hard_timeout=0,
>> priority=3, instructions=inst)*
>> *
>> *
>> *datapath.send_msg(mod)*
>>
>>
>> i was following the code in http://csie.nqu.edu.tw/smallko
>> /sdn/ryu_multipath_13.htm
>>
>> is it right ?
>>
>>
>>
>>
>>
>> thanks
>>
>>
>>
>> 2018-04-01 22:14 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>> Hi Carlos,
>>
>> H... have you installed any "flow" entry which contained
>> OFPActionGroup?
>> Also, in your code, you uses "group_id = 50" in OFPGroupMod message.
>> Is
>> OFPActionGroup using the same "group_id = 50"?
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2018年04月02日 09:36, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hi Iwase,
>>
>> Sorry for the late answer
>>
>> well... I checked the group stats as you said and it's not being
>> looked up
>>
>> *ovs-ofctl dump-group-stats -O OpenFlow s2*
>> *OFPST_GROUP reply (OF1.3) (xid=0x2):*
>> *group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte
>> _count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,
>> bucket1:packet_count=0,byte_count=0*
>> *
>> *
>> I'm really lost and don't know how to fix that
>>
>> Do you have any idea of how can I solve this problem?
>>
>>
>> many thanks.
>>
>> 2018-03-29 1:33 GMT-03:00 Iwase Yusuke >  > >>:
>>
>>  Hi Carlos,
>>
>>  The group entries are looked up (or specified) by
>> OFPActionGroup in
>> flow
>>  entries.
>>
>>  If looked up, ref_count, packet_count and byte_count should
>> be
>> incremented.
>>
>>  mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
>>  OFPST_GROUP reply (OF1.3) (xid=0x4):
>> group_id=1,duration=45.105s,re
>> f_count=1,packet_count=5,byte_count=378,bucket0:packet_count
>> =4,byte_count=336,bucket1:packet_count=1,byte_count=42
>>
>>  Thanks,
>>  Iwase
>>
>>
>>  On 2018年03月27日 

Re: [Ryu-devel] Spliting flows through two ports

2018-04-01 Thread Iwase Yusuke

Hi Carlos,

> *match = _parser_.OFPMatch(ipv4_src="192.168.2.2", ipv4_dst="192.168.1.1")*

This rule does not follow "7.2.3.6 Flow Match Field Prerequisite" in the
OpenFlow Spec 1.3.5, I guess. See the OpenFlow Spec for more details.
Then, please confirm your flow entries are installed on your switch like
"ovs-ofctl dump-flows s1".

Thanks,
Iwase


On 2018年04月02日 10:36, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,

Right now my code looks like this OFPActionGroup is in Red

*port_1 = 3*
*        queue_1 = _parser_.OFPActionSetQueue(0)*
*        actions_1 = [queue_1, _parser_.OFPActionOutput(4)]*
*
*
*
*
*        port_2 = 2*
*        queue_2 = _parser_.OFPActionSetQueue(0)*
*        actions_2 = [queue_2, _parser_.OFPActionOutput(2)]*
*
*
*        weight_1 = 50*
*        weight_2 = 50*
*        watch_port = ofproto_v1_3.OFPP_ANY*
*        watch_group = ofproto_v1_3.OFPQ_ALL*
*
*
*        buckets = [*
*                _parser_.OFPBucket(weight_1, watch_port, watch_group, 
actions_1),*
*                _parser_.OFPBucket(weight_2, watch_port, watch_group, 
actions_2)]*
*
*
*group_id = 1*
*
*
*        req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,*
*                group_id, buckets)*

*        datapath.send_msg(req)*

*match = _parser_.OFPMatch(ipv4_src="192.168.2.2", ipv4_dst="192.168.1.1")*
*actions = [datapath.ofproto_parser.OFPActionGroup(1)]*
*        inst = [_parser_.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS, 
actions)]*
*        mod = datapath.ofproto_parser.OFPFlowMod(datapath, match=match, 
cookie=0, command=ofp.OFPFC_ADD, idle_timeout=0, hard_timeout=0, priority=3, 
instructions=inst)*

*
*
*        datapath.send_msg(mod)*


i was following the code in 
http://csie.nqu.edu.tw/smallko/sdn/ryu_multipath_13.htm

is it right ?





thanks



2018-04-01 22:14 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

H... have you installed any "flow" entry which contained OFPActionGroup?
Also, in your code, you uses "group_id = 50" in OFPGroupMod message. Is
OFPActionGroup using the same "group_id = 50"?

Thanks,
Iwase


On 2018年04月02日 09:36, Jose Carlos Ferreira de Melo Junior wrote:

Hi Iwase,

Sorry for the late answer

well... I checked the group stats as you said and it's not being looked 
up

*ovs-ofctl dump-group-stats -O OpenFlow s2*
*OFPST_GROUP reply (OF1.3) (xid=0x2):*

*group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0*
*
*
I'm really lost and don't know how to fix that

Do you have any idea of how can I solve this problem?


many thanks.

2018-03-29 1:33 GMT-03:00 Iwase Yusuke  >>:

     Hi Carlos,

     The group entries are looked up (or specified) by OFPActionGroup in
flow
     entries.

     If looked up, ref_count, packet_count and byte_count should be
incremented.

     mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
     OFPST_GROUP reply (OF1.3) (xid=0x4):

group_id=1,duration=45.105s,ref_count=1,packet_count=5,byte_count=378,bucket0:packet_count=4,byte_count=336,bucket1:packet_count=1,byte_count=42


     Thanks,
     Iwase


     On 2018年03月27日 23:10, Jose Carlos Ferreira de Melo Junior wrote:

         Hi Iwase,

         The group entry is added...















         but I don't understand how can be looked up.
         I don't know how to do this


         Is there any other thing that I am missing 


         thanks in advanced







         2018-03-26 20:28 GMT-03:00 Iwase Yusuke

         > 
           "*/using the group table with openflow 1.3 with no
sucess/*"
         means that I am
              > using the group table as i said before and it is not
working,
         means that I am
              > using the group specification and it doens't work.

              "Does not work" means
                - no group entry added
                - group entry exists, but not looked up
                - group entry looked up, but packets are not outputted
                or ...
              which you mean?



Re: [Ryu-devel] Spliting flows through two ports

2018-04-01 Thread Jose Carlos Ferreira de Melo Junior
Hey Iwase,

Right now my code looks like this OFPActionGroup is in Red

*port_1 = 3*
*queue_1 = _parser_.OFPActionSetQueue(0)*
*actions_1 = [queue_1, _parser_.OFPActionOutput(4)]*


*port_2 = 2*
*queue_2 = _parser_.OFPActionSetQueue(0)*
*actions_2 = [queue_2, _parser_.OFPActionOutput(2)]*

*weight_1 = 50*
*weight_2 = 50*
*watch_port = ofproto_v1_3.OFPP_ANY*
*watch_group = ofproto_v1_3.OFPQ_ALL*

*buckets = [*
*_parser_.OFPBucket(weight_1, watch_port, watch_group,
actions_1),*
*_parser_.OFPBucket(weight_2, watch_port, watch_group,
actions_2)]*

*group_id = 1*

*req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
ofp.OFPGT_SELECT,*
*group_id, buckets)*

*datapath.send_msg(req)*

*match = _parser_.OFPMatch(ipv4_src="192.168.2.2",
ipv4_dst="192.168.1.1")*
*actions = [datapath.ofproto_parser.OFPActionGroup(1)]*
*inst = [_parser_.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
actions)]*
*mod = datapath.ofproto_parser.OFPFlowMod(datapath, match=match,
cookie=0, command=ofp.OFPFC_ADD, idle_timeout=0, hard_timeout=0,
priority=3, instructions=inst)*

*datapath.send_msg(mod)*


i was following the code in
http://csie.nqu.edu.tw/smallko/sdn/ryu_multipath_13.htm

is it right ?





thanks



2018-04-01 22:14 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> H... have you installed any "flow" entry which contained
> OFPActionGroup?
> Also, in your code, you uses "group_id = 50" in OFPGroupMod message. Is
> OFPActionGroup using the same "group_id = 50"?
>
> Thanks,
> Iwase
>
>
> On 2018年04月02日 09:36, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hi Iwase,
>>
>> Sorry for the late answer
>>
>> well... I checked the group stats as you said and it's not being looked up
>>
>> *ovs-ofctl dump-group-stats -O OpenFlow s2*
>> *OFPST_GROUP reply (OF1.3) (xid=0x2):*
>> *group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte
>> _count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,
>> bucket1:packet_count=0,byte_count=0*
>> *
>> *
>> I'm really lost and don't know how to fix that
>>
>> Do you have any idea of how can I solve this problem?
>>
>>
>> many thanks.
>>
>> 2018-03-29 1:33 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>> Hi Carlos,
>>
>> The group entries are looked up (or specified) by OFPActionGroup in
>> flow
>> entries.
>>
>> If looked up, ref_count, packet_count and byte_count should be
>> incremented.
>>
>> mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
>> OFPST_GROUP reply (OF1.3) (xid=0x4):
>> group_id=1,duration=45.105s,ref_count=1,packet_count=5,byte_
>> count=378,bucket0:packet_count=4,byte_count=336,bucket1:
>> packet_count=1,byte_count=42
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2018年03月27日 23:10, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hi Iwase,
>>
>> The group entry is added...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> but I don't understand how can be looked up.
>> I don't know how to do this
>>
>>
>> Is there any other thing that I am missing 
>>
>>
>> thanks in advanced
>>
>>
>>
>>
>>
>>
>>
>> 2018-03-26 20:28 GMT-03:00 Iwase Yusuke >  > >>:
>>
>>  Hi Carlos,
>>
>>   >  "*/using the group table with openflow 1.3 with no
>> sucess/*"
>> means that I am
>>  > using the group table as i said before and it is not
>> working,
>> means that I am
>>  > using the group specification and it doens't work.
>>
>>  "Does not work" means
>>- no group entry added
>>- group entry exists, but not looked up
>>- group entry looked up, but packets are not outputted
>>or ...
>>  which you mean?
>>
>>
>>  > and about your topology: It has only 2 switches or 4???
>>
>>  Only 2 switches (s1 and s2), which corresponding to "Start"
>> and
>> "End" switches
>>  on the image you attached on your previous mail. Also h1 and
>> h2
>> represents hosts
>>  which do ping.
>>
>>
>>  Thanks,
>>  Iwase
>>
>>  On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior
>> wrote:
>>
>>  Hey Iwase,
>>
>> "*/using the group table with openflow 1.3 with no
>> sucess/*"
>> means
>>  that I am using the group table as i said before and it
>> is not
>> working,
>>  means that I am using the group specification and it
>> doens't work.
>>
>>  and about your topology: It has only 2 switches or 

Re: [Ryu-devel] Spliting flows through two ports

2018-04-01 Thread Iwase Yusuke

Hi Carlos,

H... have you installed any "flow" entry which contained OFPActionGroup?
Also, in your code, you uses "group_id = 50" in OFPGroupMod message. Is
OFPActionGroup using the same "group_id = 50"?

Thanks,
Iwase


On 2018年04月02日 09:36, Jose Carlos Ferreira de Melo Junior wrote:

Hi Iwase,

Sorry for the late answer

well... I checked the group stats as you said and it's not being looked up

*ovs-ofctl dump-group-stats -O OpenFlow s2*
*OFPST_GROUP reply (OF1.3) (xid=0x2):*
*group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0*
*
*
I'm really lost and don't know how to fix that

Do you have any idea of how can I solve this problem?


many thanks.

2018-03-29 1:33 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

The group entries are looked up (or specified) by OFPActionGroup in flow
entries.

If looked up, ref_count, packet_count and byte_count should be incremented.

mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
OFPST_GROUP reply (OF1.3) (xid=0x4):

group_id=1,duration=45.105s,ref_count=1,packet_count=5,byte_count=378,bucket0:packet_count=4,byte_count=336,bucket1:packet_count=1,byte_count=42

Thanks,
Iwase


On 2018年03月27日 23:10, Jose Carlos Ferreira de Melo Junior wrote:

Hi Iwase,

The group entry is added...















but I don't understand how can be looked up.
I don't know how to do this


Is there any other thing that I am missing 


thanks in advanced







2018-03-26 20:28 GMT-03:00 Iwase Yusuke  >>:

     Hi Carlos,

      >  "*/using the group table with openflow 1.3 with no sucess/*"
means that I am
     > using the group table as i said before and it is not working,
means that I am
     > using the group specification and it doens't work.

     "Does not work" means
       - no group entry added
       - group entry exists, but not looked up
       - group entry looked up, but packets are not outputted
       or ...
     which you mean?


     > and about your topology: It has only 2 switches or 4???

     Only 2 switches (s1 and s2), which corresponding to "Start" and
"End" switches
     on the image you attached on your previous mail. Also h1 and h2
represents hosts
     which do ping.


     Thanks,
     Iwase

     On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior wrote:

         Hey Iwase,

            "*/using the group table with openflow 1.3 with no sucess/*"
means
         that I am using the group table as i said before and it is not
working,
         means that I am using the group specification and it doens't 
work.

         and about your topology: It has only 2 switches or 4???

         i don't know if my code is right or if i am missing something 
else.




         2018-03-25 21:40 GMT-03:00 Iwase Yusuke

         > 
         

Re: [Ryu-devel] Spliting flows through two ports

2018-04-01 Thread Jose Carlos Ferreira de Melo Junior
Hi Iwase,

Sorry for the late answer

well... I checked the group stats as you said and it's not being looked up

*ovs-ofctl dump-group-stats -O OpenFlow s2*
*OFPST_GROUP reply (OF1.3) (xid=0x2):*
*group_id=1,duration=12.837s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0*

I'm really lost and don't know how to fix that

Do you have any idea of how can I solve this problem?


many thanks.

2018-03-29 1:33 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> The group entries are looked up (or specified) by OFPActionGroup in flow
> entries.
>
> If looked up, ref_count, packet_count and byte_count should be incremented.
>
> mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
> OFPST_GROUP reply (OF1.3) (xid=0x4):
> group_id=1,duration=45.105s,ref_count=1,packet_count=5,byte_
> count=378,bucket0:packet_count=4,byte_count=336,bucket1:
> packet_count=1,byte_count=42
>
> Thanks,
> Iwase
>
>
> On 2018年03月27日 23:10, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hi Iwase,
>>
>> The group entry is added...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> but I don't understand how can be looked up.
>> I don't know how to do this
>>
>>
>> Is there any other thing that I am missing 
>>
>>
>> thanks in advanced
>>
>>
>>
>>
>>
>>
>>
>> 2018-03-26 20:28 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>> Hi Carlos,
>>
>>  >  "*/using the group table with openflow 1.3 with no sucess/*"
>> means that I am
>> > using the group table as i said before and it is not working, means
>> that I am
>> > using the group specification and it doens't work.
>>
>> "Does not work" means
>>   - no group entry added
>>   - group entry exists, but not looked up
>>   - group entry looked up, but packets are not outputted
>>   or ...
>> which you mean?
>>
>>
>> > and about your topology: It has only 2 switches or 4???
>>
>> Only 2 switches (s1 and s2), which corresponding to "Start" and "End"
>> switches
>> on the image you attached on your previous mail. Also h1 and h2
>> represents hosts
>> which do ping.
>>
>>
>> Thanks,
>> Iwase
>>
>> On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hey Iwase,
>>
>>"*/using the group table with openflow 1.3 with no sucess/*"
>> means
>> that I am using the group table as i said before and it is not
>> working,
>> means that I am using the group specification and it doens't work.
>>
>> and about your topology: It has only 2 switches or 4???
>>
>> i don't know if my code is right or if i am missing something
>> else.
>>
>>
>>
>>
>> 2018-03-25 21:40 GMT-03:00 Iwase Yusuke >  > >>:
>>
>>
>>  Hi Carlos,
>>
>>  For such purpose, OFPGT_SELECT is appropriate, I guess.
>>
>>  With the topology;
>>
>> ++ ++
>> |   s1   | |   s2   |
>>  ++|  (port 2)---(port 2)  |++
>>  | h1 |---(port 1)  | |  (port 1)---| h2 |
>>  ++|  (port 3)---(port 3)  |++
>> || ||
>> ++ ++
>>
>>
>>  I can install groups and flows entries, then can ping
>> between h1
>> and h2 with the
>>  following app.
>>
>>
>>  $ git diff
>>  diff --git a/ryu/app/simple_switch_13.py
>> b/ryu/app/simple_switch_13.py
>>  index 06a5d0e..e1a5c3b 100644
>>  --- a/ryu/app/simple_switch_13.py
>>  +++ b/ryu/app/simple_switch_13.py
>>  @@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
>>
>>  ofproto.OFPCML_NO_BUFFER)]
>>self.add_flow(datapath, 0, match, actions)
>>
>>  +buckets = [
>>  +parser.OFPBucket(
>>  +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
>>  +[parser.OFPActionOutput(2)]),
>>  +parser.OFPBucket(
>>  +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
>>  +[parser.OFPActionOutput(3)]),
>>  +]
>>  +mod = parser.OFPGroupMod(
>>  +datapath, ofproto.OFPGC_ADD,
>> ofproto.OFPGT_SELECT, 1,
>> buckets)
>>  +datapath.send_msg(mod)
>>  +
>>  +match = parser.OFPMatch(in_port=1)
>>  +actions = [parser.OFPActionGroup(1)]  # from host
>> to switch
>>   

Re: [Ryu-devel] Spliting flows through two ports

2018-03-28 Thread Iwase Yusuke

Hi Carlos,

The group entries are looked up (or specified) by OFPActionGroup in flow
entries.

If looked up, ref_count, packet_count and byte_count should be incremented.

mininet> sh ovs-ofctl dump-group-stats s1 -O OpenFlow13
OFPST_GROUP reply (OF1.3) (xid=0x4):
group_id=1,duration=45.105s,ref_count=1,packet_count=5,byte_count=378,bucket0:packet_count=4,byte_count=336,bucket1:packet_count=1,byte_count=42

Thanks,
Iwase


On 2018年03月27日 23:10, Jose Carlos Ferreira de Melo Junior wrote:

Hi Iwase,

The group entry is added...















but I don't understand how can be looked up.
I don't know how to do this


Is there any other thing that I am missing 


thanks in advanced







2018-03-26 20:28 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

 >  "*/using the group table with openflow 1.3 with no sucess/*" means that 
I am
> using the group table as i said before and it is not working, means that 
I am
> using the group specification and it doens't work.

"Does not work" means
  - no group entry added
  - group entry exists, but not looked up
  - group entry looked up, but packets are not outputted
  or ...
which you mean?


> and about your topology: It has only 2 switches or 4???

Only 2 switches (s1 and s2), which corresponding to "Start" and "End" 
switches
on the image you attached on your previous mail. Also h1 and h2 represents 
hosts
which do ping.


Thanks,
Iwase

On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,

   "*/using the group table with openflow 1.3 with no sucess/*" means
that I am using the group table as i said before and it is not working,
means that I am using the group specification and it doens't work.

and about your topology: It has only 2 switches or 4???

i don't know if my code is right or if i am missing something else.




2018-03-25 21:40 GMT-03:00 Iwase Yusuke  >>:


     Hi Carlos,

     For such purpose, OFPGT_SELECT is appropriate, I guess.

     With the topology;

                    ++             ++
                    |   s1   |             |   s2   |
     ++        |      (port 2)---(port 2)      |        ++
     | h1 |---(port 1)      |             |      (port 1)---| h2 |
     ++        |      (port 3)---(port 3)      |        ++
                    |        |             |        |
                    ++             ++


     I can install groups and flows entries, then can ping between h1
and h2 with the
     following app.


     $ git diff
     diff --git a/ryu/app/simple_switch_13.py 
b/ryu/app/simple_switch_13.py
     index 06a5d0e..e1a5c3b 100644
     --- a/ryu/app/simple_switch_13.py
     +++ b/ryu/app/simple_switch_13.py
     @@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
                                                 
ofproto.OFPCML_NO_BUFFER)]
               self.add_flow(datapath, 0, match, actions)

     +        buckets = [
     +            parser.OFPBucket(
     +                50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
     +                [parser.OFPActionOutput(2)]),
     +            parser.OFPBucket(
     +                50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
     +                [parser.OFPActionOutput(3)]),
     +        ]
     +        mod = parser.OFPGroupMod(
     +            datapath, ofproto.OFPGC_ADD, ofproto.OFPGT_SELECT, 1,
buckets)
     +        datapath.send_msg(mod)
     +
     +        match = parser.OFPMatch(in_port=1)
     +        actions = [parser.OFPActionGroup(1)]  # from host to 
switch
     +        self.add_flow(datapath, 1, match, actions)
     +
     +        match = parser.OFPMatch(in_port=2)
     +        actions = [parser.OFPActionOutput(1)]  # from switch to 
host
     +        self.add_flow(datapath, 1, match, actions)
     +
     +        match = parser.OFPMatch(in_port=3)
     +        actions = [parser.OFPActionOutput(1)]  # from switch to 
host
     +        self.add_flow(datapath, 1, match, actions)
     +
           def add_flow(self, datapath, priority, match, actions,
buffer_id=None):
               ofproto = datapath.ofproto
               parser = datapath.ofproto_parser


     I don't know what "using the group table with openflow 1.3 with no
sucess"
     means, but please 

Re: [Ryu-devel] Spliting flows through two ports

2018-03-27 Thread Jose Carlos Ferreira de Melo Junior
Hi Iwase,

The group entry is added...















but I don't understand how can be looked up.
I don't know how to do this


Is there any other thing that I am missing 


thanks in advanced







2018-03-26 20:28 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> >  "*/using the group table with openflow 1.3 with no sucess/*" means that
> I am
> > using the group table as i said before and it is not working, means that
> I am
> > using the group specification and it doens't work.
>
> "Does not work" means
>  - no group entry added
>  - group entry exists, but not looked up
>  - group entry looked up, but packets are not outputted
>  or ...
> which you mean?
>
>
> > and about your topology: It has only 2 switches or 4???
>
> Only 2 switches (s1 and s2), which corresponding to "Start" and "End"
> switches
> on the image you attached on your previous mail. Also h1 and h2 represents
> hosts
> which do ping.
>
>
> Thanks,
> Iwase
>
> On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hey Iwase,
>>
>>   "*/using the group table with openflow 1.3 with no sucess/*" means that
>> I am using the group table as i said before and it is not working, means
>> that I am using the group specification and it doens't work.
>>
>> and about your topology: It has only 2 switches or 4???
>>
>> i don't know if my code is right or if i am missing something else.
>>
>>
>>
>>
>> 2018-03-25 21:40 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>>
>> Hi Carlos,
>>
>> For such purpose, OFPGT_SELECT is appropriate, I guess.
>>
>> With the topology;
>>
>>++ ++
>>|   s1   | |   s2   |
>> ++|  (port 2)---(port 2)  |++
>> | h1 |---(port 1)  | |  (port 1)---| h2 |
>> ++|  (port 3)---(port 3)  |++
>>|| ||
>>++ ++
>>
>>
>> I can install groups and flows entries, then can ping between h1 and
>> h2 with the
>> following app.
>>
>>
>> $ git diff
>> diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
>> index 06a5d0e..e1a5c3b 100644
>> --- a/ryu/app/simple_switch_13.py
>> +++ b/ryu/app/simple_switch_13.py
>> @@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
>> ofproto.OFPCML_NO_BUFFER)]
>>   self.add_flow(datapath, 0, match, actions)
>>
>> +buckets = [
>> +parser.OFPBucket(
>> +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
>> +[parser.OFPActionOutput(2)]),
>> +parser.OFPBucket(
>> +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
>> +[parser.OFPActionOutput(3)]),
>> +]
>> +mod = parser.OFPGroupMod(
>> +datapath, ofproto.OFPGC_ADD, ofproto.OFPGT_SELECT, 1,
>> buckets)
>> +datapath.send_msg(mod)
>> +
>> +match = parser.OFPMatch(in_port=1)
>> +actions = [parser.OFPActionGroup(1)]  # from host to switch
>> +self.add_flow(datapath, 1, match, actions)
>> +
>> +match = parser.OFPMatch(in_port=2)
>> +actions = [parser.OFPActionOutput(1)]  # from switch to host
>> +self.add_flow(datapath, 1, match, actions)
>> +
>> +match = parser.OFPMatch(in_port=3)
>> +actions = [parser.OFPActionOutput(1)]  # from switch to host
>> +self.add_flow(datapath, 1, match, actions)
>> +
>>   def add_flow(self, datapath, priority, match, actions,
>> buffer_id=None):
>>   ofproto = datapath.ofproto
>>   parser = datapath.ofproto_parser
>>
>>
>> I don't know what "using the group table with openflow 1.3 with no
>> sucess"
>> means, but please confirm your group and flow table again.
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2018年03月23日 21:11, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hey Iwase,
>>
>>
>> Split means really divide the flow I dont know if would be like a
>> load
>> balancing (I think it is)
>>
>> For example the image below
>>
>>
>>
>>
>> But I dont know if this would be possible using the group table.
>>
>> 2018-03-23 4:04 GMT-03:00 Iwase Yusuke >  >
>> >>:
>>
>>
>>  Hi Carlos,
>>
>>  What does "split flows" exactly mean?
>>
>>   > req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD,
>> ofp.OFPGT_SELECT,
>>   >  group_id, buckets)
>>
>>  If you specify OFPGT_SELECT, switch will execute "one"
>> 

Re: [Ryu-devel] Spliting flows through two ports

2018-03-26 Thread Iwase Yusuke

Hi Carlos,

>  "*/using the group table with openflow 1.3 with no sucess/*" means that I am
> using the group table as i said before and it is not working, means that I am
> using the group specification and it doens't work.

"Does not work" means
 - no group entry added
 - group entry exists, but not looked up
 - group entry looked up, but packets are not outputted
 or ...
which you mean?


> and about your topology: It has only 2 switches or 4???

Only 2 switches (s1 and s2), which corresponding to "Start" and "End" switches
on the image you attached on your previous mail. Also h1 and h2 represents hosts
which do ping.


Thanks,
Iwase

On 2018年03月26日 21:14, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,

  "*/using the group table with openflow 1.3 with no sucess/*" means that I am 
using the group table as i said before and it is not working, means that I am 
using the group specification and it doens't work.


and about your topology: It has only 2 switches or 4???

i don't know if my code is right or if i am missing something else.




2018-03-25 21:40 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

For such purpose, OFPGT_SELECT is appropriate, I guess.

With the topology;

               ++             ++
               |   s1   |             |   s2   |
++        |      (port 2)---(port 2)      |        ++
| h1 |---(port 1)      |             |      (port 1)---| h2 |
++        |      (port 3)---(port 3)      |        ++
               |        |             |        |
               ++             ++


I can install groups and flows entries, then can ping between h1 and h2 
with the
following app.


$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 06a5d0e..e1a5c3b 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
                                            ofproto.OFPCML_NO_BUFFER)]
          self.add_flow(datapath, 0, match, actions)

+        buckets = [
+            parser.OFPBucket(
+                50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
+                [parser.OFPActionOutput(2)]),
+            parser.OFPBucket(
+                50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
+                [parser.OFPActionOutput(3)]),
+        ]
+        mod = parser.OFPGroupMod(
+            datapath, ofproto.OFPGC_ADD, ofproto.OFPGT_SELECT, 1, buckets)
+        datapath.send_msg(mod)
+
+        match = parser.OFPMatch(in_port=1)
+        actions = [parser.OFPActionGroup(1)]  # from host to switch
+        self.add_flow(datapath, 1, match, actions)
+
+        match = parser.OFPMatch(in_port=2)
+        actions = [parser.OFPActionOutput(1)]  # from switch to host
+        self.add_flow(datapath, 1, match, actions)
+
+        match = parser.OFPMatch(in_port=3)
+        actions = [parser.OFPActionOutput(1)]  # from switch to host
+        self.add_flow(datapath, 1, match, actions)
+
      def add_flow(self, datapath, priority, match, actions, 
buffer_id=None):
          ofproto = datapath.ofproto
          parser = datapath.ofproto_parser


I don't know what "using the group table with openflow 1.3 with no sucess"
means, but please confirm your group and flow table again.

Thanks,
Iwase


On 2018年03月23日 21:11, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,


Split means really divide the flow I dont know if would be like a load
balancing (I think it is)

For example the image below




But I dont know if this would be possible using the group table.

2018-03-23 4:04 GMT-03:00 Iwase Yusuke  >>:


     Hi Carlos,

     What does "split flows" exactly mean?

      > req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD, 
ofp.OFPGT_SELECT,
      >                          group_id, buckets)

     If you specify OFPGT_SELECT, switch will execute "one" bucket in
the group and
     not copied like the port mirroring. If you intend to do port
mirroring, you need
     to specify OFPGT_ALL. For other available group types, please refer
to the
     OpenFlow spec and your switch's specification.

     Thanks,
     Iwase


     On 2018年03月21日 04:02, Jose Carlos Ferreira de Melo Junior wrote:

         Hi there,

         I know this topic was discussed before but I would like just a
simple
         explanation about it.

         Because I am using the group 

Re: [Ryu-devel] Spliting flows through two ports

2018-03-26 Thread Jose Carlos Ferreira de Melo Junior
Hey Iwase,

 "*using the group table with openflow 1.3 with no sucess*" means that I am
using the group table as i said before and it is not working, means that I
am using the group specification and it doens't work.

and about your topology: It has only 2 switches or 4???

i don't know if my code is right or if i am missing something else.




2018-03-25 21:40 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> For such purpose, OFPGT_SELECT is appropriate, I guess.
>
> With the topology;
>
>   ++ ++
>   |   s1   | |   s2   |
> ++|  (port 2)---(port 2)  |++
> | h1 |---(port 1)  | |  (port 1)---| h2 |
> ++|  (port 3)---(port 3)  |++
>   || ||
>   ++ ++
>
>
> I can install groups and flows entries, then can ping between h1 and h2
> with the
> following app.
>
>
> $ git diff
> diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
> index 06a5d0e..e1a5c3b 100644
> --- a/ryu/app/simple_switch_13.py
> +++ b/ryu/app/simple_switch_13.py
> @@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
>ofproto.OFPCML_NO_BUFFER)]
>  self.add_flow(datapath, 0, match, actions)
>
> +buckets = [
> +parser.OFPBucket(
> +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
> +[parser.OFPActionOutput(2)]),
> +parser.OFPBucket(
> +50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
> +[parser.OFPActionOutput(3)]),
> +]
> +mod = parser.OFPGroupMod(
> +datapath, ofproto.OFPGC_ADD, ofproto.OFPGT_SELECT, 1, buckets)
> +datapath.send_msg(mod)
> +
> +match = parser.OFPMatch(in_port=1)
> +actions = [parser.OFPActionGroup(1)]  # from host to switch
> +self.add_flow(datapath, 1, match, actions)
> +
> +match = parser.OFPMatch(in_port=2)
> +actions = [parser.OFPActionOutput(1)]  # from switch to host
> +self.add_flow(datapath, 1, match, actions)
> +
> +match = parser.OFPMatch(in_port=3)
> +actions = [parser.OFPActionOutput(1)]  # from switch to host
> +self.add_flow(datapath, 1, match, actions)
> +
>  def add_flow(self, datapath, priority, match, actions,
> buffer_id=None):
>  ofproto = datapath.ofproto
>  parser = datapath.ofproto_parser
>
>
> I don't know what "using the group table with openflow 1.3 with no sucess"
> means, but please confirm your group and flow table again.
>
> Thanks,
> Iwase
>
>
> On 2018年03月23日 21:11, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hey Iwase,
>>
>>
>> Split means really divide the flow I dont know if would be like a load
>> balancing (I think it is)
>>
>> For example the image below
>>
>>
>>
>>
>> But I dont know if this would be possible using the group table.
>>
>> 2018-03-23 4:04 GMT-03:00 Iwase Yusuke  iwase.yusu...@gmail.com>>:
>>
>>
>> Hi Carlos,
>>
>> What does "split flows" exactly mean?
>>
>>  > req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,
>>  >  group_id, buckets)
>>
>> If you specify OFPGT_SELECT, switch will execute "one" bucket in the
>> group and
>> not copied like the port mirroring. If you intend to do port
>> mirroring, you need
>> to specify OFPGT_ALL. For other available group types, please refer
>> to the
>> OpenFlow spec and your switch's specification.
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2018年03月21日 04:02, Jose Carlos Ferreira de Melo Junior wrote:
>>
>> Hi there,
>>
>> I know this topic was discussed before but I would like just a
>> simple
>> explanation about it.
>>
>> Because I am using the group table with openflow 1.3 with no
>> sucess.
>>
>>
>> My purpose is to split one flow in two flows and forward on port
>> 3 and 4
>> using the group table.
>>
>> My code is as follows:
>>
>>
>> *def group_mod(self, datapath):*
>> *global ofp, _parser_, dp*
>> *port_1 = 4*
>> *queue_1 = _parser_.OFPActionSetQueue(0)*
>> *actions_1 = [queue_1, _parser_.OFPActionOutput(port_1)]*
>> *
>> *
>> *
>> *
>> *port_2 = 3*
>> *queue_2 = _parser_.OFPActionSetQueue(0)*
>> *actions_2 = [queue_2, _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 = [*
>> *_parser_.OFPBucket(weight_1, 

Re: [Ryu-devel] Spliting flows through two ports

2018-03-25 Thread Iwase Yusuke

Hi Carlos,

For such purpose, OFPGT_SELECT is appropriate, I guess.

With the topology;

  ++ ++
  |   s1   | |   s2   |
++|  (port 2)---(port 2)  |++
| h1 |---(port 1)  | |  (port 1)---| h2 |
++|  (port 3)---(port 3)  |++
  || ||
  ++ ++


I can install groups and flows entries, then can ping between h1 and h2 with the
following app.


$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 06a5d0e..e1a5c3b 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -48,6 +48,30 @@ class SimpleSwitch13(app_manager.RyuApp):
   ofproto.OFPCML_NO_BUFFER)]
 self.add_flow(datapath, 0, match, actions)

+buckets = [
+parser.OFPBucket(
+50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
+[parser.OFPActionOutput(2)]),
+parser.OFPBucket(
+50, ofproto.OFPP_ANY, ofproto.OFPG_ANY,
+[parser.OFPActionOutput(3)]),
+]
+mod = parser.OFPGroupMod(
+datapath, ofproto.OFPGC_ADD, ofproto.OFPGT_SELECT, 1, buckets)
+datapath.send_msg(mod)
+
+match = parser.OFPMatch(in_port=1)
+actions = [parser.OFPActionGroup(1)]  # from host to switch
+self.add_flow(datapath, 1, match, actions)
+
+match = parser.OFPMatch(in_port=2)
+actions = [parser.OFPActionOutput(1)]  # from switch to host
+self.add_flow(datapath, 1, match, actions)
+
+match = parser.OFPMatch(in_port=3)
+actions = [parser.OFPActionOutput(1)]  # from switch to host
+self.add_flow(datapath, 1, match, actions)
+
 def add_flow(self, datapath, priority, match, actions, buffer_id=None):
 ofproto = datapath.ofproto
 parser = datapath.ofproto_parser


I don't know what "using the group table with openflow 1.3 with no sucess"
means, but please confirm your group and flow table again.

Thanks,
Iwase


On 2018年03月23日 21:11, Jose Carlos Ferreira de Melo Junior wrote:

Hey Iwase,


Split means really divide the flow I dont know if would be like a load balancing 
(I think it is)


For example the image below




But I dont know if this would be possible using the group table.

2018-03-23 4:04 GMT-03:00 Iwase Yusuke >:


Hi Carlos,

What does "split flows" exactly mean?

 > req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,
 >                          group_id, buckets)

If you specify OFPGT_SELECT, switch will execute "one" bucket in the group 
and
not copied like the port mirroring. If you intend to do port mirroring, you 
need
to specify OFPGT_ALL. For other available group types, please refer to the
OpenFlow spec and your switch's specification.

Thanks,
Iwase


On 2018年03月21日 04:02, Jose Carlos Ferreira de Melo Junior wrote:

Hi there,

I know this topic was discussed before but I would like just a simple
explanation about it.

Because I am using the group table with openflow 1.3 with no sucess.


My purpose is to split one flow in two flows and forward on port 3 and 4
using the group table.

My code is as follows:


*def group_mod(self, datapath):*
*        global ofp, _parser_, dp*
*        port_1 = 4*
*        queue_1 = _parser_.OFPActionSetQueue(0)*
*        actions_1 = [queue_1, _parser_.OFPActionOutput(port_1)]*
*
*
*
*
*        port_2 = 3*
*        queue_2 = _parser_.OFPActionSetQueue(0)*
*        actions_2 = [queue_2, _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 = [*
*                _parser_.OFPBucket(weight_1, watch_port, watch_group,
actions_1),*
*                _parser_.OFPBucket(weight_2, watch_port, watch_group,
actions_2)]*
*
*
*        group_id = 50*
*
*
*        req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
ofp.OFPGT_SELECT,*
*                group_id, buckets)*
*
*
*        datapath.send_msg(req)*
*
*
*
*
*
*
Hope this is right.

Could anyone help me with this issue?




-- 
Best regards,

José Carlos Ferreira
Msc student in Computer Science
System and Network Analyst at PoP-PE/RNP




Re: [Ryu-devel] Spliting flows through two ports

2018-03-23 Thread Jose Carlos Ferreira de Melo Junior
Hey Iwase,


Split means really divide the flow I dont know if would be like a load
balancing (I think it is)

For example the image below




But I dont know if this would be possible using the group table.

2018-03-23 4:04 GMT-03:00 Iwase Yusuke :

> Hi Carlos,
>
> What does "split flows" exactly mean?
>
> > req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,
> >  group_id, buckets)
>
> If you specify OFPGT_SELECT, switch will execute "one" bucket in the group
> and
> not copied like the port mirroring. If you intend to do port mirroring,
> you need
> to specify OFPGT_ALL. For other available group types, please refer to the
> OpenFlow spec and your switch's specification.
>
> Thanks,
> Iwase
>
>
> On 2018年03月21日 04:02, Jose Carlos Ferreira de Melo Junior wrote:
>
>> Hi there,
>>
>> I know this topic was discussed before but I would like just a simple
>> explanation about it.
>>
>> Because I am using the group table with openflow 1.3 with no sucess.
>>
>>
>> My purpose is to split one flow in two flows and forward on port 3 and 4
>> using the group table.
>>
>> My code is as follows:
>>
>>
>> *def group_mod(self, datapath):*
>> *global ofp, _parser_, dp*
>> *port_1 = 4*
>> *queue_1 = _parser_.OFPActionSetQueue(0)*
>> *actions_1 = [queue_1, _parser_.OFPActionOutput(port_1)]*
>> *
>> *
>> *
>> *
>> *port_2 = 3*
>> *queue_2 = _parser_.OFPActionSetQueue(0)*
>> *actions_2 = [queue_2, _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 = [*
>> *_parser_.OFPBucket(weight_1, watch_port, watch_group,
>> actions_1),*
>> *_parser_.OFPBucket(weight_2, watch_port, watch_group,
>> actions_2)]*
>> *
>> *
>> *group_id = 50*
>> *
>> *
>> *req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD,
>> ofp.OFPGT_SELECT,*
>> *group_id, buckets)*
>> *
>> *
>> *datapath.send_msg(req)*
>> *
>> *
>> *
>> *
>> *
>> *
>> Hope this is right.
>>
>> Could anyone help me with this issue?
>>
>>
>>
>>
>> --
>> Best regards,
>> José Carlos Ferreira
>> Msc student in Computer Science
>> System and Network Analyst at PoP-PE/RNP
>>
>>
>> 
>> --
>> 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
>>
>>


-- 
Best regards,
José Carlos Ferreira
Msc student in Computer Science
System and Network Analyst at PoP-PE/RNP
--
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] Spliting flows through two ports

2018-03-23 Thread Iwase Yusuke

Hi Carlos,

What does "split flows" exactly mean?

> req = parser.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,
>  group_id, buckets)

If you specify OFPGT_SELECT, switch will execute "one" bucket in the group and
not copied like the port mirroring. If you intend to do port mirroring, you need
to specify OFPGT_ALL. For other available group types, please refer to the
OpenFlow spec and your switch's specification.

Thanks,
Iwase


On 2018年03月21日 04:02, Jose Carlos Ferreira de Melo Junior wrote:

Hi there,

I know this topic was discussed before but I would like just a simple 
explanation about it.


Because I am using the group table with openflow 1.3 with no sucess.


My purpose is to split one flow in two flows and forward on port 3 and 4 using 
the group table.


My code is as follows:


*def group_mod(self, datapath):*
*        global ofp, _parser_, dp*
*        port_1 = 4*
*        queue_1 = _parser_.OFPActionSetQueue(0)*
*        actions_1 = [queue_1, _parser_.OFPActionOutput(port_1)]*
*
*
*
*
*        port_2 = 3*
*        queue_2 = _parser_.OFPActionSetQueue(0)*
*        actions_2 = [queue_2, _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 = [*
*                _parser_.OFPBucket(weight_1, watch_port, watch_group, 
actions_1),*
*                _parser_.OFPBucket(weight_2, watch_port, watch_group, 
actions_2)]*
*
*
*        group_id = 50*
*
*
*        req = _parser_.OFPGroupMod(datapath, ofp.OFPFC_ADD, ofp.OFPGT_SELECT,*
*                group_id, buckets)*
*
*
*        datapath.send_msg(req)*
*
*
*
*
*
*
Hope this is right.

Could anyone help me with this issue?




--
Best regards,
José Carlos Ferreira
Msc student in Computer Science
System and Network Analyst at PoP-PE/RNP


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