Specifications

Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy on Cisco IOS XR Software
RC-368
Cisco IOS XR Routing Configuration Guide
Next-hop
The next-hop attach point provides increased control based on protocol and prefix-based match operations.
The attach point is typically used to decide whether to act on a next-hop notification (up or down) event.
The following example shows how to configure a route policy that passes the prefix 20.0.0.0 only with
prefix length 8 and is a static or connected route.
.
route-policy nxthp_policy_A
if protocol in bgp then
drop
elseif
pass
endif
router bgp 2
neighbor 10.0.0.1
remote-as 3
address-family ipv4 unicast
nexthop route-policy nxthp_policy_A
.
.
.
Clear-Policy
The clear-policy attach point provides increased control based on various AS path match operations
when using a clear bgp command. This attach point is typically used to decide whether to clear BGP
flap statistics based on AS-path-based match operations.
The following example shows how to configure a route policy where the in operator evaluates to true if
one or more of the regular expression matches in the set my-as-set successfully match the AS path associated
with the route. If it is a match, then the clear command clears the associated flap statistics.
as-path-set my-as-set
ios-regex '_12$',
ios-regex '_13$'
end-set
route-policy policy_a
if as-path in my-as-set then
pass
else
drop
endif
end-policy
clear bgp ipv4 unicast flap-statistics route-policy policy_a
Debug
The debug attach point provides increased control based on prefix-based match operations. This attach
point is typically used to filter debug output for various BGP commands based on the prefix of the route.
The following example shows how to configure a route policy that will only pass the prefix 20.0.0.0 with
prefix length 8; therefore, the debug output shows up only for that prefix.
route-policy policy_b
if destination in (20.0.0.0/8) then
pass
else
drop