I'm playing around with routing instances and redistributing routes between them on vMX and got a bit confused.
I have this simple topology:
R4---R6---R7.
I have OSPF enabled on all three routers.
I have the following configuration on R6:
interfaces { ge-0/0/0 { unit 0 { family inet { address 10.0.67.6/24; } } } ge-0/0/2 { unit 0 { family inet { address 10.0.46.6/24; } } } ge-0/0/3 { unit 0 { family inet { address 10.0.36.6/24; } } } lo0 { unit 0 { family inet { address 6.6.6.6/32; } } } } routing-options { interface-routes { rib-group inet TESTRIB; } rib-groups { TESTRIB { import-rib [ inet.0 IAMTEST.inet.0 ]; } TESTRIB2 { import-rib [ IAMTEST.inet.0 inet.0 ]; } } } protocols { ospf { rib-group TESTRIB; export REDIS_DIRECT; area 0.0.0.2 { interface ge-0/0/2.0; interface ge-0/0/3.0; interface lo0.0; } } } policy-options { policy-statement REDIS_DIRECT { term 1 { from protocol direct; then accept; } } } routing-instances { IAMTEST { instance-type virtual-router; interface ge-0/0/0.0; routing-options { interface-routes { rib-group inet TESTRIB; } } protocols { ospf { rib-group TESTRIB2; export REDIS_DIRECT; area 0.0.0.2 { interface ge-0/0/0.0; } } } } }
Both routing instances exchange routes with each other.
However, routes, received from OSPF peer in one routing instance appear in another routing instance, but are not advertised to OSPF peer in that instance.
For example, take route 7.7.7.7, which is being advertised by R7 and originally appears in instance IAMTEST:
root# run show route protocol ospf inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 7.7.7.7/32 *[OSPF/10] 00:00:48, metric 1 > to 10.0.67.7 via ge-0/0/0.0 10.0.14.0/24 *[OSPF/10] 00:00:51, metric 2> to 10.0.46.4 via ge-0/0/2.0 10.0.34.0/24 *[OSPF/10] 00:00:51, metric 2> to 10.0.46.4 via ge-0/0/2.0 224.0.0.5/32 *[OSPF/10] 00:08:44, metric 1 MultiRecv IAMTEST.inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 7.7.7.7/32 *[OSPF/10] 00:00:48, metric 1 > to 10.0.67.7 via ge-0/0/0.0 10.0.14.0/24 *[OSPF/10] 00:00:51, metric 2> to 10.0.46.4 via ge-0/0/2.0 10.0.34.0/24 *[OSPF/10] 00:00:51, metric 2> to 10.0.46.4 via ge-0/0/2.0 224.0.0.5/32 *[OSPF/10] 00:08:44, metric 1 MultiRecv
It appears in master instance, but is not advertised to R4.
The only way to advertiise this route is to create another policy for OSPF instead of REDIS_DIRECT which will allow all routes to be exported to peer.
So obviously this route is somehow not considered an OSPF route. However, I failed to find any mention of this issue in documentation. Why does it happen?
(In case you're wondering, why would I even need configuraton like this: just getting prepared to JNCIS-SP and exploring what you can (and what you cannot) do with rib-groups).