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,
>
> Hmmmm... 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 <mailto:
>> 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 <iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com> <mailto:iwase.yusu...@gmail.com
>>         <mailto: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
>>         <iwase.yusu...@gmail.com <mailto:iwase.yusu...@gmail.com>
>>                  <mailto:iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com>> <mailto:iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com>
>>                  <mailto:iwase.yusu...@gmail.com
>>         <mailto: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
>>         <iwase.yusu...@gmail.com <mailto:iwase.yusu...@gmail.com>
>>                  <mailto:iwase.yusu...@gmail.com <mailto:
>> iwase.yusu...@gmail.com>>
>>                           <mailto:iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com>
>>                  <mailto:iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com>>> <mailto:iwase.yusu...@gmail.co
>> m
>>
>>         <mailto:iwase.yusu...@gmail.com>
>>
>>                  <mailto:iwase.yusu...@gmail.com <mailto:
>> iwase.yusu...@gmail.com>>
>>
>>                           <mailto:iwase.yusu...@gmail.com
>>         <mailto:iwase.yusu...@gmail.com>
>>                  <mailto:iwase.yusu...@gmail.com
>>         <mailto: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,
>>         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 <mailto:Ryu-devel@lists.source
>> forge.net>
>>         <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>>
>>                           <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>
>>
>>                           <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>>>
>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>>
>>                                  <https://lists.sourceforge.ne
>> t/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>>>
>>                                                   <
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>>
>>                                  <https://lists.sourceforge.ne
>> t/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <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 <mailto:Ryu-devel@lists.source
>> forge.net>
>>         <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>
>>                  <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>>
>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>>
>>                                  <https://lists.sourceforge.ne
>> t/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <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 <mailto:Ryu-devel@lists.source
>> forge.net>
>>         <mailto:Ryu-devel@lists.sourceforge.net
>>         <mailto:Ryu-devel@lists.sourceforge.net>>
>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>                  <https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <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 <mailto:Ryu-devel@lists.source
>> forge.net>
>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>         <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
>>
>>


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

Reply via email to