I have MPLS L3 VPN with EIGRP as PE-CE routing protocol. Also I have backdoor link, that needs to be preferred.
So, I am using route map that sets bgp pre-bestpath cost community to some value.
The question is, how can I distinguish between EIGRP internal and external routes in route map to my BGP peers to set appropriate cost community?
Internal routes - cost community 128 3000000
External routes - cost community 129 3000000
through the backdoor link internal EIGRP routes coming from other sites can arrive at CE routers.
I think one possible approach here is to use prefix-list or access-lists to define what IP prefixes are really located in this site.
All other prefixes that eventually are received on EIGRP from CE routers should be considered as "external" to site and less preferred / advertised in a different way.
Hope to help
The match route-type external and match route-type internal directives in a route map can be used to test whether a route is internal or external. However, note that this route map should be applied when redistributing your EIGRP routes into the BGP. After a route is redistributed into BGP, this command refers to the ORIGIN attribute of the redistributed route and not to the type of the original EIGRP route anymore.