Semantics Of Policy Application - Cisco NCS 6000 Series Configuration Manual

Ios xr release 6.4.x
Hide thumbs Also See for NCS 6000 Series:
Table of Contents

Advertisement

Implementing Routing Policy
The global parameter values can be used directly inside a policy definition similar to the local parameters of
parameterized policy. In the following example, the globalparam argument, which makes use of the global
parameters gbpathtype and glbtag, is defined for a nonparameterized policy.
route-policy globalparam
end-policy
When a parameterized policy has a parameter name "collision" with a global parameter name, parameters
local to policy definition take precedence, effectively masking off global parameters. In addition, a validation
mechanism is in place to prevent the deletion of a particular global parameter if it is referred by any policy.

Semantics of Policy Application

This section discusses how routing policies are evaluated and applied. The following concepts are discussed:
Boolean Operator Precedence
Boolean expressions are evaluated in order of operator precedence, from left to right. The highest precedence
operator is NOT, followed by AND, and then OR. The following expression:
med eq 10 and not destination in (10.1.3.0/24) or community matches-any ([10..25]:35)
if fully parenthesized to display the order of evaluation, would look like this:
(med eq 10 and (not destination in (10.1.3.0/24))) or community matches-any ([10..25]:35)
The inner NOT applies only to the destination test; the AND combines the result of the NOT expression with
the Multi Exit Discriminator (MED) test; and the OR combines that result with the community test. If the
order of operations are rearranged:
not med eq 10 and destination in (10.1.3.0/24) or community matches-any ([10..25]:35)
then the expression, fully parenthesized, would look like the following:
((not med eq 10) and destination in (10.1.3.0/24)) or community matches-any ([10..25]:35)
Multiple Modifications of the Same Attribute
When a policy replaces the value of an attribute multiple times, the last assignment wins because all actions
are executed. Because the MED attribute in BGP is one unique value, the last value to which it gets set to
wins. Therefore, the following policy results in a route with a MED value of 12:
set med 9
set med 10
if path-type is $glbpathtype then
set tag $glbtag
endif
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
Semantics of Policy Application
397

Advertisement

Table of Contents
loading

Table of Contents