An AS_Path filter is used to filter routes based on the AS_Path attributes of BGP routes. If you do not want to receive routes of a specified AS number, configure an AS_Path filter based on the specified AS number. On a complex network, multiple ACLs or IP prefix lists must be configured to filter BGP routes. This can be a complicated process; configuring an AS_Path filter can simplify the configuration.

You can use the following command to configure the AS_Path filter.

set routing as-path-list <as-path-list-name> {deny|permit} regex <txt>

The following example configures an AS Path list, permit routes that contain 20 in the AS_Path to pass through.

admin@Xorplus# set routing as-path-list Aslist permit regex _20_
admin@Xorplus# commit