Cost-Community (confed eBGP)

Topology: ine-spv4

Load bgp.cost-community.ebgp.confed.init.cfg

#IOS-XE
config replace flash:bgp.cost-community.ebgp.confed.init.cfg
 
#IOS-XR
! You may need to load a blank config first
!
configure
load bootflash:blank.ssh.enabled.cfg
commit replace
y
load bootflash:bgp.cost-community.ebgp.confed.init.cfg
commit replace
y

Using IGP cost-community, influence R1 and R2 to prefer the route to XR2’s loopbacks via R4. Set the cost-community on XR1.

The topology has been converted to a confederation, because cost-community cannot transit true eBGP peers (except when translating AIGP).

Answer

#XR1
route-policy R4_OUT
  set extcommunity cost (IGP:60:100)
end-policy
!
router bgp 65001
 neighbor 20.4.19.4
  address-family ipv4 unicast
   route-policy R4_OUT out
  !
 !
 neighbor 2001:20:4:19::4
  address-family ipv6 unicast
   route-policy R4_OUT out

#R4
router bgp 65000
 template peer-policy IBGP
  send-community ext

Explanation

On IOS-XR, we can set the cost-community using an RPL. This is fairly straightforward. Since eBGP confed peers are somewhat considered like iBGP peers, we do not need to send communities on IOS-XR to R4.

On R4, we must send extcommunities to our iBGP peers.

As in the previous lab, we can influence R1 by simply setting the cost-community towards R4. R4 will retain this attribute when the path is advertised to its iBGP peers. R3 will not advertise any cost-community.

On R1, the path via R3 will be considered as the default cost-community, with igp:60:2147483647. The path via R4 will win.

The purpose of this lab was just to demostrate setting cost-community on IOS-XR. See the previous lab for more information about cost-community in general.

Last updated