LDP Autoconfiguration
LDP Autoconfiguration
By default, no LDP is enabled on any interfaces. LDP is enabled on per-interface using mpls ip command manually. Instead of going to every interface and enabling LDP, there is another way to enable on all OSPF/ISIS enabled interfaces.
Pre-requisite: LDP should be enabled globally using mpls ip command for LDP Autoconfiguration.
From OSPFrouter configuration mode, use mpls ldp autoconfig [area area-id] command.
From ISIS router configuration mode, use mpls ldp autoconfig [level-1 | level-2] command.
To disable LDP on a particular interface, use no mpls ldp igp autoconfig from interface configuration mode.
To view if LDP is enabled manually on per-interface basis or auto-configured, use show mpls ldp discovery or show mpls interfaces detail command. "Interface Config" indicates LDP was enabled from the interface using mpls ip command. "IGP Config" indicates LDP was enabled through the router configuration mode using mpls ldp autoconfig command.
Consider the following-
R1 and R2 routers are connected via point-to-point serial link. LDP is enabled from the interface using mpls ip command.
R1 config
mpls label protocol ldp
mpls ldp router-id Loopback 0 force
!
interface Loopback 0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface serial 0/0
ip address 10.1.1.1 255.255.255.0
ip ospf 1 area 0
mpls ip
!
R2 config
mpls label protocol ldp
mpls ldp router-id Loopback 0 force
!
interface Loopback 0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface serial 0/0
ip address 10.1.1.2 255.255.255.0
ip ospf 1 area 0
mpls ip
!
R1# show mpls ldp discovery detail
Local LDP Identifier:
1.1.1.1:0
Discovery Sources:
Interfaces:
Serial0/0 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 1.1.1.1
LDP Id: 2.2.2.2:0
Src IP addr: 10.1.1.2; Transport IP addr: 2.2.2.2
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 2.2.2.2/32
R1# show mpls interfaces detail
Interface Serial0/0:
IP labeling enabled (ldp):
Interface config
LSP Tunnel labeling not enabled
BGP tagging not enabled
Tagging operational
Fast Switching Vectors:
IP to MPLS Fast Switching Vector
MPLS Turbo Vector
MTU = 1500
R1# show ip ospf mpls ldp interface serial 0/0
Serial0/0
Process ID 1, Area 0
LDP is not configured through LDP autoconfig
LDP-IGP Synchronization : Not required
Holddown timer is disabled
Interface is up
Now, LDP autoconfiguration is performed as below-
R1 config
mpls label protocol ldp
mpls ldp router-id Loopback 0 force
mpls ip
!
interface Loopback 0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface serial 0/0
ip address 10.1.1.1 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
mpls ldp autoconfig area 0
!
R2 config
mpls label protocol ldp
mpls ldp router-id Loopback 0 force
mpls ip
!
interface Loopback 0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface serial 0/0
ip address 10.1.1.2 255.255.255.0
ip ospf 1 area 0
!
router ospf 1
mpls ldp autoconfig area 0
!
R1# show mpls ldp discovery detail
Local LDP Identifier:
1.1.1.1:0
Discovery Sources:
Interfaces:
Serial0/0 (ldp): xmit/recv
Enabled: IGP config;
Hello interval: 5000 ms; Transport IP addr: 1.1.1.1
LDP Id: 2.2.2.2:0
Src IP addr: 10.1.1.2; Transport IP addr: 2.2.2.2
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 2.2.2.2/32
R1# show mpls interfaces detail
Interface Serial0/0:
IP labeling enabled (ldp):
IGP config
LSP Tunnel labeling not enabled
BGP tagging not enabled
Tagging operational
Fast Switching Vectors:
IP to MPLS Fast Switching Vector
MPLS Turbo Vector
MTU = 1500
R1# show ip ospf mpls ldp interface serial 0/0
Serial0/0
Process ID 1, Area 0
LDP is configured through LDP autoconfig
LDP-IGP Synchronization : Not required
Holddown timer is disabled
Interface is up