Communication between Site A and Site B was through MPLS/VPN network. EIGRP was used between PE and CE. There was also a backdoor link between CEs. Topology and configuration were in attached file.
R1 can learn routes in Site B(prefix 192.168.50.50/32 and 192.168.35.0/24) through eigrp process and MP-iBGP process. I think routes from eigrp process will be installed in routing table because internal eigrp has a preferred administrative distance(90) over iBGP(200). But in real I see routes from BGP process installed in routing table. Why?
If the BGP route is istalled first in the BGP/RP table then you'll use the BGP path, but if you have an issue with the MPLS link, then you will install a backup path (EIGRP) this will trigger a redistirbution per your config from EIGRP to BGP
From your config at R1
address-family ipv4 vrf 45
redistribute eigrp 1
This will generate a local weight for the BGP route in the BGP table that is generated when this process happens, the weight will be 32768, When the primary path gets back, it'll have a weight of 0, So it will not be chosen
As workarounds you have these options
1. Set a weight higher than 32768 to the neighbor "neighbor 192.168.30.30 weight 40000"
2. set a route-map inbound with weight "neighbor 192.1618.30.30 route-map TEST in"
route-map TEST permit 10
set weight 40000
3. don't use redistribute command, use the network statement instead
Whne EIGRP is used as PE-CE protocol, pre best path will be considered even before admin distance.if in your case, the EIGRP calculated metric is more than BGP pre best path cost, EIGRP will be used in your RIB.
On PE device, Can you compare the locally calculated EIGRP metric and BGP received "Cost:pre-bestpath" and see which one is lowest?.
if you are playing with a loca setup, try to reduce the bandwidth value on R3 interface (towards R5) to much lower value and see if R1 is choosing EIGRP and use R4 as nexthop?.
Shivlu and Jorge： Thank you for your reply. Weight is used for BGP best path selection, But what confused me is the result of path selection between MP-iBGP and EIGRP routes.
Nagendra： Thank you for your reply too. I think "pre bestpath" is also used for BGP best path selection. Through my further test I find that on PE device if locally eigrp metric is lower than BGP pre-bestpath cost learnt from iBGP neighbor, route from eigrp process will be installed in RIB and otherwise route from BGP process will be installed in RIB. The result is the same as your description. When other routing protocols are used between PEs and CEs, I find the similar result. But I can not find any word about your saying from cisco document about BGP cost communities "pre best path will be considered even before admin distance"
Introduction: The "external-out enable" command is available for
configuration under the "router ospf process" in case of the IOS-XR
operating system. This command basically enables advertisement of
intra-area routes on the device as external routes in th...
IntroductionIn this article we'll discuss how to troubleshoot packet
loss in the asr9000 and specifically understanding the NP drop counters,
what they mean and what you can do to mitigate them. This document will
be an ongoing effort to improve troublesh...