Cisco NCS 6000 Series Configuration Manual page 431

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

Advertisement

Implementing Routing Policy
Neighbor Export
The neighbor export attach point selects the BGP routes to send to a given peer or group of peers. The routes
are selected by running the set of possible BGP routes through the associated policy. Any routes that pass the
policy are then sent as updates to the peer or group of peers. The routes that are sent may have had their BGP
attributes altered by the policy that has been applied.
The following policy sends all BGP routes to neighbor 10.0.0.5. Routes that are tagged with any community
in the range 2:100 to 2:200 are sent with a MED of 100 and a community of 2:666. The rest of the routes are
sent with a MED of 200 and a community of 2:200.
route-policy sample-export
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
if community matches-any (2:[100-200]) then
set med 100
set community (2:666)
else
set med 200
set community (2:200)
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
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
Neighbor Export
409

Advertisement

Table of Contents
loading

Table of Contents