I can across this while following the JNCIS-SP fasttrack Carrier of Carriers VPN customer example but I think the question is a more generalized one.
Consider one of the customers site as follows -
C-PE-1-------------------------C-P-1-------------------------C-CE-1
192.168.12.3 192.168.12.100 192.168.12.1
LDP has been activated everywhere with no changes to default policy (thus lables are distributed for each Router's loopback IP). The IGP is OSPF and all connected routes are advertised in OSPF.
Now, the C-CE-1 interfaces with P-PE-1 and they exchange BGP inet labeled-unicast NLRIs.
On C-CE-1, OSPF is redistributed into BGP via routing policy. This is where the problem starts. C-CE-1 advertises a label for 192.168.12.3 with a label, say 300592.
nbhasin@CE-1# ...show route advertising-protocol bgp 10.0.20.1 extensive
<SNIP>
* 192.168.12.3/32 (1 entry, 1 announced)
BGP group P-PEs type External
Route Label: 300592
Nexthop: Self
Flags: Nexthop Change
MED: 2
AS path: [10] I
In the mpls.0 table, C-CE-1 installs L1 and the forwarding state for that label is as follows:
nbhasin@CE-1# run show route table mpls.0 label 300592
mpls.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
300592 *[VPN/170] 00:09:05
> to 10.0.151.2 via em1.221, Pop
300592(S=0) *[VPN/170] 00:09:05
> to 10.0.151.2 via em1.221, Pop
Now this creates a problem. For a packet across CoC with a top label of 300592 and say a VPN label of 16, the C-CE-1 will pop the top label and forward the MPLS packet to C-P-1 with a label of 16. Since the IBGP inet labeled-unicast session is only between C-CE and C-PE, P1 does not know about 16 and drops the packet.
So I decided to redistribute LDP instead of OSPF into BGP and see how that would work. I used the following very basic policy to do this :
policy-statement LDP->BGP {
from protocol ldp;
then accept;
}
This did not work as no LDP routes are advertised in BGP. I realized that since LDP only installs routes in inet.3 by default, that maybe the issue. So I modified the policy as follows:
policy-statement LDP->BGP {
from {
protocol ldp;
rib inet.3;
}
then accept;
}
No luck still. Finally, I enabled the MPLS protocol to copy all the MPLS routes into inet.0 using :
set protocols mpls traffic-engineering bgp-igp-both-ribs
I also removed the rib inet.3 from the policy and things started working.
nbhasin@CE-1# ...show route advertising-protocol bgp 10.0.20.1 extensive
inet.0: 14 destinations, 16 routes (14 active, 0 holddown, 0 hidden)
* 192.168.12.3/32 (2 entries, 2 announced)
BGP group P-PEs type External
Route Label: 300608
Nexthop: Self
Flags: Nexthop Change
MED: 1
AS path: [10] I
-----------------------------------
[edit]
nbhasin@CE-1# run show route table mpls.0 label 300608
mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
300608 *[VPN/170] 00:00:35
> to 10.0.151.2 via em1.221, Swap 299824
So, my basic question is, what am I doing wrong in my routing policy in the first examples? I really do not want to copy all the MPLS routes into inet.0 to enable redistribution.
Is there a way to configure redistribution between LDP and BGP where the routes would not have to be moved into inet.0?
Thanks in adavance,
Nic
#JNCIE#MPLS#BGP#ldp