LDP distributes labels within an autonomous system. But LDP doesn’t cross AS boundaries. For MPLS across multiple ASes, you need something else.
BGP Labeled Unicast (BGP-LU) distributes MPLS labels via BGP — the same protocol already handling inter-AS routing. Labels follow prefixes across AS boundaries, enabling end-to-end MPLS paths spanning multiple networks.
BGP-LU replaces LDP in modern scalable designs.
Why BGP-LU
LDP Limitations
AS 65001 AS 65002[PE1]──[P1]──[ASBR1] [ASBR2]──[P2]──[PE2] LDP │ LDP │ eBGP session (no labels!)LDP sessions don’t cross AS boundaries. MPLS stops at the border.
BGP-LU Solution
AS 65001 AS 65002[PE1]──[P1]──[ASBR1]══[ASBR2]──[P2]──[PE2] BGP-LU (prefixes + labels)BGP carries labels along with prefixes. MPLS continues across ASes.
BGP-LU Basics
How It Works
1. PE1 allocates label for its loopback (10.255.0.1/32)2. PE1 advertises via BGP: 10.255.0.1/32, label 10013. Intermediate routers receive prefix+label4. Traffic to 10.255.0.1 gets labeled 1001 at ingress5. Label-switched to PE1BGP-LU vs LDP
| Feature | LDP | BGP-LU |
|---|---|---|
| Scope | Single AS | Multi-AS |
| Protocol | Separate (LDP) | Existing (BGP) |
| Label binding | FEC-based | Prefix-based |
| Scalability | IGP-limited | BGP-limited |
| Operational | Two protocols | One protocol |
Configuring BGP-LU
Enable Labeled Unicast Address Family
configure
# Enable labeled unicast for IPv4set protocols bgp address-family ipv4-labeled-unicast
# Redistribute connected/loopback with labelsset protocols bgp address-family ipv4-labeled-unicast redistribute connected
commitConfigure BGP-LU Neighbor
configure
# iBGP neighbor with labeled unicastset protocols bgp neighbor 10.255.0.2 remote-as 65001set protocols bgp neighbor 10.255.0.2 address-family ipv4-labeled-unicast
# eBGP neighbor with labeled unicastset protocols bgp neighbor 192.0.2.1 remote-as 65002set protocols bgp neighbor 192.0.2.1 address-family ipv4-labeled-unicast
commitNetwork Statement with Labels
configure
# Advertise loopback with labelset protocols bgp address-family ipv4-labeled-unicast network 10.255.0.1/32
commitViewing BGP-LU State
Show Labeled Routes
# Show BGP-LU routesshow bgp ipv4 labeled-unicast
# Output:# Network Next Hop Label Path# 10.255.0.1/32 0.0.0.0 1001 i# 10.255.0.2/32 10.0.0.2 2001 i# 10.255.0.3/32 192.0.2.1 3001 65002 iShow Label Bindings
# Show MPLS table (FRR)show mpls table
# Show specific prefix labelshow bgp ipv4 labeled-unicast 10.255.0.2/32Inter-AS MPLS Options
Option A: Back-to-Back VRF
No BGP-LU needed:[PE1]──MPLS──[ASBR1]─────VRF─────[ASBR2]──MPLS──[PE2] IP routing (MPLS restarts)Simple but doesn’t provide end-to-end MPLS.
Option B: eBGP Labeled Unicast
BGP-LU across ASBRs:[PE1]──MPLS──[ASBR1]═══BGP-LU═══[ASBR2]──MPLS──[PE2]# ASBR1 configset protocols bgp neighbor 192.0.2.1 remote-as 65002set protocols bgp neighbor 192.0.2.1 address-family ipv4-labeled-unicast
# ASBR1 must swap labels at boundaryOption C: Multihop eBGP + Labels
BGP-LU between PEs (via route reflector):[PE1]════════════BGP-LU═════════════[PE2] (reflected through ASBRs)Most scalable, but complex.
Seamless MPLS
Seamless MPLS uses BGP-LU to create unified MPLS network:
┌─ Access ─┐ ┌─ Aggregation ─┐ ┌─ Core ─┐AN ── AGN ── ABR ── CR ── ABR ── AGN ── AN
AN = Access NodeAGN = Aggregation NodeABR = Area Border RouterCR = Core Router
BGP-LU provides end-to-end label pathNo LDP needed in coreBenefits
- Single label stack (not stacked LDP + BGP labels)
- Scales to millions of prefixes
- Consistent forwarding behavior
BGP-LU with VPN Services
L3VPN over BGP-LU
configure
# BGP-LU for transportset protocols bgp address-family ipv4-labeled-unicast
# VPNv4 for customer routesset protocols bgp address-family ipv4-vpn
# VPNv4 uses BGP-LU next-hop for label stack
commitLabel Stack
Outer label: BGP-LU label (transport)Inner label: VPN label (service)
[VPN Label | BGP-LU Label | IP Packet]BGP-LU Best Practices
1. Use Route Reflectors
# BGP-LU at scale needs route reflectors# Same as regular BGP
set protocols bgp neighbor 10.255.0.100 remote-as 65001set protocols bgp neighbor 10.255.0.100 address-family ipv4-labeled-unicastset protocols bgp neighbor 10.255.0.100 update-source lo2. Filter at Boundaries
# Don't accept labeled routes from customersset policy prefix-list INFRA-ONLY rule 10 prefix 10.255.0.0/16 le 32set policy prefix-list INFRA-ONLY rule 10 action permit
set policy route-map LU-IN rule 10 match ip address prefix-list INFRA-ONLYset policy route-map LU-IN rule 10 action permitset policy route-map LU-IN rule 20 action deny
set protocols bgp neighbor 192.0.2.1 address-family ipv4-labeled-unicast route-map import LU-IN3. Consistent Label Allocation
# All routers should use consistent label allocation policy# Usually per-prefix labeling for PE loopbacksTroubleshooting BGP-LU
Labels Not Exchanged
# Check capability negotiationshow bgp neighbors 10.0.0.2
# Look for:# IPv4 Labeled Unicast: advertised and received
# If not:# - Check address-family configuration# - Check both sides support labeled unicastWrong Label
# Show label for specific prefixshow bgp ipv4 labeled-unicast 10.255.0.2/32
# Verify label in MPLS tableshow mpls table
# Check label is being used for forwardingPath Not Using Labels
# Verify next-hop is reachable via MPLSshow bgp ipv4 labeled-unicast 10.255.0.2/32
# Check next-hop resolution# BGP-LU requires next-hop to have labelMigration from LDP to BGP-LU
Parallel Operation
# Run both LDP and BGP-LU during migration# LDP handles existing paths# BGP-LU handles new paths
# Gradually shift traffic to BGP-LU# Remove LDP when stableOrder of Operations
1. Enable BGP-LU on all routers2. Verify BGP-LU paths working3. Prefer BGP-LU over LDP (if needed)4. Disable LDP5. Clean up LDP configurationThe Lesson
BGP-LU replaces LDP in modern scalable designs.
LDP works within a single AS but:
- Doesn’t cross AS boundaries
- Requires separate protocol maintenance
- Scales with IGP (limited)
BGP-LU advantages:
- Works across AS boundaries
- Uses existing BGP infrastructure
- Scales with BGP (better)
- Enables Seamless MPLS designs
When to use BGP-LU:
- Multi-AS MPLS networks
- Large-scale service provider networks
- New MPLS deployments
VyOS BGP-LU support is functional for basic scenarios. For production SP networks, verify feature completeness in your VyOS version.