Complete MPLS Core Configuration Guide Part 1
Welcome to Part 1 of the MPLS Service Provider series.
In this tutorial we will configure:
- OSPF as the Interior Gateway Protocol
- MPLS Label Switching
- LDP Neighbor Relationships
- MPLS Core Infrastructure
- Loopback-based LDP Router IDs
This lab forms the foundation for advanced MPLS technologies such as:
- MPLS Layer 3 VPN
- MPLS Traffic Engineering
- MPLS Multicast VPN
- MPLS Segment Routing
- Carrier Supporting Carrier
๐ฏ What You Will Learn
- How OSPF works inside MPLS provider networks
- Why MPLS requires an IGP
- How LDP forms label neighbor relationships
- Why loopback interfaces are important
- How MPLS labels are distributed
- How label switching works
- MPLS forwarding fundamentals
- MPLS verification commands
Table of Contents
1. MPLS Introduction
MPLS stands for:
Multiprotocol Label Switching
MPLS is a packet-forwarding technology that improves forwarding efficiency using labels instead of traditional IP lookups.
Traditional IP Forwarding
Routers normally perform:
- Destination IP lookup
- Longest Prefix Match
- Routing table searches
This process becomes slower in very large routing tables.
MPLS Forwarding
MPLS uses labels.
Routers simply swap labels instead of performing repeated routing lookups.
Traditional Routing Formula
$$ Forwarding = Routing\\ Table\\ Lookup $$MPLS Forwarding Formula
$$ Forwarding = Label\\ Swap $$Why MPLS?
- Faster forwarding
- VPN scalability
- Traffic Engineering
- QoS integration
- Multicast support
- Carrier-grade infrastructure
2. Network Topology
MPLS SERVICE PROVIDER CORE
R1 -------- R2
| \ / |
| \ / |
| \ / |
| \ / |
| / \ |
| / \ |
| / \ |
| / \ |
R3 -------- R4
This topology provides:
- Multiple MPLS paths
- OSPF redundancy
- LDP neighbor relationships
- High availability
Router Roles
| Router | Role |
|---|---|
| R1 | Provider Router |
| R2 | Provider Router |
| R3 | Provider Router |
| R4 | Provider Router |
3. Task 1 - Configure OSPF Between All SP Routers
OSPF provides reachability information inside the MPLS core.
MPLS itself does NOT advertise routes.
An Interior Gateway Protocol is required.
Why OSPF?
- Fast convergence
- Scalability
- Hierarchical design
- Wide Cisco support
- Efficient SPF calculations
OSPF Cost Formula
$$ Cost = \frac{Reference\\ Bandwidth}{Interface\\ Bandwidth} $$R1 OSPF Configuration
Code Example
router ospf 1 router-id 0.0.0.1
R1 router ospf 1 router-id 0.0.0.1 network 192.1.12.0 0.0.0.255 area 0 network 192.1.13.0 0.0.0.255 area 0 network 192.1.14.0 0.0.0.255 area 0 network 1.0.0.0 0.255.255.255 area 0
Detailed Explanation
router ospf 1
Starts OSPF process ID 1.
router-id 0.0.0.1
Assigns a unique router identifier.
network Commands
Advertise interfaces into OSPF Area 0.
Area 0 is the OSPF backbone area.
R2 OSPF Configuration
R2 router ospf 1 router-id 0.0.0.2 network 192.1.12.0 0.0.0.255 area 0 network 192.1.23.0 0.0.0.255 area 0 network 192.1.24.0 0.0.0.255 area 0 network 2.0.0.0 0.255.255.255 area 0
R3 OSPF Configuration
R3 router ospf 1 router-id 0.0.0.3 network 192.1.13.0 0.0.0.255 area 0 network 192.1.23.0 0.0.0.255 area 0 network 192.1.34.0 0.0.0.255 area 0 network 3.0.0.0 0.255.255.255 area 0
R4 OSPF Configuration
R4 router ospf 1 router-id 0.0.0.4 network 192.1.14.0 0.0.0.255 area 0 network 192.1.24.0 0.0.0.255 area 0 network 192.1.34.0 0.0.0.255 area 0 network 4.0.0.0 0.255.255.255 area 0
Expected OSPF Neighbor Output
show ip ospf neighbor
R1#show ip ospf neighbor Neighbor ID State Interface 0.0.0.2 FULL Ethernet0/0 0.0.0.3 FULL Ethernet0/1 0.0.0.4 FULL Ethernet0/2
OSPF Neighbor Formula
$$ Hello + Matching\\ Parameters = Adjacency $$4. Task 2 - Configure MPLS and LDP
Now we enable MPLS forwarding on provider links.
What is LDP?
LDP stands for:
Label Distribution Protocol
LDP distributes MPLS labels between routers.
Why Use Loopback as LDP Router-ID?
- Loopbacks never go down
- Provides stable neighbor identity
- Improves MPLS stability
LDP Neighbor Formula
$$ LDP\\ Neighbor = TCP + Reachability $$R1 MPLS Configuration
Code Example
mpls ldp router-id Loopback0
R1 mpls ldp router-id Loopback0 ! interface E0/0 mpls ip ! interface E0/1 mpls ip ! interface E0/2 mpls ip
Detailed Explanation
mpls ldp router-id Loopback0
Uses Loopback0 as the stable LDP identifier.
mpls ip
Enables MPLS forwarding on interfaces.
Without this command:
- No label switching
- No MPLS forwarding
- No LDP neighbors
R2 MPLS Configuration
R2 mpls ldp router-id Loopback0 ! interface E0/0 mpls ip ! interface E0/1 mpls ip ! interface E0/2 mpls ip
R3 MPLS Configuration
R3 mpls ldp router-id Loopback0 ! interface E0/0 mpls ip ! interface E0/1 mpls ip ! interface E0/2 mpls ip
R4 MPLS Configuration
R4 mpls ldp router-id Loopback0 ! interface E0/0 mpls ip ! interface E0/1 mpls ip ! interface E0/2 mpls ip
5. MPLS Verification
Verify OSPF Neighbors
show ip ospf neighbor
Verify MPLS Interfaces
show mpls interfaces
Sample Output
R1#show mpls interfaces Interface IP Tunnel Et0/0 Yes No Et0/1 Yes No Et0/2 Yes No
Verify LDP Neighbors
show mpls ldp neighbor
Sample Output
R1#show mpls ldp neighbor Peer LDP Identifier: 2.2.2.2:0 TCP connection: 192.1.12.2 Peer LDP Identifier: 3.3.3.3:0 TCP connection: 192.1.13.3
Verify MPLS Forwarding Table
show mpls forwarding-table
Sample MPLS LFIB Output
R1#show mpls forwarding-table Local Outgoing Prefix 16 Pop Label 1.0.0.0/8 17 18 2.0.0.0/8
MPLS Label Formula
$$ Incoming\\ Label \rightarrow Swap \rightarrow Outgoing\\ Label $$MPLS Label Operations
| Operation | Description |
|---|---|
| Push | Add MPLS label |
| Swap | Replace label |
| Pop | Remove label |
6. MPLS Mathematics
Forwarding Efficiency Formula
$$ Efficiency = Label\\ Switching > Routing\\ Lookup $$LDP Session Formula
$$ LDP = TCP\\ Port\\ 646 $$OSPF SPF Formula
$$ Shortest\\ Path = Lowest\\ Total\\ Cost $$MPLS Path Formula
$$ LSP = Label\\ Switched\\ Path $$Control Plane Formula
$$ OSPF + LDP = MPLS\\ Control\\ Plane $$7. Troubleshooting MPLS Core
| Problem | Cause | Solution |
|---|---|---|
| No OSPF Neighbor | Network mismatch | Check OSPF config |
| No LDP Neighbor | MPLS disabled | Enable mpls ip |
| No Labels | No IGP reachability | Verify routing table |
| MPLS Interface Down | Physical issue | Check interfaces |
| No LFIB Entries | LDP failure | Verify neighbors |
Useful Verification Commands
show ip ospf neighbor show ip route show mpls interfaces show mpls ldp neighbor show mpls forwarding-table show ip cef
8. Related Articles
๐ก Key Takeaways
- OSPF provides MPLS reachability
- MPLS requires an IGP
- LDP distributes labels
- Loopback interfaces provide stable identities
- MPLS forwarding uses label switching
- Provider links must enable MPLS
- OSPF Area 0 forms backbone connectivity
- LSPs create MPLS forwarding paths
Final Conclusion
This Part 1 MPLS Core tutorial established the foundational MPLS Service Provider infrastructure.
We configured:
- OSPF routing
- MPLS forwarding
- LDP neighbors
- Loopback router IDs
- Label switching
- MPLS verification
This MPLS core now provides the foundation for advanced MPLS VPN services including:
- MPLS Layer 3 VPN
- Multicast VPN
- Traffic Engineering
- Carrier Ethernet
No comments:
Post a Comment