Junos OS

last person joined: 7 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Route leaking between VRFS using RIB GROUP

    Posted 06-23-2017 16:12

    Hi everybody,

     

    let say we have two routing instances with folloiwng routes:

     

    INSTANCE1.inet.0

     

    O 1.1.1.1/32 via 199.199.199.1 em0.199

    O  2.2.2.2/32 via 200.200.200.1 em0.200

     

    INSTANCE2.inet.0

     

    O 3.3.3.3/32 via 198.198.198.1 em0.198

    O 4.4.4.4/32 via 197.197.197.1 emo.197

     

    Objective:

    We must use RIP GROUP to  leak only one route 1.1.1.1/32 from INSTANCE1.inet.0 into INSTANCE2.inet.0 

    Can we do that?  

     

    I do not find any example config  where we have a granular control over what routes get leaked into a certain VRF when using RIP GROUP.

     

     

    Much appreciated and have a nice weekend!!

     

     



  • 2.  RE: Route leaking between VRFS using RIB GROUP

    Posted 06-24-2017 04:26

    As you noticed rib groups simply leak all the routes between routing instances.

     

    Your other options for control of route leaking are:

     

    Instance import

    https://www.juniper.net/documentation/en_US/junos12.3/topics/example/routing-table-import.html

     

    Or creating a logical tunnel interface and setting up a standard BGP peering.

    https://www.juniper.net/documentation/en_US/junos/topics/example/logical-tunnels-configuring.html



  • 3.  RE: Route leaking between VRFS using RIB GROUP

    Posted 06-30-2017 08:59

    Thanks sir



  • 4.  RE: Route leaking between VRFS using RIB GROUP

    Posted 06-26-2017 08:56

    If you're already familiar with leaking routes using target communities, you can also do it between VRFs within the same router using "auto-export".

     

    Here are sample configs from the techlibrary:

    https://www.juniper.net/documentation/en_US/junos12.3/topics/example/auto-export-configuring-verifying.html

     



  • 5.  RE: Route leaking between VRFS using RIB GROUP

     
    Posted 06-26-2017 21:46

    Hi Folks,
    I hope the below sample configuration is usefull!

     

    --------------------------------------------------------------------------------------------------------------
    Route leaking using rib-groups (Leak routes from "instance-1" VR to "instance-2" VR)
    --------------------------------------------------------------------------------------------------------------
    - create a rib-group with the routing table that is to be exported as the first in the list,
    and the table/tables that import these routes at the trailing end

    - create a routing-policy to define the routes that will be imported. Apply this routing-policy
    to the rib-groups as an "import-policy"

    - To import direct routes from the "instance-1" VR, refer the rib-group under the "instance-1" VR routing-options

    - To import BGP/OSPF routes from the "instance-1" VR, refer the rib-group under the "instance-1" VR protocols hierarchy
    --------------------------------------------------------------------------------------------------------------

    [edit routing-options]
    rib-groups {
    instance-1-to-instance-2 {
    import-rib [ instance-1.inet.0 instance-2.inet.0 ];
    import-policy instance-1-to-instance-2-rib;
    }
    }

    [edit policy-options]
    policy-statement instance-1-to-instance-2-rib {
    term 1 {
    from protocol direct;
    then accept;
    }
    term 2 {
    from {
    protocol bgp;
    route-filter 10.1.1.0/24 exact;
    }
    then accept;
    }
    term default {
    then reject;
    }
    }

    [edit routing-instances instance-1 routing-options]
    interface-routes {
    rib-group inet instance-1-to-instance-2;
    }
    [edit routing-instances instance-1 protocols bgp group EBGP family inet unicast]
    rib-group instance-1-to-instance-2;



  • 6.  RE: Route leaking between VRFS using RIB GROUP

    Posted 06-30-2017 08:59

    Thanks



  • 7.  RE: Route leaking between VRFS using RIB GROUP
    Best Answer

    Posted 06-30-2017 00:02

    Hello,

    Rib-group allows granular filtering of prefix using import-policy statement under rib-group.
    Create a policy for and apply it in the rib-group.


    [edit routing-options]
      rib-groups {
          blue-to-red {
              import-rib [ blue.inet.0 red.inet.0 ];
              import-policy SPECIFIC_ONLY;  <<<<<<<<<<<<<<<<<<
          }
      }
    [edit policy-options]
       policy-statement SPECIFIC_ONLY {
           term 1 {
               from {
                   route-filter 0.0.0.0/0 exact;
               }
               then accept;
           }
           term 2 {
               then reject;
           }
       }



    Regards,

    Rahul

    Please mark my solution as accepted if it helped.



  • 8.  RE: Route leaking between VRFS using RIB GROUP

    Posted 06-30-2017 08:59

    Sorry but for the late response, got busy with work.

     

    Thanks all for responses.