Cisco Systems OL-14356-01 Network Router User Manual


 
Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy on Cisco IOS XR Software
RC-382
Cisco IOS XR Routing Configuration Guide
OL-14356-01
preference is set to 212 and the route target extended community is set to 10:101. If the route does not
match those specified criteria, then the route target extended community 10:111222 is added to the route.
In addition, RT 10:111222 is added to the route that matches any of the previous conditions as well.
route-policy bgpvrf_export
if destination in (206.92.1.0/24) then
set extcommunity rt (10:101)
set weight 211
elseif origin is egp then
set local-preference 212
set extcommunity rt (10:101)
endif
set extcommunity rt (10:111222) additive
end-policy
vrf vrf-export
address-family ipv4 unicast
export route-policy bgpvrf-export
.
.
.
Retain Route-Target
The retain route target attach point within BGP allows the specification of match criteria based only on
route target extended community. The attach point is useful at the route reflector (RR) or at the
Autonomous System Boundary Router (ASBR).
Typically, an RR has to retain all IPv4 VPN routes to peer with its PE routers. These PEs might require
routers tagged with different route target IPv4 VPN routes resulting in non-scalable RRs. You can
achieve scalability if you configure an RR to retain routes with a defined set of route target extended
communities, and a specific set of VPNs to service.
Another reason to use this attach point is for an ASBR. ASBRs do not require that VRFs be configured,
but need this configuration to retain the IPv4 VPN prefix information.
The following example shows how to configure the route policy retainer and apply it to the retain route
target attach point. The route is accepted if the route contains route target extended communities 10:615,
10:6150, and 15.15.15.15.15:15. All other non-matching routes are dropped.
extcommunity-set rt rtset1
0:615,
10:6150,
15.15.15.15.15:15
end-set
route-policy retainer
if extcommunity rt matches-any rtset1 then
pass
endif
end-policy
router bgp 2
address-family vpnv4 unicast
retain route-target route-policy retainer
.
.
.