When Attributes Are Modified; Default Drop Disposition; Control Flow - Cisco ASR 9000 Series Routing Configuration Manual

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

Advertisement

Semantics of Policy Application

When Attributes Are Modified

A policy does not modify route attribute values until all tests have been completed. In other words, comparison
operators always run on the initial data in the route. Intermediate modifications of the route attributes do not
have a cascading effect on the evaluation of the policy. Take the following example:
ifmed eq 12 then
set med 42
if med eq 42 then
drop
endif
endif
This policy never executes the drop statement because the second test (med eq 42) sees the original, unmodified
value of the MED in the route. Because the MED has to be 12 to get to the second test, the second test always
returns false.

Default Drop Disposition

All route policies have a default action to drop the route under evaluation unless the route has been modified
by a policy action or explicitly passed. Applied (nested) policies implement this disposition as though the
applied policy were pasted into the point where it is applied.
Consider a policy to allow all routes in the 10 network and set their local preference to 200 while dropping
all other routes. You might write the policy as follows:
route-policy two
if destination in (10.0.0.0/8 ge 8 le 32) then
set local-preference 200
endif
end-policy
route-policy one
apply two
end-policy
It may appear that policy one drops all routes because it neither contains an explicit pass statement nor modifies
a route attribute. However, the applied policy does set an attribute for some routes and this disposition is
passed along to policy one. The result is that policy one passes routes with destinations in network 10, and
drops all others.

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
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.3.x
560
Implementing Routing Policy

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents