Cisco NCS 5500 Series Configuration Manuals page 171

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

Advertisement

Implementing Routing Policy
end-policy
router bgp 2
Neighbor Import
The neighbor import attach point controls the reception of routes from a specific peer. All routes that are
received by a peer are run through the attached policy. Any routes that pass the attached policy are passed to
the BGP Routing Information Base (BRIB) as possible candidates for selection as best path routes.
When a BGP import policy is modified, it is necessary to rerun all the routes that have been received from
that peer against the new policy. The modified policy may now discard routes that were previously allowed
through, allow through previously discarded routes, or change the way the routes are modified. A new
configuration option in BGP (bgp auto-policy-soft-reset) that allows this modification to happen automatically
in cases for which either soft reconfiguration is configured or the BGP route-refresh capability has been
negotiated.
The following example shows how to receive routes from neighbor 10.0.0.1. Any routes received with the
community 3:100 have their local preference set to 100 and their community tag set to 2:666. All other routes
received from this peer have their local preference set to 200 and their community tag set to 2:200.
route-policy sample_import
end-policy
router bgp 2
Network
The network attach point controls the injection of routes from the RIB into BGP. A route policy attached at
this point is able to set any of the valid BGP attributes on the routes that are being injected.
The following example shows a route policy attached at the network attach point that sets the well-known
community no-export for any routes more specific than /24:
route-policy NetworkControl
endif
neighbor 10.0.0.5
remote-as 3
address-family ipv4 unicast
route-policy sample-export out
.
.
.
if community matches-any (3:100) then
set local-preference 100
set community (2:666)
else
set local-preference 200
set community (2:200)
endif
neighbor 10.0.0.1
remote-as 3
address-family ipv4 unicast
route-policy sample_import in
.
.
.
if destination in (0.0.0.0/0 ge 25) then
Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 6.3.x
Neighbor Import
159

Advertisement

Table of Contents
loading

Table of Contents