A good friend of mine sent me an interesting question:
When I configure mpls ip on an interface, will all packets on that interface be labeled, or just the MPLS/VPN packets received through VRFs? I always assumed that stuff in the global routing table just got forwarded as IP packets without any labels.
When you configure mpls ip on an interface you enable two independent mechanisms:
- LDP is started on the interface, allowing the router to establish LDP adjacencies and exchange labels across that interface;
- MPLS is enabled in the data plane, allowing the router to receive labeled packets through the interface.
Junos has two independent commands, one to enable LDP, another one to enable MPLS on an interface – a fantastic brain scrambler if you’re too IOS-intoxicated.
Regardless of the label distribution mechanism, Cisco IOS installs prefix-to-label mappings in the CEF table. That information is used to compose the MPLS label stack used by MPLS/VPN (with the top label in the stack pointing toward BGP next hop) as well as for regular packet forwarding. No wonder you’ll see labels on packets forwarded through the global forwarding (CEF) table.
Is There a Workaround?
Whenever there’s a challenge, there’s a kludge. This is what you can do:
- Use different BGP next hops for VPNv4 (MPLS/VPN) routes and IPv4 routes, and advertise labels only for VPNv4 next hops.
- Run IP-only core network without MPLS and transport MPLS/VPN traffic across mGRE tunnels.