Hi Jelm0
I have spotted the mistake in the online documentation and will raise an documenation but to get it solved. The voice_to_inet should actually be define as this.
lab@florence> show configuration routing-options rib-groups
voice_to_inet {
import-rib [ voice-policy.inet.0 inet.0 ];
}
lab@florence>
The way to read the import-rib statement is as follows. Take the routes from the current protocol (ospf in this case) and import them into the primary (or local) route table and also any other routing tables listed after this. The primary route table would be the main route table where the rib-group is being used. That would be either inet.0 if used in the main routing instance or voice-policy.inet.0 if used within the routing instance.
Note that this has only installed the route into the routing table. This does not mean that the OSPF protocol in the other routing table will now advertise these routes to the rest of their peers. In order to do this, you will still need to define an export policy to export active routes from the local routing table into the particular protocol.
Here is some show output to make more clear what I am describing.
adelport@bristol> show ospf neighbor instance voice-policy
Address Interface State ID Pri Dead
10.2.21.1 fe-1/3/0.100 Full 10.2.21.1 128 39
10.1.21.1 so-0/0/1.200 Full 10.1.21.1 128 39
adelport@bristol> show ospf route instance voice-policy
Topology default Route Table:
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface addr/label
10.1.21.1 Intra Router IP 1 so-0/0/1.200
10.2.21.1 Intra Router IP 1 fe-1/3/0.100 10.2.21.1
10.1.21.0/24 Intra Network IP 1 so-0/0/1.200
10.2.21.0/24 Intra Network IP 1 fe-1/3/0.100
adelport@bristol> show route 10.1.21.0 terse
__juniper_private1__.inet.0: 8 destinations, 8 routes (5 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 10.0.0.0/8 D 0 >fxp1.0
ce2.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 0.0.0.0/0 S 5 >10.2.2.2
voice-policy.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 10.1.21.0/24 D 0 >so-0/0/1.200
O 10 1 >so-0/0/1.200
adelport@bristol>
On the neighboring route where I have the rib-groups defined you can see the following.
adelport@florence> show ospf neighbor instance voice-policy
Address Interface State ID Pri Dead
10.2.21.2 fe-1/3/0.100 Full 10.2.21.2 128 33
adelport@florence> show ospf route instance voice-policy
Topology default Route Table:
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface addr/label
10.1.21.1 Intra Router IP 2 fe-1/3/0.100 10.2.21.2
10.2.21.2 Intra Router IP 1 fe-1/3/0.100 10.2.21.2
10.1.21.0/24 Intra Network IP 2 fe-1/3/0.100 10.2.21.2
10.2.21.0/24 Intra Network IP 1 fe-1/3/0.100
adelport@florence> show route table voice-policy
voice-policy.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.21.0/24 *[OSPF/10] 00:18:01, metric 2
> to 10.2.21.2 via fe-1/3/0.100
10.2.21.0/24 *[Direct/0] 00:28:21
> via fe-1/3/0.100
10.2.21.1/32 *[Local/0] 00:28:21
Local via fe-1/3/0.100
224.0.0.5/32 *[OSPF/10] 00:28:22, metric 1
MultiRecv
adelport@florence> show route 10.1.21.0 terse
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 10.1.21.0/24 O 10 2 >10.2.21.2
__juniper_private1__.inet.0: 12 destinations, 12 routes (7 active, 0 holddown, 5 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 10.0.0.0/8 D 0 >fxp1.0
voice-policy.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
A Destination P Prf Metric 1 Metric 2 Next hop AS path
* 10.1.21.0/24 O 10 2 >10.2.21.2
Here is the configuration on florence
adelport@florence> show configuration routing-options rib-groups
voice_to_inet {
import-rib [ voice-policy.inet.0 inet.0 ];
}
adelport@florence> show configuration routing-instances voice-policy
interface fe-1/3/0.100;
protocols {
ospf {
rib-group voice_to_inet;
area 0.0.0.0 {
interface fe-1/3/0.100;
}
}
}
Hope this helps.