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.
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: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.<HUAWEI> system-view [*HUAWEI] bgp 100 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] load-balancing as-path-relax
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] load-balancing as-path-ignore