An AS_Path filter is used to filter BGP routes by matching against AS_Path attributes. The AS_Path attribute records the numbers of all ASs through which a BGP route passes from the local end to the destination in the distance-vector (DV) order. In this case, AS_Path attribute-based filtering rules can be defined to filter BGP routes.
The matching condition of an AS_Path filter is specified using a regular expression. For example, ^30 indicates that only the AS_Path attribute starting with 30 is matched. Using a regular expression can simplify configurations. For details on how to use regular expressions, see the command line description in the Configuration Guide > Basic Configuration.
The AS_Path filter takes effect only on BGP routes because the AS_Path attribute is a private attribute of BGP.
The system view is displayed.
An AS_Path filter is configured.
regular-expression defines a matching rule for the AS_Path filter.
The configuration is committed.
Run the display ip as-path-filter [ as-path-filter-number | as-path-filter-name ] command to check information about the configured AS_Path filter.