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 |
---|---|---|
as-path-limit-num |
Specifies the maximum number of AS numbers in the AS-Path attribute. |
The value is an integer that ranges from 1 to 2000. NOTE:
|
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.
Precautions
After the as-path-limit command is configured, a switch 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 local switch discards the route. Therefore, if the maximum number of AS numbers in the AS-Path attribute is set too small, routes are lost.