• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Roger Perkin

Network Automation Architect

  • Network Automation
    • Network Automation Courses
    • What is NetDevOps?
    • Workflow Orchestration
    • Ansible Automation Platform
    • Ansible Workshop
    • What is Network Automation?
    • Network Automation Tools
    • ContainerLab
    • Ansible Training
      • What is Ansible?
      • Ansible Tutorial for Beginners
      • Ansible Network Automation
      • Ansible Inventory Example
    • Python Network Automation
      • Nornir
      • Python Network Automation Course
      • Python for Network Engineers
      • Python VENV / Virtual Environment Tutorial
      • Python Tutorial for Beginners
      • pyATS
    • Network Source of Truth
      • NetBox
      • Infrahub
      • NautoBot
    • NetDevops
    • DevOps Tutorial
      • Git Training
      • Terraform Training
      • Linux Training
      • Kubernetes Training
      • Devops Training Course
      • Azure Devops Training
    • Terraform
    • GIT
      • Git Commands
      • What is GitHub?
    • Docker Training
    • Confluence
    • Microsoft Azure
  • Cisco
    • ISE
    • SD WAN Training
    • Password Recovery
    • Software-Upgrade-Guides
    • BGP
    • Data Center
    • WIRELESS
  • CCIE
  • Blog
  • About
    • My Red Special Guitar
  • Contact

MPLS LDP router-id loopback0 Force

Home » CCIE Certification

Whilst configuring an MPLS lab I came across the force option on the MPLS LDP router-id command and was not sure what it did?

After reading the documentation I will now explain the MPLS LDP router-id process and the relevance of the Force option.

How the LDP Router-ID is derived

If the MPLS Router-ID command has not been applied.

  1. The router checks the IP addresses of all operational interfaces.
  2. If any of these interfaces are loopbacks the router selects the highest loopback address for the LDP router-id
  3. If no loopback interfaces are configured the highest operational IP address is selected as the LDP router-id

This default method of assigning the LDP router-id can cause problems if the assigned id is not able to be advertised by the routing protocol.
The mpls router-id command allows you to specify an interface as the LDP router-id. You need to make sure the specified interface is up so it’s IP address can be used.

If you issue the command without the force option the router will select the ip address of the specified interface when it next selects an LDP router ID.

When you issue the mpls ldp router-id with the force option if the interface is up and it is not currently using the IP address as the router-id the router-id changes. This will tear down any existing LDP sessions and will interupt the MPLS forwarding.

If the interface is down, when it comes up the router-id will change.

Lets prove this on the CLI

First lets see what the current LDP router-id is

mpls router id

As you can see from this output the current router-id is 1.1.1.1:0
A quick look at the sh ip int brief we can see that this is lo0

ip-address

From this output it is obvious that there is only one Loopback interface and this has been selected for the LDP router-id
So lets add another Loopack and try to make that the new router-id

ip-address2

At this point in time nothing happens
So lets try and change it with the mpls ldp router-id lo2 command

mpls-ldp-router-id-lo2

Again nothing happens, so lets try the force option

mpls-ldp-router-id-force

Using the force option the router-id is instantly changed and the LDP sessions are torn down
The new router-id is now 9.9.9.9 as shown below

new-router-id

 

Now there is an issue that you have broken the LDP neighbors because of a point I made earlier. 9.9.9.9 is not in OSPF so LDP is broken. To fix this I just put Loopback2 into OSPF area 0 and the neighbors come up

mpls-router-id-ospf3

 

More information can be found in the Cisco Documentation here:
http://www.cisco.com/en/US/docs/ios/12_4t/12_4t2/ftldp41.html

Why does the LDP router-id have to be a /32

This is best practice and not an absolute requirement. To make sure we don’t use a less specific router from ingress
to egress PE

If you have a /24 configured on the the loopback interface, by default
OSPF advertises the prefix for the loopback as a /32 (host route) regardless
of the subnet mask configured, LDP on the other hand will advertise it
according to the configured subnet mask.

If you configure ip ospf network point-to-point ospf will advertise the prefix
according to the configured network mask. If you do this then the FEC advertised
by LDP and the ospf advertised prefix will match. Data plane and control plan with work
and traffic will flow.

I would always recommend you configure your PE loopback interfaces using a /32

The reason traffic does not flow when there is a mis-match is because
the label switched path is not setup properly because the LDP FEC (/24) and the
ospf prefix (/32) don’t match.

Category: CCIE CertificationTag: ccie blog, MPLS, ospf
ansible course for network engineers
Get Access to my Ansible Course NOW
Previous Post:CCIE Written Exam – Implement IPv6
Next Post:Is CCIE still worth it in 2022?

Reader Interactions

Comments

  1. Alam zeb

    December 26, 2015 at 3:02 pm

    Hi Roger,
    Thank you very much for very easy explanation.

  2. A Mulheirn

    April 27, 2017 at 3:09 pm

    Nice explanation, thanks.
    Another reason that using /32 is best practice is if you ever decide to use mpls ldp ‘allocate global host-routes’ to make LDP converge faster. Or if you are inter-working with Junos, which only allocates labels for loopbacks by default.

    • Roger Perkin

      April 28, 2017 at 12:01 pm

      Thanks Andrew

Sidebar

Hi I'm Roger Perkin,
Based in the UK working as a Network Automation Architect, CCIE #50038
About Roger | Twitter | Linkedin

python course for network engineers

Topics

Network Automation
Ansible
Python for Network Automation
CCIE
Cisco ISE
F5 Certification
BGP
OSPF
Network Automation Conferences
auvik promo banner
Pluralsight Trial

Git for Network Engineers

Ansible vs Nornir

Start learning today with my Network Automation Courses

Master Ansible, Python, Git, Nornir, Jenkins and more..


Buy me a coffeeBuy me a coffee

ansible network automation course

Have you seen my YouTube Channel?

YouTube Subscribe

Let’s get started

Take a look at my premium courses on Ansible, Nornir & Git or buy them all with the Network Automation Bundle!

Network Automation Courses

Navigation

Python VENV Tutorial
Python for Network Engineers

Network Automation
Network Automation Courses
Network Discovery Tools
Network Automation Conferences
Ansible Training
What is Ansible?
Devops Tutorial
Network Source of Truth
DevOps Glossary
Network Monitoring Software

Contact

Contact

Get in touch with me here

[email protected]

  • Twitter
  • LinkedIn
  • YouTube
Buy me a coffeeBuy me a coffee

Copyright © 2026 · Roger Perkin · All Rights Reserved · Privacy Policy – Terms