The configured MED/metric route attribute is not inherited to originated Type-5 route
The customer reported that the configured MED/metric route attribute is not inherited to the originated Type-5 route, Also they tried to change the route attribute by setting local preference via export policy under ip-prefix-routes
labroot@R1-re0> show configuration routing-instances VRF-T5-IRB12-13 routing-options
static {
route 10.10.10.0/24 {
discard;
metric 50;
tag 5000;
community 64999:111;
as-path {
path 64999;
}
labroot@R1-re0> show route advertising-protocol bgp 4.4.4.4 table VRF-T5-IRB12-13 10.10.10.0/24 detail
VRF-T5-IRB12-13.inet.0: 4 destinations, 7 routes (4 active, 0 holddown, 0 hidden)
* 10.10.10.0/24 (2 entries, 1 announced)
BGP group EVPN type Internal
Route Distinguisher: 2.2.2.2:9
VPN Label: 26
Nexthop: Self
Flags: Nexthop Change
MED: 50
Localpref: 100
AS path: [65000] 64999 I
Communities: 64999:111 target:64999:1213
labroot@jtac-mx2008dc-proto-r2001-re0> show route advertising-protocol bgp 4.4.4.4 table VRF-T5-IRB12-13.evpn.0 match-prefix *10.10.10.0* detail
VRF-T5-IRB12-13.evpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
* 5:2.2.2.2:9::0::10.10.10.0::24/248 (1 entry, 1 announced)
Route Label: 26
Overlay gateway address: 0.0.0.0
The EVPN Type-5 behavior of inheriting route attributes, it only inherit the as-path, community, and local preference attributes from the originator IPv4/IPv6 route, and the metric/MED is not supported as of now.
For export policy under ip-prefix-route it either accepts or rejects IPv4/IPv6 prefixes for which we want to generate Type-5 routes, it does not modify route attributes.
However, in the latest releases, we can use the export policy to modify/set community values while generating Type-5 EVPN routes.