interface [intf]
Enables MPLS LDP on a specific interface and enters MPLS LDP interface configuration mode.
Overview
The 'interface' command in MPLS LDP configuration mode is used to enable Label Distribution Protocol (LDP) on a specific interface. LDP is a protocol that distributes labels in an MPLS network, allowing routers to build label-switched paths (LSPs). In Cisco IOS-XR, LDP configuration is hierarchical: you first enter MPLS LDP config mode using 'mpls ldp', then use the 'interface' command to enter interface-specific configuration. This command is essential for controlling which interfaces participate in label distribution. Typically, you enable LDP on all interfaces that connect to MPLS-enabled neighbors. The command also allows you to set interface-specific parameters like hello interval, hold time, and authentication. In troubleshooting workflows, you use this command to verify that LDP is enabled on the correct interfaces and to check for configuration mismatches. IOS-XR differs from classic IOS in that it requires explicit 'commit' to apply changes, and the interface naming convention uses a slot/port format (e.g., GigabitEthernet0/0/0/0).
interface [type slot/port]When to Use This Command
- Enabling MPLS LDP on a core-facing interface to establish LDP sessions with adjacent routers.
- Configuring LDP parameters such as hello interval or authentication on a per-interface basis.
- Disabling LDP on a specific interface that should not participate in label distribution.
- Verifying LDP interface configuration and operational status.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| interface type slot/port | interface [type slot/port] | Specifies the interface type (e.g., GigabitEthernet, TenGigE) and its location in slot/port format. For example, GigabitEthernet0/0/0/0. This parameter is mandatory to enter MPLS LDP interface configuration mode. |
Command Examples
Enable MPLS LDP on GigabitEthernet0/0/0/0
interface GigabitEthernet0/0/0/0RP/0/RP0/CPU0:router(config-ldp)# interface GigabitEthernet0/0/0/0 RP/0/RP0/CPU0:router(config-ldp-if)#
The command enters MPLS LDP interface configuration mode for GigabitEthernet0/0/0/0. The prompt changes to config-ldp-if, indicating that subsequent commands will apply to this interface.
Disable LDP on an interface
interface GigabitEthernet0/0/0/1
shutdownRP/0/RP0/CPU0:router(config-ldp-if)# shutdown RP/0/RP0/CPU0:router(config-ldp-if)# commit
The 'shutdown' command disables LDP on the interface. After committing, LDP will not send or receive hello messages on this interface.
Understanding the Output
The output of the 'interface' command itself is minimal; it simply changes the prompt to indicate you are in MPLS LDP interface configuration mode. The real value comes from subsequent commands like 'show mpls ldp interface' or 'show mpls ldp neighbor'. In 'show mpls ldp interface', you will see a list of interfaces with LDP enabled, their status (up/down), hello interval, and number of neighbors discovered. A healthy interface shows 'Up' status and at least one neighbor. A problem interface may show 'Down' or 'No Neighbor'. The 'show mpls ldp neighbor' output displays LDP peers, their transport address, label spaces, and session state. A healthy session shows 'Operational' state. Common issues include mismatched hello intervals or MTU problems causing session flapping.
Configuration Scenarios
Basic LDP Enable on Core Interface
A service provider core router with two core-facing interfaces that need LDP enabled.
Topology
R1 --- R2 --- R3
Gi0/0/0/0 Gi0/0/0/1Steps
- 1.Enter MPLS LDP config mode: configure terminal, mpls ldp
- 2.Enable LDP on Gi0/0/0/0: interface GigabitEthernet0/0/0/0
- 3.Optionally set hello interval: hello interval 5000
- 4.Exit and commit: exit, commit
! mpls ldp interface GigabitEthernet0/0/0/0 hello interval 5000 ! interface GigabitEthernet0/0/0/1 ! commit !
Verify: Use 'show mpls ldp interface brief' to verify interfaces are up and 'show mpls ldp neighbor' to see LDP peers.
Watch out: If the interface is not physically up, LDP will not start. Ensure the interface is not administratively down.
Troubleshooting with This Command
When troubleshooting LDP issues on Cisco IOS-XR, the 'interface' command is used to verify that LDP is enabled on the correct interfaces. Start by checking 'show mpls ldp interface' to see the status of each LDP-enabled interface. If an interface shows 'Down', check the physical interface state with 'show interface'. If the interface is up but LDP is down, verify that the 'mpls ldp' configuration is present and that the interface is not shut down under LDP. Use 'show mpls ldp neighbor' to see if any neighbors are discovered. Common issues include mismatched hello intervals or hold times, which can cause sessions to flap. Also, ensure that the transport address (usually the loopback) is reachable. If LDP sessions are not establishing, check ACLs or firewalls that might block UDP 646 (hello) or TCP 646 (session). In IOS-XR, you can use 'debug mpls ldp all' with caution to see real-time events. Remember to commit any configuration changes before testing.
CCNA Exam Tips
Remember that in IOS-XR, you must be in MPLS LDP config mode (config-ldp) before using the 'interface' command.
The 'shutdown' command under interface mode disables LDP, not the interface itself; use 'no shutdown' to re-enable.
Know that 'show mpls ldp interface brief' gives a quick overview of all LDP-enabled interfaces and their status.
Common Mistakes
Forgetting to enter MPLS LDP config mode first; the 'interface' command is not available in global config.
Using 'interface' without specifying the correct interface type and slot/port notation (e.g., GigabitEthernet0/0/0/0).
Not committing changes after configuration; changes are not applied until 'commit' is issued.
Platform Notes
In Cisco IOS-XR, the 'interface' command under MPLS LDP config mode is similar to IOS, but the configuration is applied only after a 'commit'. The interface naming convention uses a different format (e.g., GigabitEthernet0/0/0/0 vs GigabitEthernet0/0). Also, IOS-XR supports multiple instances of LDP (e.g., for different VRFs) using the 'mpls ldp' command under the VRF configuration. In IOS, LDP is configured under 'mpls ldp router-id' and 'interface' commands globally. For equivalent commands on other platforms, Juniper uses 'protocols ldp' with 'interface' statements, and Nokia (Alcatel-Lucent) uses 'ldp' with 'interface-parameters'. Version differences: In IOS-XR 6.x and later, LDP supports features like LDP-IGP synchronization and graceful restart.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions