There is alot of confusion regarding the subject. In order to better understand the difference I will perform several tests with both RIB types.
First, we will test export-rib. Juniper’s KB16133 defines the export-rib as such:
“The export-rib command tells the router, from which tables to take information. For any individual RIB group, only one table can be specified in the export-rib statement.”
This means that export-rib should only work with exchanging routes between two tables.
To test export-rib groups we will attempt the following configurations:
- Apply an export-rib group to a table to verify export-rib is working as intended
- Apply an export-rib group to the same table which it’s configured for
- Apply an export-rib group to multiple tables
Secondly, we will test import-rib. Juniper’s KB16133 defines the import-rib as such:
“Conversely, the import-rib command tells the router, into which tables to place information. Unlike its counterpart, the import-rib statement can specify multiple route tables.”
In the same KB article explains that the first routing table in an import-rib group is the source routing table and each subsequent routing table(s) are destination routing tables. This implies that the first routing table defined will be copied to the destination tables listed after. Jack Parks also concluded the same reasoning on the j-net forums.
To test import-rib groups we will attempt the following configurations.
- Apply an import-rib group to a table to verify it’s working as intended (include source and destination tables).
- Apply the import-rib group to the source table
- Only provide a source table but no destinations table
- Apply the import-rib to a different table than the source (a table not listed in the group)
- Define multiple destination tables in the group and assign the group to a single table
- Define multiple destination tables in the group and assign the group to a multiple table.
- Do routes that are present in the routing table because of a RIB group qualify to then be copied to another routing table?
If you're looking for the results, they're at the bottom of this post. Otherwise, continue on for a long winded post
Initial configuration: