Configuring Load Balancing Conditions
Configuring Unicast Route Load Balancing
Before configuring unicast route load balancing, please attention to the maximum number of routes of the unicast routing table. The route load balancing increases the number of routes.
Configuring Load Balancing Among IGP Routes
Configuration Procedure:
- Deploy multiple links of the same cost/metric to achieve load
balancing.
NOTE:
Modification of IGP cost impacts on BGP route selection. - (Optional) set the maximum number of routes among which load balancing is performed. For different products and different protocols, the maximum number of equal-cost routes is different, as shown in Table 10-4.
Route Type | Command Format | Views | Maximum number |
---|---|---|---|
Static route | NA | - | 64 |
OSPF | maximum load-balancing number | OSPF view | 64 |
OSPFv3 | maximum load-balancing number | OSPFv3 view | 64 |
IS-IS | maximum load-balancing number | IS-IS view, IS-IS topology view, or IS-IS IPv6 topology view | 64 |
IS-IS IPv6 | ipv6 maximum load-balancing number NOTE:
This command is valid only for an IPv6 base topology, and invalid for IPv6 routes in multi-topology. The maximum load-balancing number command in the IS-IS IPv6 topology view is used to configure load balancing among IPv6 routes in multi-topology. |
IS-IS view |
64 |
RIP | maximum load-balancing number | RIP view | 64 |
RIPng | maximum load-balancing number | RIPng view | 64 |
Configuring Load Balancing Among BGP Routes
Solution 1: Static routes or equal-cost IGP routes for BGP route iteration.
Configuration Procedure:
- Establish the BGP peers relationship using Loopback interface.
NOTE:
If loopback interfaces are used to establish an EBGP peer relationship, the peer ebgp-max-hop command (hop-count >= 2) must be run; otherwise, the peer relationship cannot be established. - Deploy multiple links between the BGP peers.
- Configure multiple static routes or equal-cost IGP routes to the loopback interface address of the remote BGP peer.
- Set the maximum number of routes among which load balancing is
performed, see Table 10-5.
NOTE:
By default, the maximum number of equal-cost BGP routes is 1, that is, the load balancing among BGP routes is not enabled by default.
If the maximum load-balancing command is configured, when the routes advertised from the EBGP peer is advertised to IBGP peers, the next hop address of the routes are set as the local IP address by which the IBGP peer is established. If the maximum load-balancing command is not configured, the next hop address of the routes is not changed when the routes is advertised to the IBGP peer, unless the peer next-hop-local command is configured.
Table 10-5 Configuration Guide for Maximum Number of BGP Load-balancingRoute Type Command Format Views Default value BGP - Run the maximum load-balancing [ ebgp | ibgp ] number command to set the maximum number of equal-cost routes.
- (Optional) run the load-balancing as-path-ignore command to configure a router to ignore comparing the AS_Path attributes of the routes among which load balancing is performed.
- Run the commit.
BGP view, BGP IPv4 unicast address family view, BGP IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view 1 EBGP and IBGP - Run the maximum load-balancing eibgp eibgp number command to set the maximum number of equal-cost routes.
- (Optional) run the load-balancing as-path-ignore command to configure a router to ignore comparing the AS_Path attributes of the routes among which load balancing is performed.
- Run the commit.
BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view 1 For application case of Solution 1, see BGP Route Load Balancing in an RR Scenario.
- Establish the BGP peers relationship using Loopback interface.
Solution 2: Modify BGP route attributes according to the rule of BGP route selection.
Configuration Procedure:
- Deploy multiple links between the BGP peers.
- Modify BGP route attributes according to the rule of BGP route selection. For detailed information about the rule of BGP route selection, see Load Balancing Among BGP Routes.
- Set the maximum number of routes among which load balancing is performed, see the above table.
Solution 3: Divide the destination addresses into multiple groups and deploy multiple links between the BGP peers, one link for each group.
Suitable scenarios: there are multiple EBGP peers in the same AS to the same destination.
Configuration Procedure:
- Configure a static route to the Loopback address of the EBGP peer on each EBGP routers. The static routes are used for BGP route iteration, and then traffic is load-balanced among the BGP routes.
- Configure ACL, IP-prefix, AS-Path filter, community-filter, extcommunity-filter, or Route Distinguisher (RD) filter to divide the destination addresses into multiple groups.
- Configure route policies to sets the next hop address as the Loopback address of the EBGP peer so that one link is used for each group.
- Apply the route policies to the routes advertisement from the EBGP routers to RR or IBGP peer.
For application case of Solution 3, see Solution to the Low Equal-Cost Route Specification on the Remote Device Without Interrupting Services.
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.
Configuring Multicast Route Load Balancing
Configuring Multicast Load Balancing Mode
- Run the system-view command to enter the system view.
(Optional) Run the ip vpn-instance vpn-instance-name command to enter the VPN instance view.
If the multicast route belongs to public rather than VPN, the step 2 cannot be configured.
Run the multicast load-splitting { balance-ucmp | stable-preferred | source | group | source-group } command to configure the multicast load balancing mode.
By default, load balancing among multicast routes is disabled.
- Run the commit.
Configuring Layer 2 Multicast Trunk Load Balancing
- Run the system-view command to enter the system view.
- Run the vlan vlan-id command to enter the VLAN view, or run the vsi vis-name command to enter the VSI view.
Run the trunk multicast load-balance enable command to enable trunk multicast load-balance.
By default, trunk load balancing is not enabled for Layer 2 multicast.
In the same VLAN or VSI, the trunk load balancing function for Layer 2 multicast and IGMP snooping are mutual exclusive. They cannot be configured concurrently.
- Run the commit.
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.
Configuring Eth-Trunk Load Balancing
Configuring Load Balancing in Eth-Trunk Interface
- Run the system-view command to enter the system view.
- Run the interface eth-trunk number command to enter the Eth-Trunk interface view.
Run the mode { lacp-static | manual load-balance } to set the working mode of the Eth-Trunk interface.
- lacp-static: indicates the static LACP mode. In this mode, both load balancing and redundancy backup can be implemented.
- manual load-balance: indicates the manual load balancing mode. By default, an Eth-Trunk interface works in manual load balancing mode.
- (Optional) run the interface interface-type interface-number command to enter the Eth-Trunk member interface view.
(Optional) run the distribute-weight weight-value command to set the distribute-weight of the member interface.
By default, the weight of an Eth-Trunk member interface is 1.
The higher the weight of a member interface, the heavier the load over the member link.
A maximum of 64 member interfaces in an Eth-Trunk interface can carry out load balancing. The total weights of all member interfaces in an Eth-Trunk interface cannot be greater than 64.
When multicast traffic is transmitted over an Eth-Trunk interface, if the distribute-weight command is used to change the weight of a member interface, you need to run the shutdown and then undo shutdown commands to restart the member interface for the configuration to take effect.
- Run the commit.
Configuring Layer 2 Multicast Trunk Load Balancing
- Run the system-view command to enter the system view.
- Run the vlan vlan-id command to enter the VLAN view, or run the vsi vis-name command to enter the VSI view.
Run the trunk multicast load-balance enable command to enable trunk multicast load-balance.
By default, trunk load balancing is not enabled for Layer 2 multicast.
In the same VLAN or VSI, the trunk load balancing function for Layer 2 multicast and IGMP snooping are mutual exclusive. They cannot be configured concurrently.
- Run the commit.
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.
Configuring Tunnel Load Balancing
Run the system-view command to enter the system view.
Run the tunnel-policy policy-name to create a tunnel policy.
- (Optional) Run the description text to configure description information to the tunnel policy.
- Run the tunnel select-seq { gre | lsp | cr-lsp } * load-balance-number load-balance-number command to configure the sequence in which each type of tunnel is selected and the number of tunnels participating in load balancing.
- Apply the tunnel policy.
- Apply the tunnel policy to BGP/MPLS IP VPN:
- Run the system-view command to enter the system view.
- Run the ip vpn-instance vpn-instance-name command to enter the VPN instance view.
- Run the ipv4-family command to enter the VPN instance IPv4 address family view.
- Run the tnl-policy policy-name command to apply the tunnel policy.
- Apply the tunnel policy to a BGP/MPLS IPv6
VPN.
- Run the system-view command to enter the system view.
- Run the ip vpn-instance vpn-instance-name command to enter the VPN instance view.
- Run the ipv6-family command to enter the VPN instance IPv6 address family view.
- Run the tnl-policy policy-name command to apply the tunnel policy.
- Apply the tunnel policy to an SVC VLL.
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the AC interface view.
- Run the mpls static-l2vc destination ip-address transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value tunnel-policy tnl-policy-name command to apply the tunnel policy to SVC VLL.
- Apply the tunnel policy to a Martini VLL.
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the AC interface view.
- Run the mpls l2vc ip-address vc-id tunnel-policy policy-name command to apply the tunnel policy to Martini VLL.
- Apply the tunnel policy to a Martini VPLS.
- Run the system-view command to enter the system view.
- Run the vsi vsi-name [ auto | static ] to create a VSI.
- Run the pwsignal ldp command to enter the VSI-LDP view.
- Run the vsi-id vsi-id command to set VSI-ID.
- Run the peer peer-address [ negotiation-vc-id vc-id ] tnl-policy policy-name command to apply the tunnel policy to a VSI peer.
- Apply the tunnel policy to a PWE3.
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the AC interface view.
- Choose one of the following options to apply the tunnel policy
to a PW.
- For a dynamic PW, run: mpls l2vc { pw-template pw-template-name | ip-address } * vc-id tunnel-policy policy-name
- For a static PW, run: mpls static-l2vc { { destination ip-address | pw-template pw-template-name vc-id } * | destination ip-address [ vc-id ] } transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value tunnel-policy tnl-policy-name
- Apply the tunnel policy to BGP/MPLS IP VPN:
- Run the commit.
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.
Configuring Load Balancing for Redirected Traffic
- Run the system-view command.
- Run the traffic classifier classifier-name [ operator { and | or } ] command to create a traffic classier.
- Configure match clauses for the traffic classifier. Currently, the match clauses that can be configured is shown in Table 10-6.
- Run the traffic behavior behavior-name command to create a traffic behavior.
Run the redirect ipv4-multinhp { nhp ip-address interface interface-type interface-number } &<2-16> loadbalance command to make the redirected packets be forwarded in load-balancing mode.
NOTE:
The outbound interfaces of the traffic cannot be QinQ sub-interfaces.- Run the traffic policy policy-name to create a traffic policy.
- Run the classifier classifier-name behavior behavior-name [ precedence precedence ] command to specify the traffic behavior of the traffic classier.
- Apply the traffic policy.
- Apply to BAS interfaces:
- Run the system-view command.
- Run the traffic-policy policy-name inbound command to apply the traffic policy to bas interfaces.
- Apply to other types of interfaces:
- Run the interface interface-type interface-number command in the system view to enter a interface view.
Run the traffic-policy policy-name inbound [ link-layer | all-layer ] command to apply the traffic policy to the interfaces in inbound direct.
NOTE:
A traffic policy containing redirect actions can be applied to only the inbound direct of an interface.
- Apply to BAS interfaces:
- Run the commit.
Command Syntax | Function |
---|---|
if-match [ ipv6 ] acl { acl-number | name acl-name } | Matching against ACL rules |
if-match [ ipv6 ] dscp dscp-value | Matching against DSCP |
if-match tcp syn-flag tcpflag-value | Matching against IPv4 TCP Flags |
if-match ip-precedence ip-precedence | Matching against IP Precedence |
if-match mpls-exp exp-value | Matching against MPLS EXP |
if-match 8021p 8021p-value | Matching against 802.1p in VLAN |
if-match destination-mac mac-address | Matching against destination MAC in VLAN |
if-match source-mac mac-address | Matching against Source MAC in VLAN |
if-match [ ipv6 ] any | Matching all IP packets |
if-match ipv6 next-header header-number first-next-header | Matching against IPv6 next header |
if-match ipv6 source-address ipv6-address prefix-length | Matching against IPv6 source address |
if-match ipv6 destination-address ipv6-address prefix-length | Matching against IPv6 destination address |
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.
Configuring UCMP
Support not only routing UCMP, but also LSP/Tunnel UCMP which supports L2VPN and MPLS P scenarios.
Routing UCMP can be deployed in two methods.
Method 1: Enable Routing UCMP globally
- Run the system-view command to enter the system view.
Run the load-balance unequal-cost enable command to enable UCMP globally.
By default, UCMP is not enabled in the system.
When the UCMP is enabled globally, the UCMP takes effect on Ethernet interfaces, Gigabit Ethernet interfaces, POS interfaces, Eth-Trunk interfaces and IP-Trunk interfaces, and TE tunnel interfaces.
- Run the commit.
Method 2: Enable UCMP on the interfaces
- Run the system-view command to enter the system view.
- Run the interface interface-type interface-number command to enter the interface view.
Run the load-balance unequal-cost enable command to enable UCMP on the interface.
This command cannot be enabled on logical interfaces. It can be enabled only on physical interfaces.
- Run the shutdown and undo shutdown commands in order to restart the interface so that the UCMP configuration takes effect. Routes and FIB entries are refreshed only when you restart the interface after UCMP is enabled or disabled on the interface.
- Run the commit.
Enable UCMP for LSP/Tunnel
Views | Command Format | Function and Scenarios |
---|---|---|
System view | load-balance mpls unequal-cost enable | Enables UCMP for LSPs on an MPLS P node. If unequal-cost load balancing is enabled and the MPLS P has multiple outbound interfaces, unequal-cost load balancing is performed among the outbound interfaces based on bandwidth weights. If unequal-cost load balancing is disabled and the MPLS P has multiple outbound interfaces, equal-cost load balancing is performed among the outbound interfaces. To enable the MPLS UCMP function, run the load-balance mpls unequal-cost enable command. |
Follow-up Procedure
Run the save command to save the current configuration to the configuration file when a set of configuration is finished and the expected functions have been achieved.