The if-match clauses define the rules for matching certain route attributes.
if-match clauses: define the matching rules. The matching rules are used by the routes that match the Route-Policy. The matching objects refer to some attributes of the route.
If no if-match clause is specified, all the routes can pass the filtering on the node.
route-policy route-policy-name { permit | deny } node node
Configure an ACL to match the routes.
if-match acl acl-number
Configure a cost to match the routes.
if-match cost cost
Configure the outbound interface to match the routes.
if-match interface interface-type interface-number
Configure the next hop or the source address to match the routes.
if-match ip { next-hop | route-source | group-address } { acl acl-number | ip-prefix ip-prefix-name }
Configure the IP prefix list to match the routes.
if-match ip-prefix ip-prefix-name
For the same Route-Policy node, you cannot run the if-match acl command and the if-match ip-prefix command at the same time. This is because the latest configuration overrides the previous configuration.
Configure an if-match clause to match AS_Path filters.
if-match as-path-filter { as-path-filter-number &<1-16> | as-path-filter-name }
Configure an if-match clause to match the community attributes of BGP routing information.
if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-filter-num } &<1-16>
Configure an if-match clause to match the extended community attribute of BGP routing information.
if-match extcommunity-filter { { basic-extcomm-filter-num | adv-extcomm-filter-num } &<1-16> | extcomm-filter-name }
Configure the route type (OSPF in this case) to match the routes.
if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 }
Configure the destination address, next hop, or the source address to match the ipv6 routes.
if-match ipv6 { address | next-hop | route-source } prefix-list prefix-list-name
Configure the route type (IS-IS in this case) to match the routes.
if-match route-type { is-is-level-1 | is-is-level-2 }
Configure the tag to match the routes.
if-match tag tag
Configure the preference to match the routes.
if-match preference preference
The commands in step 3 can be used regardless of the order. A node can have multiple or no if-match clauses.