Hi Rob,
Let me explain with an example as below:
PE is bgp neighbor with 1.1.1.1 for inet-vpn-unicast and inet-unicast.
PE is receiving bgp routes as well as vpn routes as seen below.
However inet.0 bgp routes are ACTIVE while bgp.l3vpn.0 routes are inactive/hidden.
suryak@PE# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
1 1 0 0 0 0
bgp.l3vpn.0
4 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
1.1.1.1 100 12 6 0 0 1:03 Establ
inet.0: 1/1/1/0
bgp.l3vpn.0: 0/4/4/0
VPNA.inet.0: 0/4/4/0
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table inet.0
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
Prefix Nexthop MED Lclpref AS path
* 66.1.0.0/24 1.1.1.1 100 I
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table bgp.l3vpn.0 hidden
bgp.l3vpn.0: 4 destinations, 4 routes (0 active, 0 holddown, 4 hidden)
Prefix Nexthop MED Lclpref AS path
100:1:0.0.0.0/0
1.1.1.1 100 I
100:1:90.0.0.0/24
1.1.1.1 100 65111 I
100:1:100.0.0.0/30
1.1.1.1 100 I
100:1:200.1.0.0/24
1.1.1.1 100 65111 I
PE know how to reach 1.1.1.1 via inet.0 but doesn't have any path in inet.3 table.
suryak@PE# run show route 1.1.1.1
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[OSPF/10] 10:20:13, metric 2
> to 20.0.2.1 via ge-3/1/2.0
By default, BGP routes are resolved for protocol nexthop (NH) using inet.3 routes first.
In case, protocol NH is not available in inet.3, then it is resolved using inet.0 table.
However for VPN routes, the protcol nexthop resolution is purely based on inet.3 routes.
If it is not available, then those are marked as hidden.
suryak@PE# run show route resolution table inet.0
Tree Index: 1, Nodes 51, Reference Count 1
Contributing routing tables: inet.0 inet.3
suryak@PE# run show route resolution table bgp.l3vpn.0
Tree Index: 2, Nodes 2, Reference Count 2
Contributing routing tables: inet.3
Having said that we see that bgp inet.0 route being resolved using route in inet.0 table.
suryak@PE# run show route 66.1/24 detail
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
66.1.0.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x944cac0
Next-hop reference count: 3
Source: 1.1.1.1
Next hop type: Router, Next hop index: 571
Next hop: 20.0.2.1 via ge-3/1/2.0, selected <<<<< NOTE, THIS IS inet.0 PATH TO REACH 1.1.1.1
Session Id: 0x1
Protocol next hop: 1.1.1.1
Now if we check unreoslved routes, we indeed see VPN routes not be resolved as 1.1.1.1 is not available in inet.3 table
suryak@PE# run show route resolution unresolved
Tree Index 1
Tree Index 2
100:1:90.0.0.0/88
Protocol Nexthop: 1.1.1.1 Push 16
Indirect nexthop: 0 - INH Session ID: 0x0100:1:0.0.0.0/64
Protocol Nexthop: 1.1.1.1 Push 16
Indirect nexthop: 0 - INH Session ID: 0x0100:1:100.0.0.0/94
Protocol Nexthop: 1.1.1.1 Push 16
Indirect nexthop: 0 - INH Session ID: 0x0100:1:200.1.0.0/88
Protocol Nexthop: 1.1.1.1 Push 16
Indirect nexthop: 0 - INH Session ID: 0x0.
Once I enable LDP (RSVP can also be done), we see these routes being ACTIVE:
suryak@PE# run show route 1.1.1.1
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[OSPF/10] 10:21:29, metric 2
> to 20.0.2.1 via ge-3/1/2.0
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 00:00:04, metric 1
> to 20.0.2.1 via ge-3/1/2.0, Push 299888
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table bgp.l3vpn.0
bgp.l3vpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
100:1:0.0.0.0/0
* 1.1.1.1 100 I
100:1:90.0.0.0/24
* 1.1.1.1 100 65111 I
100:1:100.0.0.0/30
* 1.1.1.1 100 I
100:1:200.1.0.0/24
* 1.1.1.1 100 65111 I
Now let's check back bgp inet.0 route.
suryak@PE# run show route 66.1/24 detail
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
66.1.0.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x944cac0
Next-hop reference count: 3
Source: 1.1.1.1
Next hop type: Router, Next hop index: 609
Next hop: 20.0.2.1 via ge-3/1/2.0, selected <<<<
Label operation: Push 299888 <<<< Now it takes inet.3 instead of inet.0 path as earlier.
Label TTL action: prop-ttl
Session Id: 0x1
Protocol next hop: 1.1.1.1
As we see 1.1.1.1 is installed in inet.0 as well as in inet.3 table. But only BGP takes inet.3 path.
When you do traceroute to 1.1.1.1 from PE, you would see inet.0 path.
suryak@PE# run show route 1.1.1.1
inet.0: 52 destinations, 54 routes (51 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[OSPF/10] 10:25:33, metric 2
> to 20.0.2.1 via ge-3/1/2.0
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 00:00:14, metric 1
> to 20.0.2.1 via ge-3/1/2.0, Push 299888
suryak@PE# run traceroute 1.1.1.1
traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 40 byte packets
1 20.0.2.1 (20.0.2.1) 0.536 ms 0.445 ms 0.439 ms
2 1.1.1.1 (1.1.1.1) 1.124 ms 0.743 ms 10.239 ms
Now, in case you want everything to take inet.3 labeled path instead of inet.0 IP path,
then you can enale bgp-igp (based on assumption is LDP is peferred over OSPF)
suryak@PE# show protocols mpls
traffic-engineering bgp-igp;
suryak@PE# run show route 1.1.1.1
inet.0: 52 destinations, 56 routes (51 active, 2 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 00:00:03, metric 1
> to 20.0.2.1 via ge-3/1/2.0, Push 299888
[OSPF/10] 00:00:03, metric 2
> to 20.0.2.1 via ge-3/1/2.0
suryak@PE# run traceroute 1.1.1.1
traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 40 byte packets
1 20.0.2.1 (20.0.2.1) 0.762 ms 2.374 ms 0.575 ms
MPLS Label=299888 CoS=0 TTL=1 S=1
2 1.1.1.1 (1.1.1.1) 11.030 ms 22.403 ms 0.724 ms
However with this knob in place, we see l3vpn routes being hidden/inactive as you don't see 1.1.1.1 in inet.3 table.
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table VPNA.inet.0
VPNA.inet.0: 4 destinations, 4 routes (0 active, 0 holddown, 4 hidden)
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table VPNA.inet.0 hidden
VPNA.inet.0: 4 destinations, 4 routes (0 active, 0 holddown, 4 hidden)
Prefix Nexthop MED Lclpref AS path
0.0.0.0/0 1.1.1.1 100 I
90.0.0.0/24 1.1.1.1 100 65111 I
100.0.0.0/30 1.1.1.1 100 I
200.1.0.0/24 1.1.1.1 100 65111 I
To overcome this, you make it bgp-igp-both-ribs.
suryak@PE# show protocols mpls
traffic-engineering bgp-igp-both-ribs;
suryak@PE# run traceroute 1.1.1.1
traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 40 byte packets
1 20.0.2.1 (20.0.2.1) 0.718 ms 0.621 ms 0.574 ms
MPLS Label=299888 CoS=0 TTL=1 S=1
2 1.1.1.1 (1.1.1.1) 0.861 ms 0.642 ms 0.580 ms
suryak@PE# run show route receive-protocol bgp 1.1.1.1 table VPNA.inet.0
VPNA.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 0.0.0.0/0 1.1.1.1 100 I
* 90.0.0.0/24 1.1.1.1 100 65111 I
* 100.0.0.0/30 1.1.1.1 100 I
* 200.1.0.0/24 1.1.1.1 100 65111 I
Wasn't it a lengthy explanation. But I hope it answers your queries.
Regards
Surya