KEMBAR78
MPLS Configuration Tutorial Cisco (Step by Step) | PDF | Networking | Multiprotocol Label Switching
0% found this document useful (0 votes)
303 views37 pages

MPLS Configuration Tutorial Cisco (Step by Step)

This document provides a step-by-step tutorial on configuring MPLS on Cisco routers, detailing the setup of a 3-router MPLS core and two external sites using OSPF as the routing protocol. It includes commands for IP addressing, enabling MPLS, configuring LDP, establishing BGP sessions, and creating VRFs for customer sites. The tutorial is designed for users to follow along, with verification steps and commands provided throughout the process.

Uploaded by

jolo200test1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
303 views37 pages

MPLS Configuration Tutorial Cisco (Step by Step)

This document provides a step-by-step tutorial on configuring MPLS on Cisco routers, detailing the setup of a 3-router MPLS core and two external sites using OSPF as the routing protocol. It includes commands for IP addressing, enabling MPLS, configuring LDP, establishing BGP sessions, and creating VRFs for customer sites. The tutorial is designed for users to follow along, with verification steps and commands provided throughout the process.

Uploaded by

jolo200test1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Roger Perkin

Learn Network Automation

MPLS Configuration Example Step by Step

If you are looking for an MPLS Tutorial or step by step mpls configuration examples, this basic MPLS
VPN configuration example will guide you from configuring the first router to a 3 router MPLS core
with 2 external sites.

If are you looking for an explanation of MPLS then I would advise you read the “What is MPLS
(https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-
explained.html)” post first before attempting this lab.

How to Configure MPLS on Cisco Router - MPLS Configuration Step by Step - CCIE C…
C…

Cisco MPLS Configuration Video

