0% found this document useful (0 votes)
65 views18 pages

MPLS LDP Configuration Guide

The document describes configuration and investigation of LDP on a router. It includes typical LDP configuration commands, show commands to check LDP discovery and neighbors, and show commands to check label bindings and MPLS forwarding.

Uploaded by

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

MPLS LDP Configuration Guide

The document describes configuration and investigation of LDP on a router. It includes typical LDP configuration commands, show commands to check LDP discovery and neighbors, and show commands to check label bindings and MPLS forwarding.

Uploaded by

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

R1

RP/0/0/CPU0:ios#show run
Thu Jul 15 08:34:04.667 UTC
Building configuration...
!! IOS XR Configuration 6.1.3
!! Last configuration change at Thu Jul 15 08:30:58 2021 by naja
!
interface Loopback0

ipv4 address 1.1.1.1 255.255.255.255

!
interface MgmtEth0/0/CPU0/0
shutdown
!

interface GigabitEthernet0/0/0/0

shutdown
!
interface GigabitEthernet0/0/0/1
ipv4 address 192.168.12.1 255.255.255.252
!

interface GigabitEthernet0/0/0/2

shutdown
!
interface GigabitEthernet0/0/0/3
shutdown
!

interface GigabitEthernet0/0/0/4
ipv4 address 192.168.13.1 255.255.255.252
!
interface GigabitEthernet0/0/0/5
shutdown
!
interface GigabitEthernet0/0/0/6
shutdown
!
router ospf 1
router-id 1.1.1.1
area 0
interface Loopback0
!
interface GigabitEthernet0/0/0/1
!
interface GigabitEthernet0/0/0/4
!
!
!
mpls ldp
router-id 1.1.1.1
interface GigabitEthernet0/0/0/1
!
interface GigabitEthernet0/0/0/4
!
!
end
R1 (LDP Config commands) R2 R3
mpls ldp IP/IGP yes, no ldp IP/IGP yes, no ldp
router-id 1.1.1.1
interface GigabitEthernet0/0/0/1
!
interface GigabitEthernet0/0/0/4
!

The above are the typical LDP config


