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:
- Requires that the routes for load balancing have the same AS_Path attribute.
- Ignores comparing the AS_Path attributes if the load-balancing as-path-ignore command is run. If the command is run, it is not required that the routes for load balancing have the same AS_Path attribute.
- Ignores the AS_Path content and compares only AS_Path lengths. To configure this function, run the load-balancing as-path-relax command. After this command is run, only the AS_Path lengths are compared and the AS_Path content is not compared when selecting routes for load balancing. That is, load balancing can be implemented as long as the AS_Paths have the same length and routes cannot participate in load balancing if their AS_Path attributes are of different lengths. For example, the AS_Path attribute of route A is 10, and the AS_Path attribute of route B is 10, 20. Because the two AS_Path attributes are of different lengths, the two routes cannot participate in load balancing.
The load-balancing as-path-relax command mainly applies to BGP route load balancing scenarios. Exercise caution when using the command because the execution of this command will change the conditions of load balancing.
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.