Cisco Systems OL-14356-01 Network Router User Manual


 
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
OL-14356-01
Control Flow
Policy statements are processed sequentially in the order in which they appear in the configuration.
Policies that hierarchically reference other policy blocks are processed as if the referenced policy blocks
had been directly substituted inline. For example, if the following policies are defined:
route-policy one
set weight 100
end-policy
route-policy two
set med 200
end-policy
route-policy three
apply two
set community (2:666) additive
end-policy
route-policy four
apply one
apply three
pass
end-policy
Policy four could be rewritten in an equivalent way as follows:
route-policy four-equivalent
set weight 100
set med 200
set community (2:666) additive
pass
end-policy
Note The pass statement is not required and can be removed to represent the equivalent policy in another way.
Policy Verification
Several different types of verification occur when policies are being defined and used.
Range Checking
As policies are being defined, some simple verifications, such as range checking of values, is done. For
example, the MED that is being set is checked to verify that it is in a proper range for the MED attribute.
However, this range checking cannot cover parameter specifications because they may not have defined
values yet. These parameter specifications are verified when a policy is attached to an attach point. The
policy repository also verifies that there are no recursive definitions of policy, and that parameter
numbers are correct. At attach time, all policies must be well formed. All sets and policies that they
reference must be defined and have valid values. Likewise, any parameter values must also be in the
proper ranges.
Incomplete Policy and Set References
As long as a given policy is not attached at an attach point, the policy is allowed to refer to nonexistent
sets and policies, which allows for freedom of workflow. You can build configurations that reference sets
or policy blocks that are not yet defined, and then can later fill in those undefined policies and sets,
thereby achieving much greater flexibility in policy definition. Every piece of policy you want to