Extended communities of type EVPN are not propagated causing the route to not be advertised.
Prior to 22.2R3, having protocol evpn in the export term policy was enough to advertise an EVPN T-5 route with extended community.
Prior to 22.2R3:
term ACCEPT-V4-DEFAULT {
from {
protocol evpn;
route-filter 0.0.0.0/0 exact;
}
then {
accept;
term ACCEPT-V6-DEFAULT {
route-filter ::0/0 exact;
user@router> show route table MY-L3VPN.inet
MY-L3VPN.inet.0: 1533 destinations, 2054 routes (1533 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[BGP/170] 10:41:41, localpref 170, from 192.168.232.12
AS path: I, validation-state: unverified
> to 192.168.232.206 via ae1.0, Push 1069
[EVPN/170] 10:41:41
> to 192.168.232.206 via ae1.0, Push 1082
user@router> show route advertising-protocol bgp 192.168.232.136 match-prefix 5:*0.0.0.0* next-hop 192.168.232.131 detail
inet.0: 46 destinations, 52 routes (46 active, 0 holddown, 0 hidden)
bgp.evpn.0: 10204 destinations, 10204 routes (10204 active, 0 holddown, 0 hidden)
* 5:192.168.232.131:38::0::0.0.0.0::0/248 (1 entry, 1 announced)
BGP group V4-SPN-TO-LF-IBGP type Internal
Route Distinguisher: 192.168.232.131:38
Route Label: 3038
Overlay gateway address: 0.0.0.0
Nexthop: Self
Flags: Nexthop Change
Localpref: 170
AS path: [64519] I
Communities: 300:60280 400:40010 500:9 600:38 target:600:38 encapsulation:vxlan(0x8) router-mac:44:aa:50:e9:a5:46 <<<< extended community 600:38
MY-L3VPN.evpn.0: 64 destinations, 64 routes (64 active, 0 holddown, 0 hidden)
default-switch.evpn.0: 9524 destinations, 9524 routes (9524 active, 0 holddown, 0 hidden)
__default_evpn__.evpn.0: 502 destinations, 502 routes (502 active, 0 holddown, 0 hidden)
22.2R3 and newer:
0.0.0.0/0 *[BGP/170] 00:05:17, localpref 170, from 192.168.232.12
[EVPN/170] 00:05:17
{master}
--EVPN Type 5 routes are not advertised after code upgrade to 22.2R3 and newer
The expected behavior is to not propagate extended communities of type EVPN. This is documented in RFC https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-ipvpn-interworking-13#section-5.2. This was fixed in Junos 22.2R3 and newer.
Solutions:
1) Explicit configuration of extended community in the export policy
community add L3VPN_600:00038; <<<< extended community 600:38
2) This hidden knob has been provided to go back to previous behavior of copying the VPN com into EVPN T-5
router# set routing-instances MY-L3VPN protocols evpn ip-prefix-routes route-attributes ipvpn-route-target export-action allow