The entire tutorial is covered in this video above so if you like to just watch the video is there, if you
want to follow along I suggest you open this page twice or print it out so you can make notes.
(https://www.rogerperkin.co.uk/wp-content/uploads/2023/01/avuik-banner-wide.png)

Building the simple MPLS topology below this will consist of a 3 router MPLS core and two remote sites
in the same VRF running OSPF as the PE-CE routing protocol. This will be quite a long post as I will be
taking you through every single verification along the way to ensure you understand how each section
works.

I will be using GNS3 (https://www.gns3.com/) and configuring the routers as we go so you can follow
along.

(https://www.rogerperkin.co.uk/ccie-study-plan/)

I am now heavily involved in Network Automation.


If this is more your thing check out my Network Automation Tutorials
(https://www.rogerperkin.co.uk/network-automation/)

Cisco MPLS Configuration Commands

Step 1 – IP addressing of MPLS Core and OSPF

First bring 3 routers into your topology R1, R2, R3 position them as below. We are going to address the
routers and configure ospf to ensure loopback to loopback connectivity between R1 and R3
R1
hostname R1
int lo0
ip add 1.1.1.1 255.255.255.255
ip ospf 1 area 0

int f0/0
ip add 10.0.0.1 255.255.255.0
no shut
ip ospf 1 area 0

R2
hostname R2
int lo0
ip add 2.2.2.2 255.255.255.255
ip ospf 1 are 0

int f0/0
ip add 10.0.0.2 255.255.255.0
no shut
ip ospf 1 area 0

int f0/1
ip add 10.0.1.2 255.255.255.0
no shut
ip ospf 1 area 0

R3
hostname R3
int lo0
ip add 3.3.3.3 255.255.255.255
ip ospf 1 are 0

int f0/0
ip add 10.0.1.3 255.255.255.0
no shut
ip ospf 1 area 0

You should now have full ip connectivity between R1, R2, R3 to verify this we need to see if we can ping
between the loopbacks of R1 and R3

R1#ping 3.3.3.3 source lo0

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/52/64 ms
R1#

You could show the routing table here, but the fact that you can ping between the loopbacks is
verification enough and it is safe to move on.

(https://www.rogerperkin.co.uk/network-automation/ansible/course/)
Buy My Ansible Course for (https://www.rogerperkin.co.uk/network-
only £29 automation/ansible/course/)

Step 2 – Configure LDP on all the interfaces in the MPLS Core

In order to run MPLS you need to enable it, there are two ways to do this.

At each interface enter the mpls ip command


Under the ospf process use the mpls ldp autoconfig command

For this tutorial we will be using the second option, so go int the ospf process and enter mpls ldp
autoconfig – this will enable mpls label distribution protocol on every interface running ospf under that
specific process.

R1
router ospf 1
mpls ldp autoconfig

R2
router ospf 1
mpls ldp autoconfig

R3
router ospf 1
mpls ldp autoconfig

You should see log messages coming up showing the LDP neighbors are up.

R2#
*Mar 1 00:31:53.643: %SYS-5-CONFIG_I: Configured from console
*Mar 1 00:31:54.423: %LDP-5-NBRCHG: LDP Neighbor 1.1.1.1:0 (1) is UP
R2#
*Mar 1 00:36:09.951: %LDP-5-NBRCHG: LDP Neighbor 3.3.3.3:0 (2) is UP

To verify the mpls interfaces the command is very simple – sh mpls interface
This is done on R2 and you can see that both interfaces are running mpls and using LDP
R2#sh mpls interface
Interface IP Tunnel Operational
FastEthernet0/0 Yes (ldp) No Yes
FastEthernet0/1 Yes (ldp) No Yes

You can also verify the LDP neighbors with the sh mpls ldp neighbors command.

R2#sh mpls ldp neigh


Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0
TCP connection: 1.1.1.1.646 - 2.2.2.2.37909
State: Oper; Msgs sent/rcvd: 16/17; Downstream
Up time: 00:07:46
LDP discovery sources:
FastEthernet0/0, Src IP addr: 10.0.0.1
Addresses bound to peer LDP Ident:
10.0.0.1 1.1.1.1
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
TCP connection: 3.3.3.3.22155 - 2.2.2.2.646
State: Oper; Msgs sent/rcvd: 12/11; Downstream
Up time: 00:03:30
LDP discovery sources:
FastEthernet0/1, Src IP addr: 10.0.1.3
Addresses bound to peer LDP Ident:
10.0.1.3 3.3.3.3

One more verification to confirm LDP is running ok is to do a trace between R1 and R3 and verify if you
get MPLS Labels show up in the trace.

R1#trace 3.3.3.3

Type escape sequence to abort.


Tracing the route to 3.3.3.3

1 10.0.0.2 [MPLS: Label 17 Exp 0] 84 msec 72 msec 44 msec


2 10.0.1.3 68 msec 60 msec *
As you can see the trace to R2 used an MPLS Label in the path, as this is a very small MPLS core only
one label was used as R3 was the final hop.

So to review we have now configured IP addresses on the MPLS core, enabled OSPF and full IP
connectivity between all routers and finally enabled mpls on all the interfaces in the core and have
established ldp neighbors between all routers.

The next step is to configure MP-BGP between R1 and R3

This is when you start to see the layer 3 vpn configuration come to life

Step 3 – MPLS BGP Configuration between R1 and R3

We need to establish a Multi Protocol BGP session between R1 and R3 this is done by configuring the
vpnv4 address family as below

R1#
router bgp 1
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 3.3.3.3 activate

R3#
router bgp 1
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 1.1.1.1 activate

*Mar 1 00:45:01.047: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

You should see log messages showing the BGP sessions coming up.

To verify the BGP session between R1 and R3 issue the command sh bgp vpnv4 unicast all summary
R1#sh bgp vpnv4 unicast all summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


3.3.3.3 4 1 218 218 1 0 0 03:17:48 0

You can see here that we do have a bgp vpnv4 peering to R3 – looking at the PfxRcd you can see it says
0 this is because we have not got any routes in BGP. We are now going to add two more routers to the
topology. These will be the customer sites connected to R1 and R3. We will then create a VRF on each
router and put the interfaces connected to each site router into that VRF.

Step 4 – Add two more routers, create VRFs

We will add two more routers into the topology so it now looks like the final topology

Router 4 will peer OSPF using process number 2 to a VRF configured on R1. It will use the local site
addressing of 192.168.1.0/24.
R4
int lo0
ip add 4.4.4.4 255.255.255.255
ip ospf 2 area 2
int f0/0
ip add 192.168.1.4 255.255.255.0
ip ospf 2 area 2
no shut

R1
int f0/1
no shut
ip add 192.168.1.1 255.255.255.0

Now at this point we have R4 peering to R1 but in the global routing table of R1 which is not what we
want.

We are now going to start using VRF’s

What is a VRF in networking?

Virtual routing and forwarding (VRF) is a technology included in IP (Internet Protocol) that allows
multiple instances of a routing table to co-exist in a router and work together but not interfere with
each other.. This increases functionality by allowing network paths to be segmented without using
multiple devices.
As an example if R1 was a PE Provider Edge router of an ISP and it had two customers that were both
addressed locally with the 192.168.1.0/24 address space it could accommodate both their routing tables
in different VRFs – it distinguishes between the two of them using a Route Distinguisher

So back to the topology – we now need to create a VRF on R1

For this mpls tutorial I will be using VRF RED

R1
ip vrf RED
rd 4:4
route-target both 4:4

The RD and route-target do not need to be the same – and for a full explanation please read this
post on Route Distinguishers
Route Distinguisher vs Route Target (https://www.rogerperkin.co.uk/ccie/mpls/route-distinguisher-vs-
route-target/) before proceeding.

So now we have configured the VRF on R1 we need to move the interface F0/1 into that VRF

R1
int f0/1
ip vrf forwarding RED

Now notice what happens when you do that – the IP address is removed

R1(config-if)#ip vrf fo
R1(config-if)#ip vrf forwarding RED
% Interface FastEthernet0/1 IP address 192.168.1.1 removed due to enabling VRF RED

You just need to re-apply it

R1
int f0/1
ip address 192.168.1.1 255.255.255.0

Now if we view the config on R1 int f0/1 you can see the VRF configured.
R1

R1#sh run int f0/1


Building configuration...

Current configuration : 119 bytes


!
interface FastEthernet0/1
ip vrf forwarding RED
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
end

R1#

Now we can start to look int VRF’s and how they operate – you need to understand now that there are
2 routing tables within R1

The Global Routing Table


The Routing Table for VRF RED

If you issue the command sh ip route this shows the routes in the global table and you will notice that
you do not see 192.168.1.0/24
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets


C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 10.0.0.2, 01:03:48, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/21] via 10.0.0.2, 01:02:29, FastEthernet0/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
O 10.0.1.0 [110/20] via 10.0.0.2, 01:02:39, FastEthernet0/0
R1#

If you now issue the command sh ip route vrf red – this will show the routes in the routing table for VRF
RED

R1#sh ip route vrf red


% IP routing table red does not exist

NOTE: The VRF name is case sensitive!


R1#sh ip route vrf RED

Routing Table: RED


Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, FastEthernet0/1


R1#

We just need to enable OSPF on this interface and get the loopback address for R4 in the VRF RED
routing table before proceeding.

R1
int f0/1
ip ospf 2 area 2

You should see a log message showing the OSPF neighbor come up

R1(config-if)#
*Mar 1 01:12:54.323: %OSPF-5-ADJCHG: Process 2, Nbr 4.4.4.4
on FastEthernet0/1 from LOADING to FULL, Loading Done

If we now check the routes in the VRF RED routing table you should see 4.4.4.4 in there as well.
R1#sh ip route vrf RED

Routing Table: RED


Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

4.0.0.0/32 is subnetted, 1 subnets


O 4.4.4.4 [110/11] via 192.168.1.4, 00:00:22, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/1
R1#

We now need to repeat this process for R3 & R6

Router 6 will peer OSPF using process number 2 to a VRF configured on R3. It will use the local site
addressing of 192.168.2.0/24.

R6
int lo0
ip add 6.6.6.6 255.255.255.255
ip ospf 2 area 2
int f0/0
ip add 192.168.2.6 255.255.255.0
ip ospf 2 area 2
no shut

R3
int f0/1
no shut
ip add 192.168.2.3 255.255.255.0

We also need to configure a VRF onto R3 as well.


R3
ip vrf RED
rd 4:4
route-target both 4:4

So now we have configured the VRF on R3 we need to move the interface F0/1 into that VRF

R3
int f0/1
ip vrf forwarding RED

Now notice what happens when you do that – the IP address is removed

R3(config-if)#ip vrf forwarding RED


% Interface FastEthernet0/1 IP address 192.168.2.1 removed due to enabling VRF RED

You just need to re-apply it

R3
int f0/1
ip address 192.168.2.1 255.255.255.0

Now if we view the config on R3 int f0/1 you can see the VRF configured.

R3
R3#sh run int f0/1
Building configuration...

Current configuration : 119 bytes


!
interface FastEthernet0/1
ip vrf forwarding RED
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
end

Finally we just need to enable OSPF on that interface and verify the routes are in the RED routing table.
R3
int f0/1
ip ospf 2 area 2

Check the routes in vrf RED

R3
R3#sh ip route vrf RED

Routing Table: RED


Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

Gateway of last resort is not set

6.0.0.0/32 is subnetted, 1 subnets


O 6.6.6.6 [110/11] via 192.168.2.6, 00:02:44, FastEthernet0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/1
R3#

Ok so we have come a long way now let’s review the current situation. We now have this setup

R1,R2,R3 form the MPLS Core and are running OSPF with all loopbacks running a /32 address and all have
full connectivity. R1 and R3 are peering with MP-BGP. LDP is enabled on all the internal interfaces. The
external interfaces of the MPLS core have been placed into a VRF called RED and then a site router has
been joined to that VRF on each side of the MPLS core – (These represent a small office)

The final step to get full connectivity across the MPLS core is to redistribute the routes in OSPF on R1
and R3 into MP-BGP and MP-BGP into OSPF, this is what we are going to do now.
We need to redistribute the OSPF routes from R4 into BGP in the VRF on R1, the OSPF routes from R6
into MP-BGP in the VRF on R3 and then the routes in MP-BGP in R1 and R3 back out to OSPF

Before we start lets do some verifications

Check the routes on R4

R4#sh ip route

4.0.0.0/32 is subnetted, 1 subnets


C 4.4.4.4 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0

As expected we have the local interface and the loopback address.

When we are done we want to see 6.6.6.6 in there so we can ping across the MPLS

Check the routes on R1


R1#sh ip route

1.0.0.0/32 is subnetted, 1 subnets


C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 10.0.0.2, 00:01:04, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/21] via 10.0.0.2, 00:00:54, FastEthernet0/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
O 10.0.1.0 [110/20] via 10.0.0.2, 00:00:54, FastEthernet0/0

Remember we have a VRF configured on this router so this command will show routes in the global
routing table (the MPLS Core) and it will not show the 192.168.1.0/24 route as that is in VRF RED – to see
that we run the following command

R1#sh ip route vrf RED

Routing Table: RED

4.0.0.0/32 is subnetted, 1 subnets


O 4.4.4.4 [110/11] via 192.168.1.4, 00:02:32, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/1

Here you can see Routing Table: RED is shown and the routes to R4 are now visible with 4.4.4.4 being in
OSPF.

So we need to do the following;

Redistribute OSPF into MP-BGP on R1


Redistribute MP-BGP into OSPF on R1
Redistribute OSPF into MP-BGP on R3
Redistribute MP-BGP into OSPF on R3
Redistribute OSPF into MP-BGP on R1

R1
router bgp 1
address-family ipv4 vrf RED
redistribute ospf 2

Redistribute OSPF into MP-BGP on R3

R3
router bgp 1
address-family ipv4 vrf RED
redistribute ospf 2

This has enabled redistribution of the OSPF routes into BGP. We can check the routes from R4 and R6
are now showing in the BGP table for their VRF with this command

sh ip bgp vpnv4 vrf RED

R1#sh ip bgp vpnv4 vrf RED


BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


Route Distinguisher: 4:4 (default for vrf RED)
*> 4.4.4.4/32 192.168.1.4 11 32768 ?
*>i6.6.6.6/32 3.3.3.3 11 100 0 ?
*> 192.168.1.0 0.0.0.0 0 32768 ?
*>i192.168.2.0 3.3.3.3 0 100 0 ?

Here we can see that 4.4.4.4 is now in the BGP table in VRF RED on R1 with a next hop of 192.168.1.4 (R4)
and also 6.6.6.6 is in there as well with a next hop of 3.3.3.3 (which is the loopback of R3 – showing that
it is going over the MPLS and R1 is not in the picture)

The same should be true on R3


R3#sh ip bgp vpnv4 vrf RED
BGP table version is 9, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


Route Distinguisher: 4:4 (default for vrf RED)
*>i4.4.4.4/32 1.1.1.1 11 100 0 ?
*> 6.6.6.6/32 192.168.2.6 11 32768 ?
*>i192.168.1.0 1.1.1.1 0 100 0 ?
*> 192.168.2.0 0.0.0.0 0 32768 ?

Which it is! 6.6.6.6 is now in the BGP table in VRF RED on R3 with a next hop of 192.168.2.6 (R6) and also
4.4.4 is in there as well with a next hop of 1.1.1.1 (which is the loopback of R1 – showing that it is going
over the MPLS and R2 is not in the picture)
The final step is to get the routes that have come across the MPLS back into OSPF and then we can get
end to end connectivity

R1

router ospf 2
redistribute bgp 1 subnets

R3

router ospf 2
redistribute bgp 1 subnets

If all has worked we should be now able to ping 6.6.6.6 from R4

Before we do let’s see what the routing table looks like on R4


R4#sh ip route

4.0.0.0/32 is subnetted, 1 subnets


C 4.4.4.4 is directly connected, Loopback0
6.0.0.0/32 is subnetted, 1 subnets
O IA 6.6.6.6 [110/21] via 192.168.1.1, 00:01:31, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O E2 192.168.2.0/24 [110/1] via 192.168.1.1, 00:01:31, FastEthernet0/0

Great we have 6.6.6.6 in there

Also check the routing table on R6

R6#sh ip route

4.0.0.0/32 is subnetted, 1 subnets


O IA 4.4.4.4 [110/21] via 192.168.2.1, 00:01:22, FastEthernet0/0
6.0.0.0/32 is subnetted, 1 subnets
C 6.6.6.6 is directly connected, Loopback0
O IA 192.168.1.0/24 [110/11] via 192.168.2.1,00:01:22,FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0

Brilliant we have 4.4.4.4 in there so we should be able to ping across the MPLS

R4#ping 6.6.6.6

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max= 40/48/52ms

Which we can – to prove this is going over the MPLS and be label switched and not routed, lets do a
trace
R4#trace 6.6.6.6

Type escape sequence to abort.


Tracing the route to 6.6.6.6

1 192.168.1.1 20 msec 8 msec 8 msec


2 10.0.0.2 [MPLS: Labels 17/20 Exp 0] 36 msec 40 msec 36 msec
3 192.168.2.1 [MPLS: Label 20 Exp 0] 16 msec 40 msec 16 msec
4 192.168.2.6 44 msec 40 msec 56 msec
R4#

More MPLS Configuration Resources

Want to learn more about MPLS? Check out these other great posts on MPLS configuration and
troubleshooting.

MPLS LDP Troubleshooting (https://www.rogerperkin.co.uk/ccie/mpls/mpls-ldp-troubleshooting/)


– This postscovers some basic MPLS LDP Troubleshooting commands and how to use them.
Route Distinguisher vs Route Target (https://www.rogerperkin.co.uk/ccie/mpls/route-
distinguisher-vs-route-target/) – This post covers the difference between the RD & RT values – and
no they are no the same thing!

In the next MPLS Tutorial I will add a second customer site into the mix and also go through some MPLS
Troubleshooting where I will go through turning off different features and trying to break the MPLS and
show you the logical steps to troubleshoot it.

If you have enjoyed this tutorial, please take a minute to enter your name and email below to be kept
up to date on new articles and upcoming training courses.
(https://www.rogerperkin.co.uk/wp-content/uploads/2020/06/ansible-training-course-for-network-
engineers-29.png)

Buy My Ansible Course for (https://www.rogerperkin.co.uk/network-


only £29 automation/ansible/course/)

Frequently asked quetions

What is MPLS network and how does it work?

Multiprotocol Label Switching (MPLS) is a way of routing traffic within a


telecommunications network that directs data from one node to the next based path labels rather than
long network addresses, It also allows the sharing of address space for clients as it is labels that are
being routed not prefixes.
Is MPLS a routing protocol?

No, MPLS is a method to route networks across a service provider network, routing protocols like OSPF
and BGP are used to make MPLS work. MPLS operates using BGP and typically uses OSPF to exchange
routes with the customer.
Why is MPLS used?

MPLS was designed to work in a multiple protocol environment. Today, MPLS is used to support metro-
Ethernet services & mobile communications back-haul it’s main benefit is the ability to have two clients
using the same address space and routing over the service provider network as they are routing using
labels and not prefixes.
Roger

 Share 𝕏 Share  Share


Category: MPLS (https://www.rogerperkin.co.uk/ccie/mpls/), CCIE Version 5
(https://www.rogerperkin.co.uk/ccie/ccie-version-5/)
Tag: MPLS Tutorial (https://www.rogerperkin.co.uk/tag/mpls-tutorial/)

(https://www.rogerperkin.co.uk/wp-content/uploads/2020/06/ansible-network-automation-course-
banner.png)

Get Access to my Ansible (https://learn-networking.teachable.com/p/ansible-for-


Course NOW network-engineers)

How to build CCIE V5 Lab with


CCIE RFC List for Routing & Switching Lab
Cisco Cloud Services Router CSR
Exam
1000V

(https://www.rogerperkin.co.uk/ccie/ccie-virtual-
Comments (https://www.rogerperkin.co.uk/ccie/rfc-list-ccie-
rack-csr-1000v-routers/) routing-switching/)
Habib

November 19, 2014 at 11:51 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-3429)
Hi Roger,
Very nice and self explanatory tutorial. But then what’s happen when you added two more routers.
Is it possible for you to write and explain further more. Thanks

Roger Perkin (https://www.rogerperkin.co.uk)

May 11, 2017 at 10:57 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


41637)
Habib,
The tutorial is complete now

Oussema

May 1, 2015 at 11:51 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


3433)
Hello Roger,

I am Oussema from Tunisia and I have found this tutorial very useful for me. Thanks for this post.
Would you mind send me the GNS3 config files for this lab please? I would be so grateful.

Regards,
Oussema

Roger Perkin (https://www.rogerperkin.co.uk)

July 29, 2017 at 8:34 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


47551)
Thank you Oussema, I will add the GNS3 files to the post soon
Roger

shawn

February 4, 2016 at 3:48 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-13075)
Thanks very much, you made this really simple and easy to understand.

Roger Perkin (https://www.rogerperkin.co.uk)

February 4, 2016 at 3:56 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-13119)
Glad it helped Shawn

shawn

February 4, 2016 at 3:55 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-13077)
awaiting the vrf’s configurations

Roger Perkin (https://www.rogerperkin.co.uk)

May 11, 2017 at 10:58 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


41639)
Shawn,

There was a delay in writing this post but it is complete now

rex

March 30, 2016 at 12:08 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-16417)
while adding last two routers in topology, i.e; R4 and R6, how to configure with the given ip?
how to configure R4 and R6? with the ip 192.168.1.0/24 and 192.168.2.0/24?
please help. thankyou

Roger Perkin (https://www.rogerperkin.co.uk)

May 11, 2017 at 10:59 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


41641)
Rex,

These are the subnets of the links – each router is configured with an address from that subnet

R4 f0/0 192.168.1.4
R6 f0/0 192.168.1.6

HTH

George

September 14, 2016 at 1:03 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-27001)
I have a question.

Is it necessary a Routing protocol between R1 and R2 to become LDP neighbours?


According to the theory, BGP runs over TCP same as LDP. Therefore, both should act in the same
way, or am I wrong?

Roger Perkin (https://www.rogerperkin.co.uk)

May 11, 2017 at 11:01 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


41643)
George,

You need the routing protocol to get the loopback addresses routable so you can peer MP-BGP
between R1 and R3
For R1 and R2 to become an LDP neighbor you don’t need a routing protocol but this is just a small
part of the picture.

You have to use a routing protocol for the loopbacks

ateet

March 6, 2017 at 3:17 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


37891)
Hello , i repeated the process for R6 but still i am not able to ping from r4 to r6 loopbacks

