Routing Policy Language Usage - Cisco NCS 5500 Series Configuration Manuals

Routing configuration ios xr release 6.3.x
Hide thumbs Also See for NCS 5500 Series:
Table of Contents

Advertisement

Routing Policy Language Usage

The second component of the policy infrastructure, the policy repository, has several responsibilities. First,
it compiles the user-entered configuration into a form that the execution engine can understand. Second, it
performs much of the verification of policies; and it ensures that defined policies can actually be executed
properly. Third, it tracks which attach points are using which policies so that when policies are modified the
appropriate clients are properly updated with the new policies relevant to them.
The third component is the execution engine. This component is the piece that actually runs policies as the
clients request. The process can be thought of as receiving a route from one of the policy clients and then
executing the actual policy against the specific route data.
The fourth component is the policy clients (the routing protocols). This component calls the execution engine
at the appropriate times to have a given policy be applied to a given route, and then perform some number of
actions. These actions may include deleting the route if policy indicated that it should be dropped, passing
along the route to the protocol decision tree as a candidate for the best route, or advertising a policy modified
route to a neighbor or peer as appropriate.
Routing Policy Language Usage
This section provides basic routing policy language usage examples.
Pass PolicyPass Policy
The following example shows how the policy accepts all presented routes without modifying the routes.
route-policy quickstart-pass
pass
end-policy
Drop Everything Policy
The following example shows how the policy explicitly rejects all routes presented to it. This type of policy
is used to ignore everything coming from a specific peer.
route-policy quickstart-drop
drop
end-policy
Ignore Routes with Specific AS Numbers in the Path
The following example shows the policy definition in three parts. First, the as-path-set command defines
three regular expressions to match against an AS path. Second, the route-policy command applies the AS
path set to a route. If the AS path attribute of the route matches the regular expression defined with the
as-path-set command, the protocol refuses the route. Third, the route policy is attached to BGP neighbor
10.0.1.2. BGP consults the policy named ignore_path_as on routes received (imported) from neighbor 10.0.1.2.
as-path-set ignore_path
ios-regex '_11_',
ios-regex '_22_',
ios-regex '_33_'
end-set
route-policy ignore_path_as
if as-path in ignore_path then
drop
Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 6.3.x
142
Implementing Routing Policy

Advertisement

Table of Contents
loading

Table of Contents