One of my readers was having an LDP argument with his colleague:
Yesterday I was arguing with someone who works for a large MPLS provider about LDP label allocation. He kept saying that LDP assigns a label to each next-hop, not to each prefix. Reading your blog, I believe this is the default behavior on Juniper but on Cisco LDP assigns a unique label for each IGP (non-BGP) prefix.
He’s absolutely right; Cisco and Juniper use different rules when allocating MPLS labels.
Cisco IOS allocates a label to every IGP prefix in the IP routing table (not to BGP prefixes). Junos allocates a label to every local loopback interface and to all prefixes that have label assigned by the downstream router, resulting in labels assigned to all loopback interfaces.
Loopback interfaces happen to be BGP next hops in MPLS/VPN environments, and for regular BGP destinations if you’re using next-hop-self on IBGP sessions, so his colleague was probably used to Junos way of doing things.
But then that brings up an interesting question. The max number of labels you can have is close to 1 million (2 to the power of 20) which is not enough if you want to assign a label to reach internet prefix.
I know it’s crazy thought to carry a full Internet routing table in IGP, but assuming that is the case how is LDP going to scale?
Nobody is doing that either. Dumping BGP table into IGP successfully kills every IGP known to mankind at this moment.
I wonder why Cisco chose this approach as the default? Does allocating a label per prefix have some advantages I’m not seeing?
I guess it’s mostly for historic reasons. I don’t see other advantages… and of course I’m probably missing something obvious, so please write a comment and fix it.