ateet

March 6, 2017 at 3:21 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-37893)
R3#sh ip route vrf RED
Routing Table: RED
6.0.0.0/32 is subnetted, 1 subnets
O 6.6.6.6 [110/2] via 192.168.2.5, 00:04:32, FastEthernet1/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0

how do i get 4.4.4.4 route on r3 vrf red ?


what am i missing ?

Roger Perkin (https://www.rogerperkin.co.uk)

May 11, 2017 at 11:02 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


41645)
Ateet,

I have updated the tutorial and it is now complete, please review the last steps again and let me
know if you get any issues

Chris

June 13, 2017 at 1:11 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


43461)
Just a note/Query, Shouldn’t the loopback address of R3 be a /32 so that may be why you cant
ping across. The initial config lists setting it with a 255.255.255.0 mask but should be
255.255.255.255 as below instead ?
R3
hostname R3
int lo0
ip add 3.3.3.3 255.255.255.255

Roger Perkin (https://www.rogerperkin.co.uk)

June 30, 2017 at 2:12 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-45079)
Thank you Chris, you are correct, the loopbacks should all be /32 🙂
I have updated the post
Roger

kamogelo

July 4, 2017 at 1:19 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


45437)
Hi roger
thanks this was great explanation.

regards
kamogelo

Michael Snee

