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, no limit is configured on the maximum number of AS numbers in the AS_Path attribute, but the maximum number of AS numbers carried in the AS_Path attribute is limited by the BGP message length.
Parameter | Description | Value |
---|---|---|
limit |
Specifies the maximum number of AS numbers in the AS_Path attribute. |
The value is an integer ranging from 1 to 2000. The default value is 255. The maximum value of limit for the 2-byte and 4-byte AS number is the same. If limit is not specified, the maximum number of AS numbers in the AS_Path attribute 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 summarized routes are generated.
Configuration Impact
After the as-path-limit command is configured, the device checks whether the number of AS numbers in the AS_Path attribute of each received or advertised route exceeds the maximum value. If the number of AS numbers exceeds the maximum value, the Router discards the route. Therefore, if the maximum number of AS numbers in the AS_Path attribute is set too small, routes will be lost.