mpls ldp
Enters MPLS LDP configuration mode to enable and configure Label Distribution Protocol parameters.
Definition: mpls ldp is a Cisco IOS-XR global config command. Enters MPLS LDP configuration mode to enable and configure Label Distribution Protocol parameters.
Overview
The 'mpls ldp' command is used on Cisco IOS-XR routers to enter the Label Distribution Protocol (LDP) configuration submode. LDP is a protocol used in MPLS networks to distribute labels between routers, enabling label-switched paths (LSPs) for traffic engineering and VPN services. This command is the entry point for all LDP-related configurations, including setting the router ID, configuring session parameters, enabling LDP on interfaces, and setting up authentication.
On IOS-XR, LDP is a separate configuration submode, distinct from other MPLS protocols like RSVP-TE. It is typically used when deploying MPLS in service provider or enterprise networks where label distribution is required. The command fits into troubleshooting workflows by allowing engineers to verify and adjust LDP settings that may affect label binding and forwarding.
mpls ldpWhen to Use This Command
- Enabling MPLS LDP on a router to distribute labels for MPLS forwarding.
- Configuring LDP session parameters such as hello interval and hold time.
- Setting up LDP authentication for secure label exchange.
- Defining LDP label acceptance policies for route filtering.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| No parameters | mpls ldp | This command has no additional parameters. It simply enters the LDP configuration submode. |
Command Examples
Enter MPLS LDP Configuration Mode
mpls ldpRP/0/RP0/CPU0:router(config-ldp)#
The prompt changes to config-ldp, indicating you are now in MPLS LDP configuration submode.
Enable LDP on an Interface
interface GigabitEthernet0/0/0/0RP/0/RP0/CPU0:router(config-ldp-if)#
Enters interface configuration submode under LDP, where you can enable LDP on that interface.
Understanding the Output
The command 'mpls ldp' itself does not produce output; it changes the CLI prompt to indicate you are in LDP configuration mode. The prompt 'RP/0/RP0/CPU0:router(config-ldp)#' confirms you are in the correct submode. From here, you can configure global LDP parameters like router-id, session protection, or enter interface submode.
A healthy configuration shows the prompt without errors; problems occur if the command is rejected due to missing prerequisites (e.g., MPLS not enabled globally).
Configuration Scenarios
Basic LDP Configuration
Enable LDP on a router with a loopback interface as router ID and enable on a physical interface.
Topology
Router A --- Gig0/0/0/0 --- Router BSteps
- 1.Enter global configuration mode.
- 2.Type 'mpls ldp' to enter LDP config.
- 3.Set router-id using 'router-id loopback0'.
- 4.Enter interface submode with 'interface GigabitEthernet0/0/0/0'.
- 5.Enable LDP on the interface with no additional command (just exit).
! mpls ldp router-id loopback0 interface GigabitEthernet0/0/0/0 ! !
Verify: Use 'show mpls ldp neighbor' to verify LDP session is up.
Watch out: The router-id must be an IP address of an existing interface; otherwise, LDP may not establish sessions.
Troubleshooting with This Command
When troubleshooting LDP issues on IOS-XR, start by verifying that LDP is configured globally with 'mpls ldp'. Use 'show mpls ldp neighbor' to check if LDP sessions are established. If no neighbors appear, ensure that interfaces have LDP enabled and that there is IP connectivity between routers.
Check the LDP router ID with 'show mpls ldp parameters' to ensure it is reachable. Common issues include mismatched hello intervals or authentication keys. Use 'debug mpls ldp' to see packet exchanges, but be cautious in production.
Also verify that MPLS is enabled globally with 'mpls oam' or 'mpls ip' on interfaces. On IOS-XR, LDP configuration is hierarchical; ensure you are in the correct submode. If LDP sessions flap, check for MTU issues or ACLs blocking UDP port 646.
CCNA Exam Tips
Remember that 'mpls ldp' enters LDP configuration mode, not interface mode.
On IOS-XR, LDP must be enabled globally before per-interface configuration.
Know that the prompt changes to 'config-ldp' to distinguish from other configuration modes.
Common Mistakes
Typing 'mpls ldp' in global config without first enabling MPLS globally (needs 'mpls oam' or similar).
Confusing 'mpls ldp' with 'mpls ldp neighbor' or other subcommands.
Forgetting to exit LDP config mode before applying other global commands.
mpls ldp vs interface [intf]
These two commands are often confused because MPLS LDP requires both global activation and per-interface enablement. 'mpls ldp' enters the global LDP configuration context, while 'interface [intf]' enables LDP on a specific interface and enters interface-level LDP sub-mode.
| Aspect | mpls ldp | interface [intf] |
|---|---|---|
| Configuration Mode | Global config → MPLS LDP config | MPLS LDP config → [interface] LDP config |
| Scope | Global LDP parameters (e.g., router-id, graceful restart) | Per-interface LDP enablement and parameters |
| Persistence | Persists in running config; visible under 'mpls ldp' hierarchy | Persists in interface configuration under 'mpls ldp' sub-hierarchy |
| Prerequisite | Must be entered before interface LDP configuration | Requires 'mpls ldp' mode to be active |
| Typical Use | Set global LDP settings and enable LDP process | Enable LDP on an interface to form LDP adjacencies |
Use mpls ldp when you need to enter the global LDP configuration context to enable the LDP process or set global parameters like router-id.
Use interface [intf] when you need to enable LDP on a specific interface and configure per-interface LDP settings.
Platform Notes
On Cisco IOS-XR, the 'mpls ldp' command is used to enter LDP configuration mode, similar to IOS but with a different prompt. Unlike IOS, IOS-XR requires explicit 'commit' to apply changes. The configuration is stored in a hierarchical structure.
Equivalent commands on other platforms: Juniper uses 'protocols ldp', Nokia uses 'router ldp'. IOS-XR supports LDP features like session protection, label filtering, and graceful restart. Version differences: In earlier IOS-XR releases, LDP configuration was under 'mpls ldp' but later versions may have additional submodes.
Always check the release notes for specific syntax.
Practice for the CCNP Service Provider
Test your knowledge with practice questions covering all CCNP Service Provider exam domains.
Practice CCNP Service Provider Questions