Specifications
Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy on Cisco IOS XR Software
RC-354
Cisco IOS XR Routing Configuration Guide
Policy Statements
Four types of policy statements exist: remark, disposition (drop and pass), action (set), and if 
(comparator).
Remark
A remark is text attached to policy configuration but otherwise ignored by the policy language parser. 
Remarks are useful for documenting parts of a policy. The syntax for a remark is text that has each line 
prepended with a pound sign (#):
# This is a simple one-line remark.
# This
# is a remark
# comprising multiple
# lines. 
In general, remarks are used between complete statements or elements of a set. Remarks are not 
supported in the middle of statements or within an inline set definition.
Unlike traditional !-comments in the CLI, RPL remarks persist through reboots and when configurations 
are saved to disk or a TFTP server and then loaded back onto the router.
Disposition
If a policy modifies a route, by default the policy accepts the route. RPL provides a statement to force 
the opposite—the drop statement. If a policy matches a route and executes a drop, the policy does not 
accept the route. If a policy does not modify the route, by default the route is dropped. To prevent the 
route from being dropped, the pass statement is used. 
The drop statement indicates that the action to take is to discard the route. When a route is dropped, no 
further execution of policy occurs. For example, if after executing the first two statements of a policy the 
drop statement is encountered, the policy stops and the route is discarded.
Note All policies have a default drop action at the end of execution.
The pass statement allows a policy to continue executing even though the route has not been modified. 
When a policy has finished executing, any route that has been modified in the policy or any route that 
has received a pass disposition in the policy, successfully passes the policy and completes the execution. 
If route policy B_rp is applied within route policy A_rp, execution continues from policy A_rp to policy 
B_rp and back to policy A_rp provided prefix is not dropped by policy B_rp.
route-policy A_rp
set community (10:10)
apply B_rp
end-policy
!
route-policy B_rp
if destination in (121.23.0.0/16 le 32, 155.12.0.0/16 le 32) then 
set community (121:155) additive 
endif 
end-policy 
!










