06-15-2011 06:58 AM
Hi Experts
I have confusion regarding the import-rib and export-rib commands in RIB group configuration. As per my understanding from the documents, the export-rib commands specifies the name of table from which the routes will be exported whereas the import-rib command specifies the name of tables to which routes would be imported. This is as per KB16133
But many people says that in the import-rib command the first table specifies the source from which routes would be exported and the second table in the command specifies the destination to which routes would be imported.
could any body please explain which is true I mean export-rib command specifies the source table and import-rib command specifies the destination tables?
Thanks
Solved! Go to Solution.
06-15-2011 09:34 AM - edited 06-15-2011 09:36 AM
Hi,
The first one as per KB16133 is correct.
With import-rib it is COPY operation wherein the contents from FIRST table is copied to the SECOND table.
For instance "import-rib [ inet.0 inet.2 ]" will copy protocol specific routes from inet.0 to inet.2
There is also another usage of import-rib where you specify only one table "import-rib inet.2". Typical usecase for this is to specify use of inet.2 table for RPF check in multicast.
Regards
Surya Prakash
06-15-2011 12:16 PM
Dear Surya
Thanks for the reply. Actually I am confuse about export-rib. When use export-rib then it specifies the source table and import-rib specifies the destination tables?
Similary when we use only import-rib (not export-rib) then first table specifies the source table and second table specifies the destination table?
Kindly correct me if I am right in understanding?
06-16-2011 01:14 AM
Hello there,
The source is always a protocol. Direct,static,aggregate,generate routes are also considered as coming from repective protocol (called "direct","static","aggregate" and "generate" :-)
The import-rib is a group of 2 or more tables where 1st/leftmost listed is "primary" and 2nd & others are "secondary".
Regarding a popular assumption of "first table is source and second is destination" - I think this comes from "routing-options interface-routes" stanza where one usually specifies inet.0 as 1st/primary table and VRF/VR tables as 2nd/3rd/4th etc.And because all interface routes are always in inet.0, this creates assumption that interface-routes are exported from inet.0 to VR/VRF tables. This is a fair assumption since one cannot filter interface-routes on their way to inet.0 (to prevent shooting self in the foot :-) but the actual import is "from protocol" and "into primary table+secondary tables".
HTH
Rgds
Alex
06-16-2011 02:01 AM
Hi,
Yes.
When you specify export-rib, it is the source table from where the routing information is advertised.
With import-rib having multiple tables, the first one is the source and second/subsequent are the destinations table.
Regards
Surya Prakash
If I answered your query, please accept it as Solution.
In case you liked it, Kudos would be appreciated.
06-16-2011 03:26 AM
Thanks for both.
06-16-2011 05:48 AM
Just last question. If I leak some routes from some VRF to inet.0 or viceversa then I need to leak the interface routes as well?
06-16-2011 06:27 AM - edited 06-16-2011 06:55 AM
Yes, you'll have to leak the interface routes in order to have the next-hop reachable.
06-16-2011 06:59 AM
I have one question, is it posible to leak routes from VRF that were received via MP-BGP(from other PEs) to inet.0 and viceversa?
As far as I know, there's no way of doing this, at least I could not find.
06-16-2011 08:52 AM
Hi,
Since it is possible to leak the route from CE into inet.0 table, this eventually make other PE receive VRF routes thorugh MP-BGP.
Ex:
routing-options {
rib-groups {
VPNA-to-INET0 {
import-rib [ VPNA.inet.0 inet.0 ];
}
}
}
routing-instances {
VPNA {
....................................
....................................
....................................
....................................
protocols {
bgp {
group CE1 {
neighbor 172.168.1.2 {
family inet {
unicast {
rib-group VPNA-to-INET0;
}
}
}
}
}
}
....................................
....................................
....................................
}
Regards
Surya Prakash