Control Flow - 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
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
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
The pass statement is not required and can be removed to represent the equivalent policy in another way.
Note
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.1.x
484
Implementing Routing Policy
OL-30423-03

Advertisement

Table of Contents
loading

Table of Contents