Wednesday, 9 October 2013

The Troubleshooting of MPLS LDP

This post will go through from start to finish the configuration required to setup a basic MPLS VPN which has 2 customers, each customer has 2 sites. The configuration is all done in GNS3. The topology I will be using is below.




This MPLS tutorial will cover OSPF, LDP, MP-BGP and route redistribution.
The MPLS Core is made up of P1-P4, the Provider Edge routers are PE1 & PE2.

Step 1 is to configure the IP addresses on all devices, a prerequisite for MPLS is to have a /32 loopback address on all devices. Once all the devices has been configured as per the diagram above you need to enable OSPF.


Enable OSPF

The quickest way to enable ospf on all interfaces is to go to each interface on each router and apply the config ip ospf 1 area 0. As each device has 4 interfaces I simply applied the following text to each device
conf t
int f0/0
ip ospf 1 area 0
int f0/1
ip ospf 1 area 0
int f1/0
ip ospf 1 area 0
int f2/0
ip ospf 1 area 0
int lo0
ip ospf area 0
A quick check on a few devices just to verify OSPF is up and running
P1#sh ip ospf neigh
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.10.29        1   FULL/DR         00:00:37    10.0.10.26      FastEthernet2/0
10.0.0.4          1   FULL/DR         00:00:31    10.0.10.18      FastEthernet1/0
10.0.0.2          1   FULL/DR         00:00:39    10.0.10.10      FastEthernet0/1
10.0.0.3          1   FULL/DR         00:00:36    10.0.10.2       FastEthernet0/0
P1#
P4#sh ip ospf neigh
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.5          1   FULL/BDR        00:00:33    10.0.10.38      FastEthernet2/0
10.0.0.1          1   FULL/BDR        00:00:38    10.0.10.17      FastEthernet1/0
10.0.0.3          1   FULL/BDR        00:00:33    10.0.10.13      FastEthernet0/1
10.0.0.2          1   FULL/BDR        00:00:33    10.0.10.5       FastEthernet0/0
P4#
We can assume that OSPF is fully configured across all devices and we have full reachability to all addresses. The next step is to enable MPLS. Enabling MPLS is actually a very simple configuration task. You just apply the command mpls ip to any interface you want to run MPLS on.
For this topology on P1-P4 all interfaces need to have mpls enabled.
Apply this config to P1,P2,P3,P4
conf t
int f0/0
mpls ip
int f0/1
mpls ip
int f1/0
mpls ip
int f2/0
mpls ip
Once this has applied you can verify which interfaces are running mpls with the command sh mpls interfaces
P4#sh mpls interfaces
Interface              IP            Tunnel   Operational
FastEthernet0/0        Yes (ldp)     No       Yes
FastEthernet0/1        Yes (ldp)     No       Yes
FastEthernet1/0        Yes (ldp)     No       Yes
FastEthernet2/0        Yes (ldp)     No       Yes
From here you can see that all interfaces on P4 are running MPLS and are using LDP as the label distribution protocol. Once you have configured MPLS on all the other P devices you can see the mpls neighbors come up.
*Mar  1 00:25:48.455: %LDP-5-NBRCHG: LDP Neighbor 10.0.0.3:0 (1) is UP
*Mar  1 00:25:48.463: %LDP-5-NBRCHG: LDP Neighbor 10.0.0.4:0 (2) is UP
You can now verify all the the ldp adjacencies with sh mpls ldp neighbor
P2#sh mpls ldp neigh
Peer LDP Ident: 10.0.0.3:0; Local LDP Ident 10.0.0.2:0
TCP connection: 10.0.0.3.46880 – 10.0.0.2.646
State: Oper; Msgs sent/rcvd: 19/19; Downstream
Up time: 00:02:24
LDP discovery sources:
FastEthernet1/0, Src IP addr: 10.0.10.22
Addresses bound to peer LDP Ident:
10.0.10.2       10.0.10.13      10.0.10.22      10.0.10.33
10.0.0.3
Peer LDP Ident: 10.0.0.4:0; Local LDP Ident 10.0.0.2:0
TCP connection: 10.0.0.4.21919 – 10.0.0.2.646
State: Oper; Msgs sent/rcvd: 19/19; Downstream
Up time: 00:02:24
LDP discovery sources:
FastEthernet0/0, Src IP addr: 10.0.10.6
Addresses bound to peer LDP Ident:
10.0.10.6       10.0.10.14      10.0.10.18      10.0.10.37
10.0.0.4
You now need to configure MPLS on the two interfaces facing the MPLS Core on PE1 and PE2. Do not configure MPLS on the customer facing interfaces.

 Configure VRF

The next step is to configure the VRF’s on the Provider Edge routers. You need to assign each VRF a route distinguisher and a route target – if you are unsure about the difference between a RD and RT check out my post – route distinguisher vs route target
For this tutorial I am going to use VRF A and VRF B and the the value of 64512:1 for Site A and 64512:2 for Site B. I will use the value 1:1 for route-target for site A and 2:2 for route-target for site

B
PE1(config)#ip vrf A
PE1(config-vrf)#rd 64512:1
PE1(config-vrf)#route-target both 1:1
PE1(config-vrf)#exit
PE1(config)#ip vrf B
PE1(config-vrf)#rd 64512:2
PE1(config-vrf)#route-target 2:2
PE2(config)#ip vrf A
PE2(config-vrf)#rd 64512:1
PE2(config-vrf)#route-target both 1:1
PE2(config-vrf)#exit
PE2(config)#ip vrf B
PE2(config-vrf)#rd 64512:2
PE2(config-vrf)#route-target 2:2



0 comments:

Post a Comment