July 25, 2017 at 5:47 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


46965)
HI Roger,

You spoke of additional information such as


In the next MPLS Tutorial I will add a second customer site into the mix and also go through some
MPLS Troubleshooting where I will go through turning off different features and trying to break the
MPLS and show you the logical steps to troubleshoot it. Im interested in the troubleshooting,
where can I find this?

Thank you
BTW the tutorial was great, a lot to take in, but I loved that you went from start to finish.

Roger Perkin (https://www.rogerperkin.co.uk)

July 29, 2017 at 8:31 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


47549)
Thank You Michael,

I am glad you enjoyed the tutorial, I will be putting up a video of the entire process soon and then
as promised the second video, but I have just changed jobs so it might be a few weeks.

Michael

August 1, 2017 at 5:48 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-47811)
thanks

mohammed

September 18, 2017 at 10:00 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-50191)
Excellent work…it was very useful and self explanatory…thanks

Lawrence Neo

January 10, 2018 at 2:07 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-53671)
hi there, excellent lab, not sure why i cannot type in small caps in this comment box.
I spotted a minor error in the diagram after the sentence
“Ok so we have come a long way now let’s review the current situation. We now have this setup

In the diagram, R3 F0/1 interface is shown as 192.168.2.3 but in your lab configuration, it is 192.168.2.1.

