load-balancing (BGP-EVPN address family view)

Function

The load-balancing as-path-ignore command configures a router not to compare the AS_Path attributes of routes that are to be used for load balancing.

The undo load-balancing as-path-ignore command cancels the configuration.

The load-balancing as-path-relax command configures BGP to compare only the AS_Path lengths of the routes to be used for load balancing. Routes with different AS-Path attributes can form equal-cost routes as long as the AS-Path lengths of the routes are the same.

The undo load-balancing as-path-relax command cancels the configuration.

By default, a device compares the AS_Path attributes of the routes to be used for load balancing.

Format

load-balancing { as-path-ignore | as-path-relax }

undo load-balancing { as-path-ignore | as-path-relax }

Parameters

None

Views

BGP-EVPN address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After the load-balancing as-path-ignore command is run, the device does not compare the AS_Path attributes (including the length and contents) of the routes to be used for load balancing. This command will change the conditions for load balancing among routes. Therefore, exercise caution when running this command.

When load balancing is performed among routes, the AS-Path attribute is processed in the following ways:

  • The AS_Path attributes of the routes must be the same so that load balancing can be implemented.
  • Ignores the AS_Path attribute. This function can be configured using the load-balancing as-path-ignore command. After this command is run, the device does not compare the AS-Path attributes of the routes to be used for load balancing. In this case, routes can participate in load balancing even if their AS_Path attributes are different.
  • The compares only the length of the AS_Path attribute, regardless of the content of the AS_Path attribute. You can run the load-balancing as-path-relax command to configure the to compare the length of the AS_Path attribute. After this command is run, the device compares only the AS_Path lengths of the routes to be used for load balancing. Load balancing can be implemented as long as the AS_Path lengths of the routes are the same. If the AS_Path lengths of the routes are different, load balancing cannot be implemented. For example, the AS_Path attribute of route A is 10 and the AS_Path attribute of route B is 10 20. In this case, load balancing cannot be implemented. The load-balancing as-path-relax command is mainly used in BGP route load balancing scenarios. Exercise caution when using this command because it will change the conditions for load balancing.

Precautions

The load-balancing as-path-ignore command and the bestroute as-path-ignore command are mutually exclusive. This means that if the bestroute as-path-ignore command is configured, the load-balancing as-path-ignore command cannot be configured.

If both the load-balancing as-path-relax and load-balancing as-path-ignore commands are run, the latest configuration overrides the previous one.

If the load-balancing as-path-ignore or load-balancing as-path-relax command is run, but as-path-ignore or as-path-relax is not specified in the peer load-balancing command, the configuration of the load-balancing as-path-ignore or load-balancing as-path-relax command takes effect. If as-path-ignore or as-path-relax is specified in the peer load-balancing command, the configuration specified in the peer load-balancing command takes effect.

Example

# Configure a device to ignore comparing the AS_Path attributes of the same length when selecting routes for load balancing.
<HUAWEI> system-view
[*HUAWEI] bgp 100
[*HUAWEI-bgp] l2vpn-family evpn
[*HUAWEI-bgp-af-evpn] load-balancing as-path-relax
# Configure a device not to compare the AS_Path attributes of the routes to be used for load balancing.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] l2vpn-family evpn
[*HUAWEI-bgp-af-evpn] load-balancing as-path-ignore
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >