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;