The as-path-limit command sets the maximum number of AS numbers in the AS_Path attribute.
The undo as-path-limit command restores the default setting.
By default, the maximum number of AS numbers in the AS_Path attribute is 2000.
| Parameter | Description | Value |
|---|---|---|
| as-path-limit-num | Specifies the maximum number of AS numbers in the AS-Path
attribute. NOTE:
The maximum value of as-path-limit-num for the 2-byte and 4-byte AS number is the same. |
The value is an integer ranging from 1 to 2000. By default, the value is 255. |
Usage Scenario
This command is used to restrict the maximum number of AS numbers in the AS_Path attribute only when the AS_Path attribute is reconstructed or the aggregated routes are generated.
Configuration Impact
After the as-path-limit command is configured, a router checks whether the number of AS numbers in the AS-Path attribute of the incoming route exceeds the maximum value. If the number of AS numbers exceeds the maximum value, the local router discards the route. Therefore, if the maximum number of AS numbers in the AS-Path attribute is set too small, routes are lost.