Hi guys, I couldn't help but notice that you two are discussing about
spliting flows into two sub-flows refering to the ring topology showed here.

I would like to ask to Tanvir, in this ring topology you should had
experienced some kind of loop how you managed to solve this problem?

I was trying to do the same thing with the same topology using Dijkstra
Algorithm but there were a lot of broadcast messages in loop such as ARP ,
LLDP and ICMPv6 all the time

2018-01-08 21:12 GMT-03:00 Iwase Yusuke <iwase.yusu...@gmail.com>:

> Hi Tanvir,
>
>
> > To do round-robin, what I have to change the above code?
>
> The OpenFlow Spec says the selection algorithm of SELECT type is depending
> on
> the switch's implementation.
> So whether switch will do round-robin or other selection algorithm (e.g.,
> hash
> of source MAC) is the outside of the OpenFlow and not controllable from Ryu
> side...
> Please refer to the docs of your OpenFlow switch.
>
> Thanks,
> Iwase
>
>
> On 2017年12月28日 03:11, tanvir.ulhu...@data61.csiro.au wrote:
>
>> "weight" should be determined only when "OFPGT_SELECT" type.
>> What does "split" exactly mean?
>> To do round-robin or load-balance on two path, you should use
>> "OFPGT_SELECT".
>>
>>
>> Thanks for your reply :)  My response is given below,
>>
>>                     ________________ switch 3_____________
>>                     |
>>                   |
>>                     |
>>                   |
>>   h1------switch 1
>>     switch 4-------- h2
>>                     |_________________ switch 5___________|
>>
>> For the above topology, I used the following code in which a flow is
>> supposed to be split into two equal sub-flows in Switch 1 (a flow entering
>> into switch 1 will be divided equally to pass through switch 3 and switch
>> 5). However, I have found that because of using "ofproto.OFPGT_SELECT", the
>> controller sends the flow in one of the links between two links (either
>> through switch 3 or switch 5). How can I divide a flow into two sub-flows
>> passing through two links?
>>
>>            group_id = 1
>>            action01 = [parser.OFPActionOutput(2)]
>>            action02 = [parser.OFPActionOutput(4)]
>>            weight01 = 50
>>            weight02 = 50
>>            watch_port = ofproto_v1_3.OFPP_ANY
>>            watch_group = ofproto_v1_3.OFPQ_ALL
>>            bucket01 = parser.OFPBucket(weight01, watch_port, watch_group,
>> action01)
>>            bucket02 = parser.OFPBucket(weight02, watch_port, watch_group,
>> action02)
>>            req = parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
>> ofproto.OFPGT_SELECT, group_id=1, buckets=[bucket01, bucket02])
>>            datapath.send_msg(req)
>>
>>
>> To do round-robin, what I have to change the above code?
>>
>> Thanks,
>> -Tanvir
>> ________________________________________
>> From: Iwase Yusuke <iwase.yusu...@gmail.com>
>> Sent: Monday, 25 December 2017 6:08 PM
>> To: Ul Huque, Tanvir (Data61, Eveleigh ATP)
>> Cc: ryu-devel@lists.sourceforge.net
>> Subject: Re: [Ryu-devel] splitting a flow into a number of flows
>>
>> Hi Tanvir,
>>
>>
>>   > (1) How can I split a flow into multiple sub-flows defining the
>> percentage of
>>   > each sub-flows compared to the flow?
>>
>> "weight" should be determined only when "OFPGT_SELECT" type.
>> What does "split" exactly mean?
>> To do round-robin or load-balance on two path, you should use
>> "OFPGT_SELECT".
>>
>>
>>   > (2) I want to know the use, and application of OFPGT_INDRIECT, and
>> OFPGT_FF.
>>
>> For the details of each OFPGT_* types, please refer to "5.6.1 Group
>> Types" on
>> the OpenFlow Spec 1.3.5.
>>
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2017年12月21日 17:54, tanvir.ulhu...@data61.csiro.au wrote:
>>
>>> Hi
>>>
>>>
>>> Thanks for your help.
>>>
>>> I have used ".OFPGT_ALL" in ".OFPGroupMod" message, and found that the
>>> flow is splitting. But there is a serious problem: if I set any value in
>>> "weight" field, except 0, then the flow does not split into multiple
>>> sub-flows. I have also noticed that if I set 0 in  "weight" field, then the
>>> flow sends an equal number of packets in each sub-flows and the number of
>>> packets of a sub-flow is equivalent to the number of packets of the flow. I
>>> used the following code,
>>>
>>>           ofproto = datapath.ofproto
>>>           parser = datapath.ofproto_parser
>>>           group_id = 1
>>>           action01 = [parser.OFPActionOutput(2)]
>>>           action02 = [parser.OFPActionOutput(4)]
>>>           weight01 = 0
>>>           weight02 = 0
>>>           watch_port = ofproto_v1_3.OFPP_ANY
>>>           watch_group = ofproto_v1_3.OFPQ_ALL
>>>           bucket01 = parser.OFPBucket(weight01, watch_port, watch_group,
>>> action01)
>>>           bucket02 = parser.OFPBucket(weight02, watch_port, watch_group,
>>> action02)
>>>           req = parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
>>> ofproto.OFPGT_ALL, group_id=1, buckets=[bucket01, bucket02])     #  (2)
>>> ofproto.OFPGT_SELECT --> ofproto.OFPGT_ALL
>>>           datapath.send_msg(req)
>>>
>>> (1) How can I split a flow into multiple sub-flows defining the
>>> percentage of each sub-flows compared to the flow?
>>> (2) I want to know the use, and application of OFPGT_INDRIECT, and
>>> OFPGT_FF.
>>>
>>> Thanks,
>>> -Tanvir
>>>
>>>
>>> ________________________________________
>>> From: Iwase Yusuke <iwase.yusu...@gmail.com>
>>> Sent: Thursday, 21 December 2017 10:50 AM
>>> To: Ul Huque, Tanvir (Data61, Eveleigh ATP)
>>> Cc: ryu-devel@lists.sourceforge.net
>>> Subject: Re: [Ryu-devel] splitting a flow into a number of flows
>>>
>>> Hi,
>>>
>>>    >          buckets = [parser.OFPBucket(weight01, watch_port,
>>> watch_group,
>>>    > action01), parser.OFPBucket(weight02, watch_port, watch_group,
>>> action02)]
>>>    >          req = parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
>>>    > ofproto.OFPGT_SELECT, group_id, buckets)
>>>
>>> How about using ofproto.OFPGT_ALL instead of ofproto.OFPGT_SELECT?
>>> Please refer to "5.6.1 Group Types" on OpenFlow Spec 1.3.5 for the
>>> difference
>>> between the types of group action.
>>>
>>> Thanks,
>>> Iwase
>>>
>>>
>>> On 2017年12月19日 18:58, tanvir.ulhu...@data61.csiro.au wrote:
>>>
>>>> Hi
>>>>
>>>>
>>>> I want to split a flow into two flows, e.g., a flow entering into
>>>> switch 1 will
>>>> be splitted into two flows going to switch 3 and switch 5.
>>>>
>>>>
>>>>
>>>>                    ________________ switch 3_____________
>>>>
>>>>                    |
>>>>             |
>>>>
>>>> h1------switch 1
>>>>     switch 4-------- h2
>>>>
>>>>                   |_________________ switch 5____________|
>>>>
>>>>
>>>>
>>>> Now, to split the flow I have used the following code, however, I have
>>>> found
>>>> that flow is not splitting and passing through only one link without
>>>> sending any
>>>> packets in other link.
>>>>
>>>> 1. Could you please help me identifying the problem?
>>>>
>>>> 2. Could you please share necessary resources/links/guidelines of load
>>>> sharing
>>>> in SDN using RYU so that I can have workable implementation?
>>>>
>>>>
>>>>
>>>> #....................................................... send_group_mod
>>>> .....................................................
>>>>        # applicable in Swicth-1 (shared switch/AP)
>>>>
>>>>
>>>>        def group_mod01(self, datapath):
>>>>            ofproto = datapath.ofproto
>>>>            parser = datapath.ofproto_parser
>>>>
>>>>            group_id = 1
>>>>            action01 = [parser.OFPActionOutput(2)]   #  for switch 3
>>>>            action02 = [parser.OFPActionOutput(4)]   # for switch 5
>>>>            weight01 = 50
>>>>            weight02 = 50
>>>>            watch_port = ofproto_v1_3.OFPP_ANY
>>>>            watch_group = ofproto_v1_3.OFPQ_ALL
>>>>            buckets = [parser.OFPBucket(weight01, watch_port,
>>>> watch_group,
>>>> action01), parser.OFPBucket(weight02, watch_port, watch_group,
>>>> action02)]
>>>>            req = parser.OFPGroupMod(datapath, ofproto.OFPFC_ADD,
>>>> ofproto.OFPGT_SELECT, group_id, buckets)
>>>>            datapath.send_msg(req)
>>>>
>>>> #.......................................................
>>>> switch_in_handler
>>>> ...................................................
>>>>                                                      # pro-active rule
>>>> in Switch 1
>>>>
>>>>        @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
>>>>        def switch_features_handler(self, ev):
>>>>            datapath = ev.msg.datapath
>>>>            dpid = datapath.id
>>>>            ofproto = datapath.ofproto
>>>>            parser = datapath.ofproto_parser
>>>>
>>>>            if datapath.id == 1:
>>>>                self.group_mod01(datapath)
>>>>                actions = [parser.OFPActionSetField(ip_dscp = 1),
>>>> parser.OFPActionGroup(group_id = 1)]
>>>>                priority = 100
>>>>                match = parser.OFPMatch(in_port= 1, eth_type=0x0800,
>>>> ipv4_src='10.0.0.1', ipv4_dst='10.0.0.2', ip_proto=17, udp_dst=5555 )
>>>>                self.add_flow(datapath, priority , match, actions)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> 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
>>
>>
> ------------------------------------------------------------
> ------------------
> 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
>



-- 
Atenciosamente,
José Carlos Ferreira
Mestrando em Ciência da Computação
Analista de Redes e Sistemas 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

Reply via email to