Roger Perkin (https://www.rogerperkin.co.uk)

January 10, 2018 at 8:55 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-53691)
Hi Lawrence,

Thanks config updated

Sunil Soni

January 25, 2018 at 12:24 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-54027)
Great JOB!!!

steph

July 23, 2018 at 9:18 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


76141)
excellent tutorial for those who want to start playing with MPLS !
simple, easy to replay and very didactic…
One idea would be to reuse that lab to implement some IP Multicast stuff 🙂
Stephane

Hafiz Atta Ul Mustafa

October 16, 2018 at 6:39 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-132419)
Excellent tutorial. I have PRACTISED and verified all steps in GNS3.

dima
October 17, 2018 at 6:17 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-
tutorial/#comment-133215)
simply amazing – end-to-end mpls configuration!
thanks roger.

Trony Tigno

January 19, 2019 at 2:02 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-146739)
Thank you soo much!!! This lab was very to follow.

Roger Perkin (https://www.rogerperkin.co.uk)

January 25, 2019 at 10:21 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-147845)
Glad it helped!

Marcin Czech

January 29, 2019 at 8:53 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-148557)
Great tutorial!. Good job :).

Roger Perkin (https://www.rogerperkin.co.uk)

January 29, 2019 at 11:07 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-148567)
Glad it helped!

