Cisco NCS 5500 Series Configuration Manuals page 174

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

Advertisement

Import
operators can select different sets of BGP route attributes using the matching operations and then set different
traffic indexes for each different class of route they are interested in tracking.
The following example shows how to set the traffic index to 10 in IPv4 unicast routes that originated from
autonomous system 10.33. Likewise, any IPv4 unicast routes that originated from autonomous system 11.60
have their traffic index set to 11 when they are installed into the FIB. These traffic indexes are then used to
count traffic being forwarded on these routes inline cards by enabling the BGP policy accounting counters
on the interfaces of interest.
route-policy sample-table
end-policy
router bgp 2
Import
The import attach point provides control over the import of routes from the global VPN IPv4 table to a
particular VPN routing and forwarding (VRF) instance.
For Layer 3 VPN networks, provider edge (PE) routers learn of VPN IPv4 routes through the Multiprotocol
Internal Border Gateway Protocol (MP-iBGP) from other PE routers and automatically filters out route
announcements that do not contain route targets that match any import route targets of its VRFs.
This automatic route filtering happens without RPL configuration; however, to provide more control over the
import of routes in a VRF, you can configure a VRF import policy.
The following example shows how to perform matches based on a route target extended community and then
sets the next hop. If the route has route target value 10:91, then the next hop is set to 172.16.0.1. If the route
has route target value 11:92, then the next hop is set to 172.16.0.2. If the route has Site-of-Origin (SoO) value
10:111111 or 10:111222, then the route is dropped. All other non-matching routes are dropped.
route-policy bgpvrf_import
end-policy
vrf vrf_import
Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 6.3.x
162
if as-path originates-from '10.33' then
set traffic-index 10
elseif as-path originates-from '11.60' then
set traffic-index 11
endif
address-family ipv4 unicast
table-policy sample-table
.
.
.
if extcommunity rt matches-any (10:91) then
set next-hop 172.16.0.1
elseif extcommunity rt matches-every (11:92) then
set next-hop 172.16.0.2
elseif extcommunity soo matches-any (10:111111, 10:111222) then
pass
endif
address-family ipv4 unicast
import route-policy bgpvrf_import
.
.
.
Implementing Routing Policy

Advertisement

Table of Contents
loading

Table of Contents