Inter-AS Option C w/ RT Rewrite

Load inter.as.l3vpn.option.c.rt.rewrite.init.cfg

#IOS-XE
config replace flash:inter.as.l3vpn.option.c.rt.rewrite.init.cfg
 
#IOS-XR
configure
load bootflash:inter.as.l3vpn.option.c.rt.rewrite.init.cfg
commit replace
y

Inter-AS option C is already fully setup. However, each SP is using its own RT values, and doesn’t want to have to import the other AS’s RT value on every single PE. Configure RT rewrite so that each PE can keep the same RT policy it has for each VRF.

Answer

#R5
ip extcommunity-list standard VPN_A permit rt 200:1
ip extcommunity-list standard VPN_B permit rt 200:2
!
route-map XR2_INBOUND
 match extcomm VPN_A
 set extcommun rt 100:1
route-map XR2_INBOUND permit 20
 match extcomm VPN_B
 set extcommun rt 100:2
!
router bgp 100
 add vpnv4
  neighbor 20.20.20.20 route-map XR2_INBOUND in

#XR2
route-policy R5_INBOUND
  if extcommunity rt matches-any (100:1) then
    set extcommunity rt (200:1)
  endif
  if extcommunity rt matches-any (100:2) then
    set extcommunity rt (200:2)
  endif
end-policy
!
router bgp 200
 neighbor 5.5.5.5
  add vpnv4 uni
   route-policy R5_INBOUND in

Explanation

As with inter-AS option B, inter-AS option C requires SPs to coordinate the RT values. This lab asks us to do a rewrite operation so that every PE doesn’t have to import the remote SP’s RT value. In the previous lab we did the rewrite operation on the ASBRs in option B. In this lab, we must do the rewrite operation on the RRs, because the RRs are directly peering over eBGP VPNv4.

The rewrite operation uses the same route-map and RPL as we saw in the previous lab. The only difference is where we apply it. Verification is the same as in the previous option B lab, so we won’t cover it again here.

Last updated