Junos OS

 View Only
last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  BGP ROUTE LEAK

    Posted 10-30-2024 11:33

    Hi guys. 

    I am returning here with an old topic already discussed by other colleagues to understand why it is not work or what needs to be done to achieve the objective, where we are not getting it right.

    Why can't I "leak" routes that I learned (received) via VPNv4 (using L3VPN scenario of course) to another routing table, specifically the main one (inet.0). Only routes learned locally in the VRF can I "leak" to inet.0.



    ------------------------------
    Guilherme Rigueti
    ------------------------------


  • 2.  RE: BGP ROUTE LEAK

    Posted 11-01-2024 09:15

    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 VRF
    set 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 inet0
    set 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_NAME
    
    set 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 accept
    set 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
    ------------------------------



  • 3.  RE: BGP ROUTE LEAK

    Posted 11-01-2024 09:58

    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
    ------------------------------



  • 4.  RE: BGP ROUTE LEAK
    Best Answer

    Posted 11-04-2024 09:31

    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. 




  • 5.  RE: BGP ROUTE LEAK

     
    Posted 11-08-2024 08:52

    Hi, 

    This feature is now available as from 24.2R1 with additional CLI: vpn-global-import
    https://community.juniper.net/blogs/moshiko-nayman/2024/11/07/l3vpn-to-global-rib-leaking
    https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/vpn-global-import-edit-routing-options-rib.html

    HTH
    Cheers,



    ------------------------------
    Ashvin
    ------------------------------



  • 6.  RE: BGP ROUTE LEAK

    Posted 20 days ago

    Hi @ashvino / expert,

    May i know whether using knob "vpn-global-import" we dont need anymore config rib-group? 

    Thanks and appreciate any feedback