John Biederstedt (http://johnsblog.net/)

February 5, 2019 at 7:27 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-150237)
Really good tutorial – made the distinction and interaction between MPLS, VRFs, and BGP very
easy to see in action.

Roger Perkin (https://www.rogerperkin.co.uk)

February 5, 2019 at 7:34 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-150239)
Thanks John, glad it helped!

walter Steijger

February 22, 2019 at 1:28 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-154165)
Nice tutorial, well explained.
This one really helped me understanding a few things about mpls and route advertisements in
vRF’s.

Roger Perkin (https://www.rogerperkin.co.uk)

February 28, 2019 at 9:51 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-155517)
Thanks Walter, glad it helped

Manny Sherbiny

March 4, 2019 at 8:08 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-156333)
Great Post! thanks

Roger Perkin (https://www.rogerperkin.co.uk)

March 4, 2019 at 9:49 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-156495)
No problem Manny, I am glad it helped your understanding of a simple MPLS Configuration
mooms

April 6, 2019 at 11:42 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


165071)
Thanks very much, I am just re-learning my way around MPLS so this was a great refresh. I got
caught out on GNS3 playing games with me and dropping the LDP config in OSFP so it all looked
good except in the core. I am just going to expand out now to BGP but thanks for taking the time
to document this so well.

