The load-balancing as-path-ignore command prevents a router from comparing the AS_Path attributes of routes when selecting routes for load balancing.
The undo load-balancing as-path-ignore command cancels the configuration.
The load-balancing as-path-relax command configures a device to compare AS_Path lengths rather than AS_Path content when selecting routes for load balancing. That is, routes with different AS_Path attributes can be selected for load balancing as long as their AS_Path lengths 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, a router does not compare the AS-Path attributes of routes (including the AS_Path length and content) when selecting routes for load balancing. Exercise caution when using the command because the execution of this command will change the conditions of load balancing.
When selecting routes for load balancing, BGP processes the AS_Path attributes as follows:Precautions
The load-balancing as-path-ignore command and the bestroute as-path-ignore command are mutually exclusive.
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 peer load-balancing command without as-path-ignore or as-path-relax specified and the load-balancing as-path-ignore or load-balancing as-path-relax command are run, the load-balancing as-path-ignore or load-balancing as-path-relax command takes effect. If the peer load-balancing command with as-path-ignore or as-path-relax specified and the load-balancing as-path-ignore or load-balancing as-path-relax command are run, the peer load-balancing command takes effect.<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpnv4 [*HUAWEI-bgp-af-vpnv4] load-balancing as-path-relax
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpnv4 [*HUAWEI-bgp-af-vpnv4] load-balancing as-path-ignore