Semantics Of Policy Application; Boolean Operator Precedence; Multiple Modifications Of The Same Attribute - Cisco ASR 9000 Series Configuration Manual

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

Advertisement

Semantics of Policy Application

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
set med 11
set med 12
This example is trivial, but the feature is not. It is possible to write a policy that effectively changes the value
for an attribute. For example:
set med 8
if community matches-any cs1 then
set local-preference 122
if community matches-any cs2 then
set med 12
endif
endif
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.1.x
482
Implementing Routing Policy
OL-30423-03

Advertisement

Table of Contents
loading

Table of Contents