Hierarchical Policy Conditions
allows you to use the exit command to complete a policy configuration block. The abort command is used
to discard the current policy configuration and return to global configuration mode.
Editing Routing Policy Language set elements Using XML
RPL supports editing set elements using XML. Entries can be appended, prepended, or deleted to an existing
set without replacing it through XML.
Hierarchical Policy Conditions
The Hierarchical Policy Conditions feature enables the ability to specify a route policy within the "if" statement
of another route policy. This ability enables route-policies to be applied for configurations that are based on
hierarchical policies.
With the Hierarchical Policy Conditions feature, Cisco IOS XR RPL supports Apply Condition policies that
can be used with various types of Boolean operators along with various other matching statements.
Apply Condition Policies
Apply Condition policies, which Cisco IOS XR RPL supports, allow usage of a route-policy within an "if"
statement of another route-policy.
Consider route-policy configurations Parent, Child A, and Child B:
route-policy Child A
if destination in (10.10.0.0/16) then
set local-pref 111
endif
end-policy
!
route-policy Child B
if as-path originates-from '222' then
set community (333:222) additive
endif
end-policy
!
route-policy Parent
if apply Child A and apply Child B then
set community (333:333) additive
else
set community (333:444) additive
endif
end-policy
!
In the above scenarios, whenever the policy Parent is executed, the decision of the "if" condition in that is
selected based on the result of policies Child A and Child B. The policy Parent is equivalent to policy merged
as given below:
route-policy merged
if destination in (10.10.0.0/16) and as-path originates-from '222' then
set local-pref 111
set community (333:222, 333:333) additive
elseif destination in (10.10.0.0/16) then /*Only Policy Child A is pass */
set local-pref 111
set community (333:444) additive /*From else block */
elseif as-path originates-from '222' then /*Only Policy Child B is pass */
set community (333:222, 333:444) additive /*From else block */
else
set community (333:444) additive /*From else block */
endif
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.3.x
610
Implementing Routing Policy