Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

LAG Select Group

If user wants the traffic load balance like lag interface and doesn't want special configuration lag interface, lag select group is one choice. 

Select group uses lag, create an lag interface for each select group, and the lag interface contains egress interfaces which corresponds to buckets in the group. 

PICOS reserve ae1 to ae20 for static lag configuration, ae21 to ae48 use the internal lag for select group. 

PICOS will create internal lag when the user creates a lag select group. It only uses the first bucket actions except the output. It means that we can support 24 lag select groups. 

The physical port which has added in lag-select-group cannot be used in other groups and cannot work as one physical port.

 

Before add lag select group, user need configure group range.

The command to configure lag-select-group ID range:

ovs-vsctl set-group-ranges lag-select-groups=<min_value>-<max_value>

The group IDs may be divided into different areas: lag-select-groups and the original groups. Lag-select-groups ranges is <min_value>-<max_value> and the rest of group IDs for original groups. After configure the command, user needs to reboot switch. 

admin@PicOS-OVS$ovs-vsctl set-group-ranges lag-select-groups=1-10000
admin@PicOS-OVS$ovs-vsctl show-group-ranges                         
group_ranges: 
  lag-select-groups=1-10000
  ecmp-select-groups=0-0
  ingress-mirror-groups=0-0
  egress-mirror-groups=0-0

In lag select group can modify any fields switch support. And the actions must be configured in first bucket, other buckets only include output.

Example 1 

Set group 1 as a lag select group, modify dl_vlan and dl_dst.

 admin@PicOS-OVS$ovs-ofctl add-group br0 group_id=1,type=select,bucket=set_field:1000-\>vlan_vid,set_field:00:00:00:11:11:11-\>eth_dst,output:32,bucket=output:33,bucket=output:34
admin@PicOS-OVS$ovs-ofctl add-flow br0 in_port=31,actions=group:1
admin@PicOS-OVS$
admin@PicOS-OVS$ovs-appctl pica/dump-flows
#0 normal_d permanent flow_id=2 priority=0, actions:drop
#1 normal permanent flow_id=6 (lag select group) in_port=31, actions:set(eth_dst((dst=00:00:00:11:11:11))),set_vlan_id(vid=1000),1045
Total 2 flows in HW.

 

Close all Group-ranges

If user want close the group-ranges, please use command as below.

ovs-vsctl set-group-ranges

admin@PicOS-OVS$ovs-vsctl set-group-ranges
admin@PicOS-OVS$ovs-vsctl show-group-ranges                         
group_ranges: 
  lag-select-groups=0-0
  ecmp-select-groups=0-0
  ingress-mirror-groups=0-0
  egress-mirror-groups=0-0

  • No labels