HI there,
I want to change the extcommunity cost pre-bestpath cost that is comming from a EIGRP route when received in BGP so that an eBGP path is preferred over the vpnv4 bgp path. I have IOS XR and I am not sure if I can just adjust the pre-bestpath parameter or if I should change the igp poi as well.
I read the following post:
The POI indicates when, in the BGP best path selection process, the cost community is taken in consideration. There is only two choices for the value of the POI:
Router(config-route-map)#set extcommunity cost ?
<0-255> Community ID
igp Compare following IGP cost comparison
pre-bestpath Compare before all other steps in bestpath calculation
Router(config-route-map)#set extcommunity cost
So as you can see it can be either compared before everything else (pre-bestpath) or right after the IGP cost comparison (igp).
So I think pre-bestpath is enough. Can you please confirm?
This is what I am thinking:
prefix-set VRF_AAA-EIGRP-TEST
10.10.17.4/32
end-set
!
extcommunity-set cost NEW-EXTCOMM-COST
Pre-Bestpath:0:1500
end-set
route-policy VRF_AAA-TO-BGP-IN-TEST
if destination in VRF_AAA-EIGRP-TEST then
set extcommunity cost NEW-EXTCOMM-COST
endif
end-policy
With this Policy, will COST:128:129:2842 look as COST:0:1500?? or should I change the IGP in the extcommunity-set ? If so, how?
ASR_ROUTER#sh bgp vrf VRF_AAA 10.10.17.4
Tue Aug 29 20:43:27.110 CEST
BGP routing table entry for 10.10.17.4/29, Route Distinguisher: 217.10.16.20:20017
Versions:
Process bRIB/RIB SendTblVer
Speaker 2352257 2352257
Last Modified: Jul 11 06:36:43.715 for 1y07w
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local, (received & used)
192.168.10.1 (metric 30) from 217.10.16.41 (192.168.10.1)
Received Label 21665
Origin incomplete, metric 2842, localpref 500, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 2352257
Extended community: COST:128:129:2842 EIGRP route-info:0x0:1214 EIGRP AD:25384:538 EIGRP RHB:255:2:2304 EIGRP LM:0xff:1:1500 EIGRP AR:25384:85.89.249.7 EIGRP PM:9:0 RT:25384:20017
Originator: 192.168.10.1, Cluster list: 217.10.16.41
Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 192.168.10.1:20017
Thanks in advance!