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