Hi Guilherme,
This kind of export doesn't work in Junos, you should use route-target import/export policies for route leaking between VRFs. You can't leak routes via rib-groups from a secondary table, that's why only locally originated routes can be leaked, because VRF table is a primary table for them. For remote L3VPN routes the primary table is bgp.l3vpn.0 and import/export from it is controlled by route-targets, as I wrote above.
Original Message:
Sent: 11-01-2024 09:57
From: Guilherme Rigueti
Subject: BGP ROUTE LEAK
Greetins,
Purple Packet Surfer... Yes, I do it this way and it works for routes received locally in the vrf. However, routes that are received via VPNv4 do not work. But I already know what the problem is and I am looking for the reason.
------------------------------
Guilherme Rigueti
------------------------------
Original Message:
Sent: 11-01-2024 05:45
From: Purple Packet Surfer
Subject: BGP ROUTE LEAK
Hey,
What methods did you try already?
I suspect you would have to use a combination of auto-export under the VRF in question, then under routing-options, use a rib group import and reference a policy that specifies BGP routes as well as the directly connected routes for route lookup.
#Export routes from VRFset routing-instances SOME_ROUTING_INSTANCE_NAME routing-options auto-export family inet unicast rib-group SOME_ROUTING_INSTANCE_NAME-TO_INET0#Import routes from VRF into inet0set routing-options rib-groups SOME_ROUTING_INSTANCE_NAME-TO_INET0 import-rib [ SOME_ROUTING_INSTANCE_NAME.inet.0 inet.0 ]set routing-options rib-groups SOME_ROUTING_INSTANCE_NAME-TO_INET0 import-policy VRF_ROUTES_FROM_SOME_ROUTING_INSTANCE_NAMEset policy-options policy-statement VRF_ROUTES_FROM_SOME_ROUTING_INSTANCE_NAME term one from protocol [ bgp direct local ]set policy-options policy-statement VRF_ROUTES_FROM_SOME_ROUTING_INSTANCE_NAME term one then acceptset policy-options policy-statement VRF_ROUTES_FROM_SOME_ROUTING_INSTANCE_NAME term then-reject then reject#Exchange directly connected routes in the other direction (notice the order of the table names)set routing-options rib-groups INET0-INTERFACE-ROUTES import-rib [ inet.0 SOME_ROUTING_INSTANCE_NAME.inet.0 ]set routing-options interface-routes rib-group inet INET0-INTERFACE-ROUTES
------------------------------
ANDREY LEO