commands in XOR for non-targetted LDP.
Typical Structure; Router ID and the
IFs are basic "variables"
we know do basic investigation regarding LDP discovery and peering (neighbou
Investigation on R1 (no LDP on R2 and r3)
RP/0/0/CPU0:ios#show mpls ldp discovery
Thu Jul 15 08:37:46.042 UTC

Local LDP Identifier: 1.1.1.1:0


Discovery Sources:
Interfaces:

GigabitEthernet0/0/0/1 : xmit

VRF: 'default' (0x60000000)

GigabitEthernet0/0/0/4 : xmit

VRF: 'default' (0x60000000)

RP/0/0/CPU0:ios#show mpls ldp neighbor


Thu Jul 15 08:37:53.062 UTC

Lets configure LDP on R2 also and re-investigate the same commands again

R1
RP/0/0/CPU0:ios#show mpls ldp discovery
Thu Jul 15 08:44:27.215 UTC

Local LDP Identifier: 1.1.1.1:0

Discovery Sources:
Interfaces:
GigabitEthernet0/0/0/1 : xmit/recv
VRF: 'default' (0x60000000)
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
Hold time: 15 sec (local:15 sec, peer:15 sec)
Established: Jul 15 08:44:23.695 (00:00:03 ago)

GigabitEthernet0/0/0/4 : xmit
VRF: 'default' (0x60000000)

RP/0/0/CPU0:ios#show mpls ldp neighbor


Thu Jul 15 08:45:18.151 UTC

Peer LDP Identifier: 2.2.2.2:0


TCP connection: 2.2.2.2:64741 - 1.1.1.1:646
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 9/9; Downstream-Unsolicited
Up time: 00:00:55
LDP Discovery Sources:
IPv4: (1)
GigabitEthernet0/0/0/1
IPv6: (0)
Addresses bound to this peer:
IPv4: (3)
2.2.2.2 192.168.12.2 192.168.23.1
IPv6: (0)

RP/0/0/CPU0:ios#
vestigation regarding LDP discovery and peering (neighbours)
Comments

local LDP IP (understood)

IF with LDP enabled. Currenttly only TX since there is no Peer on other end

IF with LDP enabled. Currenttly only TX since there is no Peer on other end

No neighbour since no LDP conf on Peers

LDP on R2 also and re-investigate the same commands again

Comments

Now both TX and RX since R2 is an LDP peer now

LDP ID of remote peer i.e. R2

Still TX only as R3 has no LDP Config

Details of neighbour which is R2

Correct, the peer has LDP id 2.2.2.2


TCP Connection details
LDP peer is dicovered thru R1's own IF shown

IPv4 interfaces configured on the R2


basic investigation about label to prefix mapping and propagati

We investigate below the LDP bindings,


Below are routes in routing table on R1

L 1.1.1.1/32 is directly connected, 00:32:25, Loopback0

O 2.2.2.2/32 [110/2] via 192.168.12.2, 00:28:07, GigabitEthernet0/0/0/1

O 3.3.3.3/32 [110/2] via 192.168.13.2, 00:29:04, GigabitEthernet0/0/0/4

C 192.168.12.0/30 is directly connected, 00:32:25, GigabitEthernet0/0/0/1


L 192.168.12.1/32 is directly connected, 00:32:25, GigabitEthernet0/0/0/1
C 192.168.13.0/30 is directly connected, 00:32:25, GigabitEthernet0/0/0/4
L 192.168.13.1/32 is directly connected, 00:32:25, GigabitEthernet0/0/0/4
O 192.168.23.0/30 [110/2] via 192.168.12.2, 00:31:40, GigabitEthernet0/0/0/1
[110/2] via 192.168.13.2, 00:31:40, GigabitEthernet0/0/0/4

Rest of the entries have the same logic and will not be repeated here
l to prefix mapping and propagation to peers

here are the labels on R1 Comments


RP/0/0/CPU0:ios#show mpls ldp bin
Thu Jul 15 08:57:22.882 UTC

for the entry 1.1.1.1/32 in R1


1.1.1.1/32, rev 2 table

local label is ImpNull since this


Local binding: label: ImpNull prefix is directly connected to R1
Remote bindings: (1 peers)
Peer Label
----------------- ---------
R2 know this prefix via OSPF and
and assigned label 24002 and sent
2.2.2.2:0 24002 it to R1
for the entry 2.2.2.2/32 in R1
2.2.2.2/32, rev 12 table
Local binding: label: 24002 R1 assigned label 24002
Remote bindings: (1 peers)
Peer Label
----------------- ---------
Peer (R2) assigned ImpNull since
this prefix is directly connected
2.2.2.2:0 ImpNull to R2
for the entry 3.3.3.3/32 in R1
3.3.3.3/32, rev 11 table
Local binding: label: 24001 R1 assigned label 24001
Remote bindings: (1 peers)
Peer Label
----------------- ---------
R2 know this prefix via OSPF and
and assigned label 24001 and sent
2.2.2.2:0 24001 it to R1
192.168.12.0/30, rev 4
Local binding: label: ImpNull
Remote bindings: (1 peers)
Peer Label
----------------- ---------
2.2.2.2:0 ImpNull
192.168.13.0/30, rev 6
Local binding: label: ImpNull
Remote bindings: (1 peers)
Peer Label
----------------- ---------
2.2.2.2:0 24000
192.168.23.0/30, rev 10
Local binding: label: 24000
Remote bindings: (1 peers)
Peer Label
----------------- ---------
2.2.2.2:0 ImpNull

RP/0/0/CPU0:ios#
Basic show commands that show the mpls forwarding table and label ranges
RP/0/0/CPU0:ios#show mpls forwarding
Thu Jul 15 10:00:09.234 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
24000 Pop 192.168.23.0/30 Gi0/0/0/1 192.168.12.2 0
Pop 192.168.23.0/30 Gi0/0/0/4 192.168.13.2 0
24001 Pop 3.3.3.3/32 Gi0/0/0/4 192.168.13.2 4352
24002 Pop 2.2.2.2/32 Gi0/0/0/1 192.168.12.2 836154

the prefix 192.168.23.0 is reachable via 2 equal cost multi path (ECMP) and thus will be subject to L Balance
RP/0/0/CPU0:ios#show mpls forwarding labels 24000
Thu Jul 15 10:10:59.189 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
24000 Pop 192.168.23.0/30 Gi0/0/0/1 192.168.12.2 0
Pop 192.168.23.0/30 Gi0/0/0/4 192.168.13.2 0

RP/0/0/CPU0:ios#show mpls forwarding labels 24000 detail


Thu Jul 15 10:11:05.859 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
24000 Pop 192.168.23.0/30 Gi0/0/0/1 192.168.12.2 0
Updated: Jul 15 08:44:23.826
Version: 11, Priority: 3
Label Stack (Top -> Bottom): { Imp-Null }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 14/14, MTU: 1500
Packets Switched: 0

Pop 192.168.23.0/30 Gi0/0/0/4 192.168.13.2 0


Updated: Jul 15 09:20:45.726
Version: 11, Priority: 3
Label Stack (Top -> Bottom): { Imp-Null }
NHID: 0x0, Encap-ID: N/A, Path idx: 1, Backup path idx: 0, Weight: 0
MAC/Encaps: 14/14, MTU: 1500
Packets Switched: 0
we shall now develop a targeted LDP between R1 and R2
we will configure

Normal
R1 (LDP Config commands)
mpls ldp
router-id 1.1.1.1
interface GigabitEthernet0/0/0/1
!
interface GigabitEthernet0/0/0/4
!

Normal
R1
RP/0/0/CPU0:ios#show mpls ldp discovery
Thu Jul 15 08:44:27.215 UTC

Local LDP Identifier: 1.1.1.1:0


Discovery Sources:
Interfaces:
GigabitEthernet0/0/0/1 : xmit/recv
VRF: 'default' (0x60000000)
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
Hold time: 15 sec (local:15 sec, peer:15 sec)
Established: Jul 15 08:44:23.695 (00:00:03 ago)

RP/0/0/CPU0:ios#show mpls ldp neighbor


Thu Jul 15 08:45:18.151 UTC

Peer LDP Identifier: 2.2.2.2:0


TCP connection: 2.2.2.2:64741 - 1.1.1.1:646
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 9/9; Downstream-Unsolicited
Up time: 00:00:55
LDP Discovery Sources:
IPv4: (1)
GigabitEthernet0/0/0/1
IPv6: (0)
Addresses bound to this peer:
IPv4: (3)
2.2.2.2 192.168.12.2 192.168.23.1
IPv6: (0)

Note: Fowarding commands as shown on Tab 2 are same for both normal and targeted LDP
we will configure the targeted LDP and show the difference between the normal a

Targeted (R1)

mpls ldp
router-id 1.1.1.1
address-family ipv4
discovery targeted-hello accept
neighbor 2.2.2.2 targeted
!
interface GigabitEthernet0/0/0/1
!
interface GigabitEthernet0/0/0/4
!
!

investigation of LDP Discovery and Neighbor


Targeted (R1)
R1
RP/0/0/CPU0:ios#show mpls ldp dis
Thu Jul 15 11:13:38.891 UTC

Local LDP Identifier: 1.1.1.1:0


Discovery Sources:
Interfaces:
GigabitEthernet0/0/0/1 : xmit/recv
VRF: 'default' (0x60000000)
LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
Hold time: 15 sec (local:15 sec, peer:15 sec)
Established: Jul 15 08:44:23.695 (02:29:15 ago)

Targeted Hellos:
1.1.1.1 -> 2.2.2.2 (active/passive), xmit/recv
LDP Id: 2.2.2.2:0
Hold time: 90 sec (local:90 sec, peer:90 sec)
Established: Jul 15 10:39:55.190 (00:33:43 ago)

RP/0/0/CPU0:ios#show mpls ldp neighbor


Thu Jul 15 11:18:21.452 UTC

Peer LDP Identifier: 2.2.2.2:0


TCP connection: 2.2.2.2:64741 - 1.1.1.1:646
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 185/183; Downstream-Unsolicited
Up time: 02:33:58
LDP Discovery Sources:
IPv4: (2)
GigabitEthernet0/0/0/1
Targeted Hello (1.1.1.1 -> 2.2.2.2, active/passive)
IPv6: (0)
Addresses bound to this peer:
IPv4: (3)
2.2.2.2 192.168.12.2 192.168.23.1
IPv6: (0)

for both normal and targeted LDP


DP and show the difference between the normal and targeted

Targeted (R2)

mpls ldp
router-id 2.2.2.2
address-family ipv4
discovery targeted-hello accept
neighbor 1.1.1.1 targeted
!
interface GigabitEthernet0/0/0/2
!
interface GigabitEthernet0/0/0/5
!
!

tion of LDP Discovery and Neighbor


Comments
on R1 we have for R2 both normal and Targeted LDP

Local LDP ID; same in both


normal LDP same
normal LDP same
normal LDP same
normal LDP same
normal LDP same
normal LDP same
normal LDP same

Targeted LDP
Source is R1 and sink is R2, moreobver both TX/RX active
Peer LDP ID

different in Normal vs Targeted LDP


Comments

same in both
same in both
unique to targeted; define add family
unique to targeted; Accept targeted-hello from peer 9security reasons)
unique to targeted; define the neighbor and add "targeted"

not really needed for targeted LDP (to be verified)

not really needed for targeted LDP (to be verified)

You might also like