Chapter 5: Configuration & Implementation
Learn practical MPLS configuration and implementation techniques, from basic MPLS setup to advanced L3VPN deployments, with real-world configuration examples and verification commands.
Basic MPLS Configuration
Setting up MPLS requires enabling MPLS forwarding on interfaces and configuring an IGP for LSP establishment. Here's the fundamental configuration steps:
MPLS Enablement Steps
1. Enable MPLS globally → 2. Configure IGP → 3. Enable MPLS on interfaces → 4. Configure LDP
Core Router Configuration
! Enable MPLS globally
ip cef
mpls ip
! Configure OSPF
router ospf 1
 router-id 1.1.1.1
 network 0.0.0.0 255.255.255.255 area 0
! Interface configuration
interface GigabitEthernet0/0
 ip address 10.1.1.1 255.255.255.252
 mpls ip
 no shutdown
                                        PE Router Configuration
! Enable MPLS globally
ip cef
mpls ip
! Configure loopback
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
! Core-facing interface
interface GigabitEthernet0/0
 ip address 10.1.1.2 255.255.255.252
 mpls ip
 no shutdown
                                        LDP Configuration
LDP configuration involves setting up neighbor relationships, configuring router IDs, and establishing targeted LDP sessions for advanced services.
| Configuration Task | Command | Purpose | Default | 
|---|---|---|---|
| Enable LDP globally | mpls ldp router-id loopback0 | Set LDP router ID | Highest IP address | 
| Enable LDP on interface | mpls ip | Enable label distribution | Disabled | 
| Configure targeted LDP | mpls ldp neighbor x.x.x.x targeted ldp | Establish remote sessions | Not configured | 
| LDP discovery hello | mpls ldp discovery hello interval | Adjust hello timers | 5 seconds | 
Complete LDP Configuration Example
! LDP global configuration
mpls ldp router-id loopback0 force
mpls ldp discovery hello interval 10
mpls ldp discovery hello holdtime 30
! Targeted LDP for PE-PE sessions
mpls ldp neighbor 3.3.3.3 targeted ldp
mpls ldp neighbor 4.4.4.4 targeted ldp
! Interface-specific LDP settings
interface GigabitEthernet0/0
 mpls ip
 mpls ldp igp sync
                                        L3VPN Configuration
L3VPN configuration involves creating VRFs, configuring MP-BGP, and establishing PE-CE relationships. This section covers comprehensive VPN setup.
VRF Configuration
! Create VRF
ip vrf CUSTOMER_A
 rd 65001:100
 route-target export 65001:100
 route-target import 65001:100
! Assign interface to VRF
interface GigabitEthernet0/1
 ip vrf forwarding CUSTOMER_A
 ip address 192.168.1.1 255.255.255.0
 no shutdown
                                        MP-BGP Configuration
! MP-BGP configuration
router bgp 65001
 bgp router-id 2.2.2.2
 no bgp default ipv4-unicast
 
 neighbor 3.3.3.3 remote-as 65001
 neighbor 3.3.3.3 update-source loopback0
 
 address-family vpnv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community extended
                                        Static PE-CE
! Static routing
ip route vrf CUSTOMER_A 10.10.10.0 255.255.255.0 192.168.1.2
! Redistribute in BGP
router bgp 65001
 address-family ipv4 vrf CUSTOMER_A
  redistribute static
                                        BGP PE-CE
! BGP PE-CE
router bgp 65001
 address-family ipv4 vrf CUSTOMER_A
  neighbor 192.168.1.2 remote-as 65002
  neighbor 192.168.1.2 activate
  neighbor 192.168.1.2 as-override
                                        OSPF PE-CE
! OSPF PE-CE
router ospf 2 vrf CUSTOMER_A
 router-id 2.2.2.2
 area 0
 network 192.168.1.0 0.0.0.255 area 0
 redistribute bgp 65001 metric 100
                                        Verification Commands
Proper verification is crucial for MPLS network operation. This section covers essential show commands and troubleshooting techniques.
| Command | Purpose | Key Information | Troubleshooting Focus | 
|---|---|---|---|
| show mpls interfaces | MPLS-enabled interfaces | Interface status, IP, tunnel | Interface MPLS enablement | 
| show mpls ldp neighbors | LDP adjacencies | Neighbor state, addresses | LDP session establishment | 
| show mpls forwarding-table | Label forwarding table | Local/remote labels, next-hops | Label distribution issues | 
| show ip route vrf | VRF routing table | Routes, next-hops, sources | VPN route propagation | 
| show bgp vpnv4 unicast all | VPNv4 BGP table | RD, RT, labels | BGP VPN route exchange | 
Core MPLS Verification
! Check MPLS interfaces
show mpls interfaces
show mpls interfaces detail
! Verify LDP neighbors
show mpls ldp neighbors
show mpls ldp discovery
! Check label distribution
show mpls forwarding-table
show mpls ldp bindings
                                        VPN Verification
! Check VRF configuration
show ip vrf
show ip vrf detail
! Verify VPN routes
show ip route vrf CUSTOMER_A
show bgp vpnv4 unicast all
! Test connectivity
ping vrf CUSTOMER_A 10.10.10.1
traceroute vrf CUSTOMER_A 10.10.10.1
                                        Troubleshooting Workflow
1. Check physical layer → 2. Verify IGP → 3. Confirm LDP sessions → 4. Validate label distribution → 5. Test VPN connectivity
Next Steps
Now that you understand MPLS configuration, continue to Chapter 6: Advanced Features to learn about traffic engineering, QoS, and other advanced MPLS capabilities.