shahzad agha

April 11, 2019 at 11:45 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


166807)
Nice article, helpful which covers three topic at once MPLS / MPBGP & VRF great 🙂

Bob z

April 18, 2019 at 6:24 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-tutorial/#comment-


169185)
Toward tHE VERY END, YOU DO THIS ‘SHOW’ ON R1 AND R3

R1#SH IP BGP VPNV4 VRF RED


R3#sh ip bgp vpnv4 vrf RED

BOTH HAVE A COMMENT THAT READS: (which is the loopback of R1/r3 – showing that it is going
over the MPLS and R1 is not in the picture)

SHOULDN’T THAT READ …”AND R2 IS NOT IN THE PICTURE” ???


IT DOESN’T MAKE SENSE THAT both lines WOULD read ” R1 IS NOT IN THE Picture.”

also this is in all caps for some reason, not my choice, lol.

Roger Perkin (https://www.rogerperkin.co.uk)

April 18, 2019 at 11:08 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-169229)
You are correct! thanks I have updated the post
Thanks

ABDELHAMID MEHDI

August 10, 2019 at 3:38 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-196971)
THANK YOU SO MUCH SIR FOR THIS AMAZING DOCUMENTATION YOU’VE HELPED ME IN MY
THESIS THANK YOU SO MUCH !

