Routing Policy Language Usage - Cisco NCS 6000 Series Configuration Manual

Ios xr release 6.4.x
Hide thumbs Also See for NCS 6000 Series:
Table of Contents

Advertisement

Routing Policy Language Usage

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. See the
Policy, on page 453
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
else
pass
endif
end-policy
router bgp 2
neighbor 10.0.1.2 address-family ipv4 unicast policy ignore_path_as in
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
392
for detailed information on how to implement routing policy language.
Implementing Routing Policy
How to Implement Routing

Advertisement

Table of Contents
loading

Table of Contents