if-match as-path
Use if-match as-path to match BGP routes whose AS_PATH attribute matches a specified AS path list.
Use undo if-match as-path to remove the specified AS path list match criterion.
Syntax
if-match as-path as-path-number&<1-32>
undo if-match as-path [ as-path-number&<1-32> ]
Default
No AS path list match criterion is configured.
Views
Routing policy node view
Predefined user roles
network-admin
Parameters
as-path-number&<1-32>: Specifies an AS path list by its number in the range of 1 to 256. &<1-32> indicates that you can specify a maximum of 32 AS path lists.
Examples
# Configure AS path list 2 to permit BGP routes containing AS number 200 or 300 to pass. Configure node 10 in permit mode for routing policy test to match AS path list 2.
<Sysname> system-view [Sysname] ip as-path 2 permit _*200.*300 [Sysname] route-policy test permit node 10 [Sysname-route-policy-policy1-10] if-match as-path 2
Related commands
apply as-path
ip as-path