Santosh K (https://netbooz.blogspot.com)

October 8, 2019 at 6:25 am (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-209313)
simple and very easy to understandable.
Thank you for this post !!!

Roger Perkin (https://www.rogerperkin.co.uk)

October 9, 2019 at 11:25 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-209613)
Great, glad it helped

leandro

October 13, 2019 at 6:36 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-209941)
Hi man, congratulations for your explanation.
I would like to know what is the “session manager”, that you use to configure devices.
How can i use session manager to configure devices in the gns3?

Roger Perkin (https://www.rogerperkin.co.uk)

October 14, 2019 at 11:00 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-209993)
It’s securcrt – https://www.vandyke.com/products/securecrt/ (https://www.vandyke.com/product
s/securecrt/) The only SSH client I use!
Andrew Boyd

October 16, 2019 at 5:03 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-210053)
Nice work!!!

Roger Perkin (https://www.rogerperkin.co.uk)

October 27, 2019 at 8:48 pm (https://www.rogerperkin.co.uk/ccie/mpls/cisco-mpls-


tutorial/#comment-210427)
No problem Andrew, glad it helped

Let’s get started

Take a look at my premium courses on Ansible, Nornir & Git or buy them all with the Network
Automation Bundle!

Network Automation (https://www.rogerperkin.co.uk/network-automation-


Courses courses/)

Navigation

Home (https://www.rogerperkin.co.uk/)

Blog (https://www.rogerperkin.co.uk/blog/)

About (https://www.rogerperkin.co.uk/about/)

C (https://www.rogerperkin.co.uk/contact/)

Python VENV Tutorial (https://www.rogerperkin.co.uk/network-automation/python/virtualenv-


tutorial/)
Python for Network Engineers (https://www.rogerperkin.co.uk/network-automation/python/scripts-
for-network-engineers/)

Network Automation (https://www.rogerperkin.co.uk/network-automation/)


Network Automation Courses (https://www.rogerperkin.co.uk/network-automation-courses/)
Network Discovery Tools (https://www.rogerperkin.co.uk/network-discovery-tools/)
Network Automation Conferences (https://www.rogerperkin.co.uk/network-automation/network-
automation-conference/)
Ansible Training (https://www.rogerperkin.co.uk/ansible-training/)
Devops Tutorial (https://www.rogerperkin.co.uk/devops-tutorial/)
Network Source of Truth (https://www.rogerperkin.co.uk/network-source-of-truth/)
DevOps Glossary (https://www.rogerperkin.co.uk/devops-glossary/)
Network Monitoring Software (https://www.rogerperkin.co.uk/network-monitoring-software/)
Contact

Contact (https://www.rogerperkin.co.uk/contact/)

Get in touch with me here

hello@rogerperkin.co.uk (mailto:hello@rogerperkin.co.uk)

(https://twitter.com/rogernperkin)
(https://www.linkedin.com/in/rogerperkin/)
(https://www.youtube.com/rogerperkin?sub_confirmation=1)
Buy me a coffee(https://www.buymeacoffee.com/HsS3gIUFu)

Copyright © 2024 · Roger Perkin (https://www.rogerperkin.co.uk) · All Rights Reserved · Privacy Policy
(https://www.rogerperkin.co.uk/privacy-policy/)– Terms (https://www.rogerperkin.co.uk/terms-of-
service/)

You might also like