Overview of the MPLS Configuration Process
MPLS is almost never deployed alone. In this video, we build a complete ISP network topology with:
- 3 BGP autonomous systems: Two customer sites (AS1 and AS2) and one ISP network (AS100)
- Routers: CE1/CE2 at customer sites, PE1/PE2 as provider edge routers, and P routers in the core
- Protocols used: eBGP, OSPF, iBGP, and finally MPLS with LDP
Step-by-Step Configuration
1. Configure eBGP Peerings between CE and PE
- CE1 (AS1) peers with PE1 (AS100) over the 10.10.10.0/24 link
- CE2 (AS2) peers with PE2 (AS100) over a similar link
- Purpose: Customer networks are advertised to the PE routers via eBGP
- Note: BGP configuration details are covered in the video’s BGP series (linked in description). For more on how BGP integrates with MPLS, see How BGP Is Used in the MPLS Core: Edge Routing Explained.
2. Configure OSPF Underlay on All P and PE Routers
- Advertise all loopback interfaces and physical links (except those facing CEs)
- Enable passive interface on customer-facing ports to prevent OSPF from leaking into the CE network
- Why this matters: LDP adjacencies form between loopback IPs, so they must be reachable via OSPF. For a deeper look at LDP’s role, visit LDP in MPLS: Label Distribution Protocol Simply Explained.
3. Configure iBGP Full Mesh between All PE Routers
- Use loopback IPs for iBGP peering (e.g., PE1 and PE2 peer via 4.4.4.4 and 5.5.5.5)
- Required commands:
neighbor ... update-source loopback0andneighbor ... next-hop-self - P routers do not participate in iBGP; they only forward iBGP messages via OSPF
4. Enable MPLS (LDP) on All Core Interfaces
- On each P and PE router, issue the
mpls ipcommand on all interfaces that belong to the MPLS core - Do not enable MPLS on customer-facing interfaces
- Result: LDP adjacencies form automatically, labels are exchanged, and the topology converges. If you need a refresher on MPLS basics, check out MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide).
Verification and Under-the-Hood Analysis
- Successful ping from CE1 to CE2 loopback confirms end-to-end connectivity
- P router IP routing table does not contain the customer’s source/destination IPs, only LDP labels are used in the core. For clarity on device roles, see MPLS Labels, Device Roles & LDP Protocol Explained Simply.
- PE1 routing table: The destination customer network is reachable via the iBGP next hop (PE2, 4.4.4.4)
- LFIB (Label Forwarding Information Base): Shows label 17 pushed for next hop PE2, with exit interface Gi0/2 and next-hop IP 10.10.20.2. Learn about the mechanics behind this in MPLS Label Operations: Pushing, Swapping, and Popping Explained.
- Penultimate Hop Popping (PHP): The last P router pops the label before forwarding to PE2, which then uses standard IP routing to reach CE2
Key Takeaways
- MPLS configuration is minimal, the real work is the routing underlay (IGP + BGP)
- The IGP must make all loopback IPs reachable before MPLS works
- BGP is used only between PEs to exchange customer routes; P routers are BGP-free
- MPLS hides customer IPs inside the core (label switching) and uses PHP to reduce overhead at the egress PE
Hello! This is Lazarus at telecomTech, where telecom and networking technologies... are simply explained! Today we'll be simply explaining a basic configuration of MPLS on Cisco IOS routers. Now don't forget to subscribe to enable notifications and to like this video if
you like this video. And if you have questions or feedback please write them in the comments below, I'm always happy to read them and to respond! As you will see very clearly in this video MPLS is rarely configured alone. It is almost always deployed in combination with a whole series of
other network protocols and features including BGP as well as the use of one or more IGPs such as OSPF or IS-IS. Now the topology that we'll be working with today is this one here. Now let me explain a few things about what we're going to do. We have a topology that consists of three
BGP autonomous systems. We have two customer sites where the CE1 router at the first site is found within BGP AS1 and the CE2 router is at the second site and it's found within BGP AS2. The ISP network consists of a single BGP AS with an AS number of 100. Now all routers in the MPLS ISP
network will have a loopback interface and an IP address configured on those interfaces. For now, I've only labeled the PE and the P routers that we will be dealing with along the expected MPLS path. But this is done for all PE and P routers in the ISP MPLS network. We'll see how those loopbacks
are going to be used in our configuration. Then we'll configure an eBGP peering between CE1 and PE1 and another eBGP peering between CE2 and PE2. This is done so that customer networks such as those ones here will be advertised to the PE router. Then we'll configure the
OSPF underlay on all of the P and PE routers. We will then configure a full mesh of iBGP peerings between the PE routers. And finally, once all of that is done, then we'll enable MPLS. Well, let's get configuring! Now the routing protocol between the CE and PE routers can actually be anything,
but for the purposes of this video, I've chosen to use BGP. These will be eBGP peerings because the routers are in different ASes. We have the 10.10.10.0/24 network between these two routers and the IP addresses of each interface are the .1 and .2 addresses. Now because I've covered BGP
configurations extensively in my BGP Video series, I will just show you the configurations briefly here. You can check out my BGP videos in the links in the description below for more details. This is the configuration that essentially establishes the eBGP peerings between CE1 and PE1. And we
have a similar configuration at the CE2 location between CE2 and PE2 and using the appropriate AS numbers and IP addresses of eBGP neighbors. Now notice here that it is the customer network on the CE2 router that is being advertised. So these eBGP peerings will cause the CE routers to
advertise their networks to the PE routers. Next we configure the P and PE routers within the ISP infrastructure with OSPF such that all routers within the topology can find each other and ping each other. In this configuration, we ensure that the loopbacks of all devices are also reachable by
advertising them via OSPF. Now this is vital because ultimately what we want is for LDP adjacencies to form between MPLS enabled routers and LDP adjacencies will always form between the loopback addresses by default, so they should be advertised by the IGP and reachable to each other.
Now here's a sample of the OSPF configuration that we would find within our PE1 router. We're advertising the loopback address as well as the network serving this link here. But notice that we are not advertising the network of the interface that connects to the CE1 router. This is where the
OSPF domain ends. It doesn't extend into the CE at all! Ideally we should configure that interface as a passive interface so that no OSPF messages like hello messages are sent to the CE router at all. And here we see a sample OSPF configuration found within a P router. Here all networks on all
interfaces are advertised as well as the loopback address. Now ultimately all IP addresses of all P and PE routers on physical interfaces and loopback interfaces, except those facing the customer edge devices, should be reachable from each other. So that's the IGP underlay configured using OSPF. Now
that all of the P and PE routers are reachable to each other, we can configure iBGP peerings between all PEs. Now remember BGP here is used to exchange customer networks only. For our topology here, we'll be looking at the iBGP peering that will establish between PE1 and PE2. Now to configure
these peerings, we issue the following commands. Within each PE, we create the peerings between the loopbacks. That's one more reason why we created those loopback interfaces, and why we want them advertised by the routing protocol. Since we're using the loopbacks, we must also use the `next
hop self` command and the `update source` command. If you're not sure what those are, take a look at the related BGP videos linked in the description below. Now the P routers remain unchanged. They don't need to know about BGP because they won't be participating in it. They don't need to know the
customer networks but their OSPF configurations allow them to convey iBGP peering messages between the PE routers, allowing them to become iBGP peers and exchange routes. Now I'm not sure if you realized that after all of that configuration we haven't even started configuring MPLS! But not
to worry, because enabling MPLS is actually among the simplest configuration steps in this process. Now MPLS on Cisco devices is enabled on a per-interface basis and this is done by issuing the `mpls ip` command on all interfaces within the MPLS core network. In other words, all interfaces
except those facing customers. This essentially enables the LDP protocol and allows these routers to create LDP adjacencies and exchange labels. And after a few seconds, the topology should be converged! So here's the configuration on P2 as well as on PE2. So now all of these interfaces
have MPLS enabled and LDP adjacencies are forming between the loopback interfaces. Now if we ping from CE1's loopback address to CE2's loopback address, we will get a successful ping. But let's see what's actually happening under the hood. First, let's take a look at one of our P routers.
Here in the IP table, we don't see the source or destination address of that ping, and yet our ping was successful! That means that we're no longer using IP routing at this point in the topology but we're using label switching which is what we want. Secondly let's take a look at our routing
table for our destination within PE1. We can see here that in order to get to our destination from PE1 we need to get to the PE2 iBGP neighbor which is indicated here by the 4.4.4.4 loopback IP address. PE1 learned about this customer route from its iBGP peering with PE2 and we can see
that the next hop, in order to get there, is PE2 itself. Let's see what the LFIB tells us about how to get to that destination. Here we can see that the next hop IP of PE2 corresponds to label 17, with an exit interface of GigabitEthernet0/2, and a next hop IP of 10.10.20.2 which is that
of this P router here. So this label is pushed and the packet is sent. Notice that the actual customer destination network doesn't appear anywhere in the LFIB. It's only the IP address of the destination PE that is seen and the labels are used to get to that PE device.
Now I won't continue the verification steps on the rest of the P and PE routers in detail, because we've seen those in previous videos, but I will just say that label switching continues to occur until you get to the last P router. At this point, penultimate hop popping takes place, or PHP, where
the label is popped or removed. Once that's done it's sent to the PE2 router which has a route to the destination and it is sent to the destination using simple IP routing. So that, in a nutshell, is how you configure and verify MPLS. Now it's amazing how the MPLS configuration is just a very
small part of the whole configuration procedure because of the fact that you need routing to be configured between CEs and PEs and an IGP to be configured on the ISP infrastructure, and BGP to be configured between all PE routers, and only then are you able to enable the functionality
of MPLS to get the results you want! Anyway, I hope you found this video useful and if you have please click that thumbs up button. If you have any questions, feel free to leave a comment below and please subscribe to get updates to newly published videos. I'm Lazarus at telecomTech,
I hope this has been helpful for you, and I'd like to thank you for watching!
OSPF ensures that all loopback interfaces and core-facing links among P and PE routers are reachable. This is critical because LDP forms adjacencies using loopback IPs, so without OSPF, LDP neighbors cannot establish and label exchange will fail.
P routers function as pure label-switching devices; they only forward MPLS-labeled packets based on the LFIB. iBGP is unnecessary on P routers because customer routes are exchanged only between PEs via iBGP full mesh, and P routers rely on OSPF to forward iBGP traffic between PEs.
When packets enter the MPLS core, the ingress PE router pushes a label onto the packet. Core P routers switch packets based solely on these labels, inspecting only the LFIB, never the IP header. This ensures customer source/destination IPs remain invisible in the core.
PHP allows the last P router before the egress PE to remove the MPLS label before forwarding the packet. This reduces the workload on the egress PE, which then performs standard IP routing to deliver the packet to the destination CE router.
Customer-facing interfaces connect to CE routers that are not part of the MPLS domain. Enabling LDP on those interfaces could cause unwanted label exchange with customer devices, potentially leaking label bindings and disrupting the MPLS core.
Successful end-to-end ping from CE1 to CE2 loopback confirms connectivity. Additionally, checking the LFIB on PE1 (e.g., showing label 17 pushed for next hop PE2 via Gi0/2) and verifying that P router IP routing tables lack customer IPs confirms proper label switching.
'update-source loopback0' forces iBGP sessions to use the stable loopback IP as the source, preventing session failures if a physical interface goes down. 'next-hop-self' makes the PE router advertise itself as the next hop for routes learned via eBGP, ensuring P routers can reach the next hop via OSPF without needing iBGP.
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
32K+ people have turned 65K+ videos into notes
“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.
Related summaries
How BGP Is Used in the MPLS Core: Edge Routing Explained
Learn how BGP operates only on the perimeter of an MPLS network, enabling PE routers to share customer routes while core P routers stay label-switching only. This video breaks down the CE/PE/P router roles, IBGP full-mesh on edges, and why MPLS beats IP routing for scalability.
Configure MPLS VPNv4 Routes on Cisco IOS Step-by-Step
Learn how to configure VPNv4 routes on an MPLS backbone using Cisco IOS routers. This tutorial covers underlay setup, OSPF, MPLS/LDP, VRFs, Route Distinguishers, Route Targets, and multi-protocol iBGP peering for VPNv4.
MPLS Labels, Device Roles & LDP Protocol Explained Simply
This video from telecom.Tech breaks down MPLS labels, the roles of CE, PE, and P routers, and how the Label Distribution Protocol (LDP) auto-populates forwarding tables. A clear, beginner-friendly overview of MPLS core network operations and packet switching mechanics.
MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide)
MPLS is a high-performance network protocol used in ISP core networks to efficiently direct data between nodes using labels instead of IP lookups. It sits between Layer 2 and Layer 3, encapsulates multiple protocols, and is ideal for interconnecting customer sites securely. This video provides a simple introduction to MPLS, comparing it to traditional IP routing and explaining its key benefits.
LDP in MPLS: Label Distribution Protocol Simply Explained
Learn how Label Distribution Protocol (LDP) works in MPLS networks. This comprehensive guide explains label exchange, LIB and LFIB constructs, and penultimate label popping from first principles.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes