Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Networking / Cisco Certification / Cisco – How a router selects it’s OSPF Router-ID (RID)

Apr 3, 2014 By Jared Heinrichs Leave a Comment

Cisco – How a router selects it’s OSPF Router-ID (RID)

This post will go over how a router decides what it’s Router-ID (RID) is. Just so we’re on the same page let’s look at a diagram.

image

We can see that this router is connected to 3 different networks.

OSPF will select it’s RID in this order: (#1 has the most weight, #3 has the least weight).

1.) router-id command – This command is set in “OSPF config mode”. This will always trump everything else.

2.) Loopback Interface IP address value – When you set a loopback address on a device it will trump all other ip addresses on the router except if the router-ID is configured. What happens if there is multiple loopback adapters and no router-id command configured? The router will use the highest loopback adapter IP address.

eg: 192.168.10.1 is HIGHER than 172.16.10.0 which is in turn HIGHER than 10.10.10.1

3.) Physical Interfaces – If the router-ID command AND loopback adapter have not been set on the router, the router will then look to it’s physical interfaces. In our example the LA router will look at the ip addresses 192.168.30.1, 192.168.20.1 and 172.16.10.6.

Because 192.168.30.1 is the “highest” configured IP address the router’s ospf Router-ID will become 192.168.30.1

Now that we understand how a router get’s it Router-ID we should also understand WHEN the router-ID is applied and or changed.

Let’s look at the example network. The network has been running for almost a month since it was deployed. You tell a junior network admin to add a loopback adapter and set to 192.168.25.1. The junior admin goes into the router and types ONLY this:

image

What happens??

We can see that the IP address is in between 192.168.20.1 and 192.168.30.1. If we look back at how OSPF selects the router-id we can see that even though 192.168.30.1 is Higher than 192.168.25.1, the loopback interface (192.168.25.1) will trump the physical interface (192.168.30.1)

If you were to type: “do show ip ospf” what do you think the output will display?

… Insert Jeopardy music here …

The router will say that the Router-ID is STILL 192.168.30.1 !!!!!!!!!!

image

You are now probably scratching your head and asking how can that be? Doesn’t the loopback adapter trump the physical interface? This is why it’s important to know “When the router selects it’s Router-ID”. The router-ID is selected at boot time AND when OSPF is first enabled. Because the router was not restarted the router hasn’t been able to re-select it’s Router-ID!

Let’s look at another example…

Let’s say the router had been rebooted and it was running for another month. The same junior admin now accidentally REMOVES the loopback adapter on the router. If he were to do a “do show ip ospf” what will the router output for it’s Router-id?

Because he never restarted the router yet, the OSPF router-id would still be equal to the IP address of the Loopback adapter even though it had been completely removed!

image

Doing a reboot (reload) of the router you can see that the Router-ID has now been changed to the highest Physical Address.

image

Filed Under: Cisco Certification

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design