Example for Configuring Eth-Trunk Load Balancing
Networking Requirements
As shown in Figure 3-25, a link aggregation group (LAG) on two Switches. The LAG contains four member interfaces. Service traffic from SwitchA to SwitchB is unevenly load balanced on four links. In outgoing packets of the Eth-Trunk on SwitchA, the source MAC address and IP address change.
Configuration Roadmap
The configuration roadmap is as follows:
Adjust the hash algorithm in the load balancing profile based on the traffic model to implement load balancing.
Procedure
- Check load balancing of member interfaces of Eth-Trunk 1 on SwitchA. Outgoing traffic of the four member interfaces is unevenly load balanced.
[~SwitchA] display interface brief PHY: Physical *down: administratively down ^down: standby (l): loopback (s): spoofing (b): BFD down (e): ETHOAM down (d): Dampening Suppressed (p): port alarm down (dl): DLDP down (c): CFM down (sd): STP instance discarding InUti/OutUti: input utility rate/output utility rate Interface PHY Protocol InUti OutUti inErrors outErrors Eth-Trunk1 up up 0% 50.00% 0 0 10GE1/0/1 up up 0% 46.00% 0 0 10GE1/0/2 up up 0% 51.99% 0 0 10GE1/0/3 up up 0% 51.99% 0 0 10GE1/0/4 up up 0% 50.00% 0 0
- In outgoing packets of the Eth-Trunk on SwitchA, the source MAC address and IP address change. Adjust the hash algorithm in the load balancing profile based on the traffic model to hash-mode(8).
By default, the hash algorithm in the load balancing profile is hash-mode(1).
When outgoing traffic is unevenly load balanced, adjust the load balancing mode on the current device. When incoming traffic is unevenly load balanced, adjust the load balancing mode on the uplink device.
[~SwitchA] load-balance profile default [~SwitchA-load-balance-profile-default] eth-trunk hash-mode 8 [*SwitchA-load-balance-profile-default] commit [~SwitchA-load-balance-profile-default] quit
- Check load balancing of member interfaces of Eth-Trunk 1 on SwitchA. Outgoing traffic of the four member interfaces is evenly load balanced.
[~SwitchA] display interface brief PHY: Physical *down: administratively down ^down: standby (l): loopback (s): spoofing (b): BFD down (e): ETHOAM down (d): Dampening Suppressed (p): port alarm down (dl): DLDP down (c): CFM down (sd): STP instance discarding InUti/OutUti: input utility rate/output utility rate Interface PHY Protocol InUti OutUti inErrors outErrors Eth-Trunk1 up up 0% 50.00% 0 0 10GE1/0/1 up up 0% 49.99% 0 0 10GE1/0/2 up up 0% 50.00% 0 0 10GE1/0/3 up up 0% 49.99% 0 0 10GE1/0/4 up up 0% 49.99% 0 0
Configuration Files
Configuration file of SwitchA
# sysname SwitchA # load-balance profile default eth-trunk hash-mode 8 # vlan batch 10 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # interface 10GE1/0/4 eth-trunk 1 # return
Configuration file of SwitchB
# sysname SwitchB # vlan batch 10 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # interface 10GE1/0/4 eth-trunk 1 # return