Juniper JunOS: Difference between rib-groups and instance-import

Both rib-groups and instance-import allow you to selectively (or non-selectively) import routes into one VRF from another. I won’t go into detail of the syntax and usage of these two as Matt Dinham does it extremely well in his blog post.

However, it’s important to document the fundamental difference between the two. In essence, instance-import works on FIB routes and rib-groups work on RIB routes. That is to say that instance-import will only export the currently active route(s) from the source VRF whereas rib-groups will export all routes from the target VRF.

Let’s say, for example, you wanted to create a VRF which contained a copy of all of the routes from your transit providers and none of the routes from your direct peers. Because instance-import only imports currently active routes from the source table, it is unsuitable for the task at hand because it’s probable that many of your transit routes are inactive in favour of the direct peerings.