OcNOS-SP : Layer 2 Guide : Layer 2 Configuration Guide : Link Aggregation Configuration : Port-Channel Weight
Port-Channel Weight
Use the port-channel weight command to configure weighted load balancing on port-channel member links. As per the weights configured, traffic distribution will be happening across the member interfaces.
Consider if ports xe1 and xe2 associated with the L2 lag, having default load-balance as src-dst-mac and by default, best traffic distribution can happen up to 50% on each link (by varying source and destination MACs). After weight configured as 2 on interface xe1, the best traffic distribution can happen as 66.66% and 33.33% on xe1 and xe2 respectively.
Port-Channel Weight with Dynamic LAG
Topology
Figure 12-26: Port-Channel weight with dynamic LAG
SW1
 
#configure terminal
Enter configure mode.
(config)#hostname SW1
Configure host name
(config)#bridge 1 protocol rstp vlan-bridge
Create a RSTP VLAN bridge on customer side
(config-vlan)#vlan database
Enter VLAN database mode.
(config-vlan)#vlan 2-100 bridge 1 state enable
Configure VLAN for the bridge
(config-vlan)#commit
Commit the candidate configuration to the running configuration.
(config-vlan)#exit
Exit the VLAN configure mode.
(config)#interface xe14
Enter interface mode
(config-if)#switchport
Make interface as Switchport
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed VLAN all on the interface
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface po1
Enter the interface mode
(config-if)#switchport
Make the interface as switch port
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed vlan all for the hybrid mode
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface xe7
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#port-channel weight 10
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe9
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#port-channel weight 2
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe13
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#port-channel weight 16
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe15
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#port-channel weight 5
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe19
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#port-channel weight 13
Configuring port-channel weight
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
SW2
 
#configure terminal
Enter configure mode.
(config)#hostname SW2
Configure host name
(config)#bridge 1 protocol rstp vlan-bridge
Create a RSTP VLAN bridge on customer side
(config)#vlan database
Enter the VLAN database mode.
(config-vlan)#vlan 2-100 bridge 1 state enable
Configure VLAN for the bridge
(config-vlan)#commit
Commit the candidate configuration to the running configuration.
(config-vlan)#exit
Exit the VLAN configure mode.
(config)#interface xe11
Enter interface mode
(config-if)#switchport
Make interface as Switchport
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed VLAN all on the interface
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface po1
Enter the interface mode
(config-if)#switchport
Make the interface as switch port
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed vlan all for the hybrid mode
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface xe7
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe9
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe13
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe15
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe19
Enter interface mode
(config-if)#channel-group 1 mode active
Adding interface to channel-group 1
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
Validation
As per the weights configured, traffic distribution will be happening across the member interfaces.
SW1#show etherchannel summary
Aggregator po1 100001
Aggregator Type: Layer2
Admin Key: 0001 - Oper Key 0001
Link: xe7 (5008) weight: 10 sync: 1
Link: xe9 (5010) weight: 2 sync: 1
Link: xe13 (5014) weight: 16 sync: 1
Link: xe15 (5016) weight: 5 sync: 1
Link: xe19 (5020) weight: 13 sync: 1
SW1#show int counters rate mbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx mbps | Rx pps | Tx mbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
po1 0.00 0 280.03 50005
xe7 0.00 0 61.02 10896
xe8 0.00 0 0.00 0
xe9 0.00 0 12.18 2175
xe10 0.00 0 0.00 0
xe12 0.00 0 0.00 0
xe13 0.00 0 97.23 17361
xe14 280.03 50004 0.00 0
xe15 0.00 0 30.27 5405
xe16 0.00 0 0.00 0
xe18 0.00 0 0.00 0
xe19 0.00 0 79.33 14166
SW1#
 
Port-Channel Weight with Static LAG
Topology
Figure 12-27: Figure 9-78: Port-channel weight with static LAG
SW1
 
#configure terminal
Enter configure mode.
(config)#hostname SW1
Configure host name
(config)#bridge 1 protocol rstp vlan-bridge
Create a RSTP VLAN bridge on customer side
(config)#vlan database
Enter VLAN database mode.
(config-vlan)#vlan 2-100 bridge 1 state enable
Configure VLAN for the bridge
(config-vlan)#commit
Commit the candidate configuration to the running configuration.
(config-vlan)#exit
Exit the VLAN configure mode.
(config)#interface xe14
Enter interface mode
(config-if)#switchport
Make interface as Switchport
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed VLAN all on the interface
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface sa1
Enter the interface mode
(config-if)#switchport
Make the interface as switch port
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed vlan all for the hybrid mode
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface xe7
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#port-channel weight 16
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe9
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#port-channel weight 14
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe13
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#port-channel weight 10
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe15
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#port-channel weight 8
Configuring port-channel weight
(config-if)#exit
Exit interface mode.
(config)#interface xe19
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#port-channel weight 16
Configuring port-channel weight
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
SW2
 
#configure terminal
Enter configure mode.
(config)#hostname SW2
Configure host name
(config)#bridge 1 protocol rstp vlan-bridge
Create a RSTP VLAN bridge on customer side
(config)#vlan database
Enter VLAN database mode.
(config-vlan)#vlan 2-100 bridge 1 state enable
Configure VLAN for the bridge
(config-vlan)#commit
Commit the candidate configuration to the running configuration.
(config-vlan)#exit
Exit the VLAN configure mode.
(config)#interface xe11
Enter interface mode
(config-if)#switchport
Make interface as Switchport
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed VLAN all on the interface
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface sa1
Enter the interface mode
(config-if)#switchport
Make the interface as switch port
(config-if)#bridge-group 1
Associate the interface to bridge
(config-if)#switchport mode hybrid
Configure the mode as hybrid
(config-if)#switchport hybrid allowed vlan all
Configure allowed vlan all for the hybrid mode
(config-if)#load-interval 30
Configure load period in multiple of 30 seconds
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
(config)#interface xe7
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe9
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe13
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe15
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#exit
Exit interface mode.
(config)#interface xe19
Enter interface mode
(config-if)#static-channel-group 1
Adding interface to static channel-group 1
(config-if)#commit
Commit the candidate configuration to the running configuration.
(config-if)#exit
Exit the configure mode.
Validation
As per the weights configured, traffic distribution will be happening across the member interfaces.
SW1
SW1#show static-channel-group
Static Aggregator: sa1
Member Status weight
xe7 up 16
xe9 up 14
xe13 up 10
xe15 up 8
xe19 up 16
SW1#show int counters rate mbps
+-------------------+--------------+-------------+--------------+-------------+
| Interface | Rx mbps | Rx pps | Tx mbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
sa1 0.00 0 280.03 50005
xe7 0.00 0 70.01 12501
xe8 0.00 0 0.00 0
xe9 0.00 0 61.27 10941
xe10 0.00 0 0.00 0
xe12 0.00 0 0.00 0
xe13 0.00 0 43.80 7820
xe14 280.03 50004 0.00 0
xe15 0.00 0 34.95 6240
xe16 0.00 0 0.00 0
xe18 0.00 0 0.00 0
xe19 0.00 0 70.01 12501
SW1#
 
 
Last modified date: 10/12/2023