Hierarchical Policy Conditions; Apply Condition Policies - Cisco ASR 9000 Series Configuration Manual

Aggregation services router
Hide thumbs Also See for ASR 9000 Series:
Table of Contents

Advertisement

Hierarchical Policy Conditions

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
end-policy
Apply Conditions can be used with parameters and are supported on all attach points and on all clients.
Hierarchical Apply Conditions can be used without any constraints on a cascaded level.
Existing route policy semantics can be expanded to include this Apply Condition:
Route-policy policy_name
If apply policyA and apply policyB then
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.1.x
534
Set med 100
Implementing Routing Policy
OL-30423-03

Advertisement

Table of Contents
loading

Table of Contents