In the first article, we went over some very basic MPLS terms and explanations. That article ended with a basic network using four 7206 routers – two in each datacenter. At this point, we have no routing protocols or MPLS configuration. All we can do presently is ping directly connected interfaces of neighboring devices. The first thing that we want to establish, is the routing protocol used by the MPLS aware devices to determine how to reach the other core devices.
The routing protocol distributes topology information through the network so that the route of a Label Switched Path (LSP) can be calculated. An interior gateway protocol, such as OSPF or IS-IS, is normally used, as MPLS networks typically cover a single administrative domain. Let’s configure OSPF on the P/Core devices so that we can ping every interface on all four routers.
hostname r1 ! interface Loopback1 ip address 10.254.1.1 255.255.255.255 ! interface FastEthernet1/0 description r2 f1/0 ip address 10.1.1.1 255.255.255.252 ! interface FastEthernet1/1 description r3 f1/1 ip address 10.1.1.5 255.255.255.252 ! router ospf 1 log-adjacency-changes network 10.1.1.0 0.0.0.3 area 0 network 10.1.1.4 0.0.0.3 area 0 network 10.254.1.1 0.0.0.0 area 0
hostname r2 ! interface Loopback1 ip address 10.254.1.2 255.255.255.255 ! interface FastEthernet1/0 description r1 f1/0 ip address 10.1.1.2 255.255.255.252 ! interface FastEthernet1/1 description r4 f1/1 ip address 10.1.1.13 255.255.255.252 ! router ospf 1 log-adjacency-changes network 10.1.1.0 0.0.0.3 area 0 network 10.1.1.12 0.0.0.3 area 0 network 10.254.1.2 0.0.0.0 area 0
hostname r3 ! interface Loopback1 ip address 10.254.1.3 255.255.255.255 ! interface FastEthernet1/0 description r4 f1/0 ip address 10.1.1.9 255.255.255.252 ! interface FastEthernet1/1 description r1 f1/1 ip address 10.1.1.6 255.255.255.252 ! router ospf 1 log-adjacency-changes network 10.1.1.4 0.0.0.3 area 0 network 10.1.1.8 0.0.0.3 area 0 network 10.254.1.3 0.0.0.0 area 0
hostname r4 ! interface Loopback1 ip address 10.254.1.4 255.255.255.255 ! interface FastEthernet1/0 description r3 f1/0 ip address 10.1.1.10 255.255.255.252 ! interface FastEthernet1/1 description r2 f1/1 ip address 10.1.1.14 255.255.255.252 ! router ospf 1 log-adjacency-changes network 10.1.1.8 0.0.0.3 area 0 network 10.1.1.12 0.0.0.3 area 0 network 10.254.1.4 0.0.0.0 area 0
A quick way to determine if all your interfaces are in OSPF and each assigned area is to issue the following command:
r1#show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo1 1 0 10.254.1.1/32 1 LOOP 0/0 Fa1/1 1 0 10.1.1.5/30 1 BDR 1/1 Fa1/0 1 0 10.1.1.1/30 1 BDR 1/1 r1#
Here is the output of the same command ran on the other three routers, just so you can double check your work and make sure we are in sync:
r2#show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo1 1 0 10.254.1.2/32 1 LOOP 0/0 Fa1/1 1 0 10.1.1.13/30 1 BDR 1/1 Fa1/0 1 0 10.1.1.2/30 1 DR 1/1 r2# r3#show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo1 1 0 10.254.1.3/32 1 LOOP 0/0 Fa1/0 1 0 10.1.1.9/30 1 BDR 1/1 Fa1/1 1 0 10.1.1.6/30 1 DR 1/1 r3# r4#show ip ospf interface brief Interface PID Area IP Address/Mask Cost State Nbrs F/C Lo1 1 0 10.254.1.4/32 1 LOOP 0/0 Fa1/1 1 0 10.1.1.14/30 1 DR 1/1 Fa1/0 1 0 10.1.1.10/30 1 DR 1/1 r4#
Once all the interfaces are configured correctly in OSPF, the routing tables will have the reach-ability to all interfaces on all routers. At this stage, let’s verify what the routing tables should look like on all four routers.
r1#show ip route
Codes: L - local, 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, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
C 10.1.1.0/30 is directly connected, FastEthernet1/0
L 10.1.1.1/32 is directly connected, FastEthernet1/0
C 10.1.1.4/30 is directly connected, FastEthernet1/1
L 10.1.1.5/32 is directly connected, FastEthernet1/1
O 10.1.1.8/30 [110/2] via 10.1.1.6, 00:48:55, FastEthernet1/1
O 10.1.1.12/30 [110/2] via 10.1.1.2, 00:49:05, FastEthernet1/0
C 10.254.1.1/32 is directly connected, Loopback1
O 10.254.1.2/32 [110/2] via 10.1.1.2, 00:49:05, FastEthernet1/0
O 10.254.1.3/32 [110/2] via 10.1.1.6, 00:48:55, FastEthernet1/1
O 10.254.1.4/32 [110/3] via 10.1.1.6, 00:48:55, FastEthernet1/1
[110/3] via 10.1.1.2, 00:49:05, FastEthernet1/0
r1#
r2#show ip route
Codes: L - local, 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, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
C 10.1.1.0/30 is directly connected, FastEthernet1/0
L 10.1.1.2/32 is directly connected, FastEthernet1/0
O 10.1.1.4/30 [110/2] via 10.1.1.1, 00:49:28, FastEthernet1/0
O 10.1.1.8/30 [110/2] via 10.1.1.14, 00:49:38, FastEthernet1/1
C 10.1.1.12/30 is directly connected, FastEthernet1/1
L 10.1.1.13/32 is directly connected, FastEthernet1/1
O 10.254.1.1/32 [110/2] via 10.1.1.1, 00:49:38, FastEthernet1/0
C 10.254.1.2/32 is directly connected, Loopback1
O 10.254.1.3/32 [110/3] via 10.1.1.14, 00:49:28, FastEthernet1/1
[110/3] via 10.1.1.1, 00:49:28, FastEthernet1/0
O 10.254.1.4/32 [110/2] via 10.1.1.14, 00:49:38, FastEthernet1/1
r2#
r3#show ip route
Codes: L - local, 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, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O 10.1.1.0/30 [110/2] via 10.1.1.5, 00:49:53, FastEthernet1/1
C 10.1.1.4/30 is directly connected, FastEthernet1/1
L 10.1.1.6/32 is directly connected, FastEthernet1/1
C 10.1.1.8/30 is directly connected, FastEthernet1/0
L 10.1.1.9/32 is directly connected, FastEthernet1/0
O 10.1.1.12/30 [110/2] via 10.1.1.10, 00:49:53, FastEthernet1/0
O 10.254.1.1/32 [110/2] via 10.1.1.5, 00:49:53, FastEthernet1/1
O 10.254.1.2/32 [110/3] via 10.1.1.10, 00:49:53, FastEthernet1/0
[110/3] via 10.1.1.5, 00:49:53, FastEthernet1/1
C 10.254.1.3/32 is directly connected, Loopback1
O 10.254.1.4/32 [110/2] via 10.1.1.10, 00:49:53, FastEthernet1/0
r3#
r4#show ip route
Codes: L - local, 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, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O 10.1.1.0/30 [110/2] via 10.1.1.13, 00:50:29, FastEthernet1/1
O 10.1.1.4/30 [110/2] via 10.1.1.9, 00:50:19, FastEthernet1/0
C 10.1.1.8/30 is directly connected, FastEthernet1/0
L 10.1.1.10/32 is directly connected, FastEthernet1/0
C 10.1.1.12/30 is directly connected, FastEthernet1/1
L 10.1.1.14/32 is directly connected, FastEthernet1/1
O 10.254.1.1/32 [110/3] via 10.1.1.13, 00:50:19, FastEthernet1/1
[110/3] via 10.1.1.9, 00:50:19, FastEthernet1/0
O 10.254.1.2/32 [110/2] via 10.1.1.13, 00:50:29, FastEthernet1/1
O 10.254.1.3/32 [110/2] via 10.1.1.9, 00:50:19, FastEthernet1/0
C 10.254.1.4/32 is directly connected, Loopback1
r4#
At this point, pinging any interface from any router should be successful. The next step is to configure MPLS on the physical interfaces of each device. There are a couple of things that are needed in order to do this. First, ip cef needs to be running; which is a global configuration command. Second, mpls ip needs to be configured on each physical interface. Here is what the configuration will look like:
! hostname r1 ! ip cef ! interface FastEthernet1/0 description r2 f1/0 ip address 10.1.1.1 255.255.255.252 mpls ip ! interface FastEthernet1/1 description r3 f1/1 ip address 10.1.1.5 255.255.255.252 mpls ip
! hostname r2 ! ip cef ! interface FastEthernet1/0 description r1 f1/0 ip address 10.1.1.2 255.255.255.252 mpls ip ! interface FastEthernet1/1 description r4 f1/1 ip address 10.1.1.13 255.255.255.252 mpls ip
! hostname r3 ! ip cef ! interface FastEthernet1/0 description r4 f1/0 ip address 10.1.1.9 255.255.255.252 mpls ip ! interface FastEthernet1/1 description r1 f1/1 ip address 10.1.1.6 255.255.255.252 mpls ip
! hostname r4 ! ip cef ! interface FastEthernet1/0 description r3 f1/0 ip address 10.1.1.10 255.255.255.252 mpls ip ! interface FastEthernet1/1 description r2 f1/1 ip address 10.1.1.14 255.255.255.252 mpls ip
Once you start getting mpls configured on each device, console messages will appear alerting that LDP neighbors have been established.
r1# *Jun 7 10:05:02.335: %LDP-5-NBRCHG: LDP Neighbor 10.254.1.2:0 (2) is UP *Jun 7 10:03:17.791: %LDP-5-NBRCHG: LDP Neighbor 10.254.1.3:0 (1) is UP
Next thing you want to verify is that you have discovered your directly connect neighbors. Each router will have two neighbors, since they have two direct connections to other routers. On any of the routers, we will issue the command: show mpls ldp discovery. This is to verify we are communicating via the LDP protocol to our connected neighbors.
r4(config-router)#do show mpls ldp discovery
Local LDP Identifier:
10.254.1.4:0
Discovery Sources:
Interfaces:
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.254.1.3:0
FastEthernet1/1 (ldp): xmit/recv
LDP Id: 10.254.1.2:0
r4(config-router)#end
From the previous example, we examine the output of r4 to determine a few things:
– Our local LDP identifier is 10.254.1.4, this is because we have a loopback configured and LDP will use that first by default as it’s ID.
– We have ldp communications via our local interface FastEthernet1/0 from r3
– We have ldp communications via our local interface FastEthernet1/1 from r2
With everything looking good thus far, I would expect to have formed two neighbor relationships. We can verify our neighbors by issuing the following command: show mpls ldp neighbor
r4#show mpls ldp neighbor
Peer LDP Ident: 10.254.1.2:0; Local LDP Ident 10.254.1.4:0
TCP connection: 10.254.1.2.646 - 10.254.1.4.26889
State: Oper; Msgs sent/rcvd: 11/11; Downstream
Up time: 00:00:53
LDP discovery sources:
FastEthernet1/1, Src IP addr: 10.1.1.13
Addresses bound to peer LDP Ident:
10.1.1.2 10.254.1.2 10.1.1.13
Peer LDP Ident: 10.254.1.3:0; Local LDP Ident 10.254.1.4:0
TCP connection: 10.254.1.3.646 - 10.254.1.4.17695
State: Oper; Msgs sent/rcvd: 11/12; Downstream
Up time: 00:00:53
LDP discovery sources:
FastEthernet1/0, Src IP addr: 10.1.1.9
Addresses bound to peer LDP Ident:
10.1.1.9 10.254.1.3 10.1.1.6
r4#
Ok, let’s stop for a second – so that I can explain something you might run into when building an MPLS network. Let’s say you expected to see a MPLS neighbor after everything was configured, but when you issued the show mpls ldp neighbor command, the expected neighbor wasn’t there. So, you go back and issue the command: show mpls ldp discovery all to verify local LDP communications and the output looked something like this:
r3#show mpls ldp discovery all
Local LDP Identifier:
10.254.1.3:0
Discovery Sources:
Interfaces:
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.254.1.4:0; no route
FastEthernet1/1 (ldp): xmit/recv
LDP Id: 10.254.1.1:0
In this previous example, the neighbor that is not being established is the one directly connected to FastEthernet1/0. As you can see from the output, we are sending and receiving LDP messages; but no neighbor relationship. The LDP Id of the neighbor we want to establish is 10.254.1.4, we can’t establish it because of the following:
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 10.254.1.4:0; no route
The output shows we have no route to 10.254.1.4. In this case, the reason we don’t have a route to it is because our underlying interior routing protocol was not configured properly. An LDP neighbor can’t be established if it doesn’t have a route to the IP address used for the LDP ID. So, if the LDP ID was the IP address of the locally connected interface – there wouldn’t be a problem, since we would have a route to it. I mention this so that you can watch out for underlying routing issues when trying to establish LDP neighbor relationships.
The last thing we want to do here is a verbose traceroute to actually see the MPLS tags used in the path. For this example, we will issue a traceroute from R4 in our configured network:
r4#traceroute
Protocol [ip]:
Target IP address: 10.254.1.1
Source address: 10.254.1.4
Numeric display [n]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]: V
Loose, Strict, Record, Timestamp, Verbose[V]:
Type escape sequence to abort.
Tracing the route to 10.254.1.1
1 10.1.1.9 [MPLS: Label 18 Exp 0] 392 msec
10.1.1.13 [MPLS: Label 18 Exp 0] 396 msec
10.1.1.9 [MPLS: Label 18 Exp 0] 508 msec
2 10.1.1.1 156 msec
10.1.1.5 232 msec
10.1.1.1 240 msec
r4#
OK, what did we discover? First let’s look at the traceroute issued, which was to the opposite corner of the network. Just by looking at the drawing, we can tell the traceroute has to go through one of two devices (r2 or r3) in order to get to it’s destination (r1). We are going to issue an extended traceroute to R1′s loopback address using our loopback (of r4) as the source. As you can see from the output of the traceroute, label id 18 was assigned to our traceroute packet before it was switched to the destination.
How are we doing so far? Let’s take a break and pick it up in the third article in this series, where we will add the PE (Provider Edge) devices and begin talking about VRF’s. If you have any questions or comments please leave them in the comment section below and I will answer asap.


(4 votes, average: 4.00 out of 5)
Print This Post







July 1st, 2010 at 6:23 pm
Do you have the third post in this series?? I have been following it so far and it has been very good.
Thank you!
July 1st, 2010 at 9:22 pm
I’m actually working on it now, I hope to be finished up with it no later than the weekend. Thanks for asking!
Scott
July 2nd, 2010 at 9:13 am
Sounds good! Thanks Scott!
July 19th, 2010 at 1:58 am
Hi!
I’m also looking forward for the third post of the series. You explain very good the configuration of mpls. Thanky you very much,
Paul from Hungary
July 28th, 2010 at 5:08 pm
I have configured a simple MPLS network ..i got 3 router with ISP router and im using EIGRP in between ISP and i got 2 router with customer end used BGP to connect ISP network …when i am trying to trace route from cstomeer end MPLS label getting exited from the middle router which is in the ISP network …i am getting only one route with mpls labet ..wht could be the problem ? pls help