How to Tame an OSPF Topology Wild Using Router IDs

How to Tame an OSPF Topology Wild Using Router IDs

James Hanback: You can choose your Open Shortest Path First router (OSPF). You can choose your OSPF router ID. The routing protocol will attempt to identify your router ID if you don’t know it.
Anyone who has studied for a CCNA certification will tell you that OSPF routers select a router ID. This knowledge is essential for taking a Cisco certification exam covering OSPF. OSPF version 3 (OSPFv3) and OSPF version 6 (IPv6) use router IDs to identify each router on a network. OSPF uses the highest router ID from OSPF routers within a given area to determine which router becomes designated router (DR) or backup designated router(BDR) on multiaccess network if they have equal OSPF priority.
We know that OSPF router IDs matter, but what exactly are they and how do you assign them? You might get the following output if you issue the show-ip ospf command to a Cisco router configured with OSPF routing protocol:
Router1#show IP ospf Routing “ospf 1”, with ID 192.168.51.50
The output below shows that OSPF process 1 runs on Router1 using a router ID 192.168.51.50. You might notice that the router ID looks very similar to an IP address. Because router IDs, which are 32-bit values, are often represented in dotted decimal notation, it is similar to IP addresses. The router can also use the IP addresses configured on the logical and physical interfaces to an OSPF router to configure the router ID, if it has not been manually configured.
Let’s suppose you are a control freak. We all know them. You want to exert your enormous influence over every nuance of your network configuration. This includes the OSPF router IDs. Unfortunately, the previous admin who managed your company’s OSPF configuration decided to create a random IP addressing scheme. This scheme is rife in wasteful subnetting, and doesn’t care which OSPF router becomes the DR or BDR. Loopback interfaces were not set up by the previous administrator! (I know, it’s true. Deepen your breath. Relax. This is how a router ID is determined if it is not manually configured.
The highest IPv4 address that can be assigned to a loopback interface
If no loopback interfaces have been configured, the highest IPv4 address assigned for a physical interface is used
These rules apply regardless of whether you are configuring an IPv6 router and using OSPFv3 for routing. A 32-bit router ID must be manually assigned to an OSPFv3 router if it is not configured with IPv4 address.
A previous admin’s incompetence and poor IPv4 address scheme caused router IDs to be assigned to your company’s OSPF routers. This is because the highest IP address on each router’s physical interface was assigned. This could cause problems as the DR, once elected, becomes responsible for conserving network resources by being sole generator of link state advertisements (LSAs), the little bits of data OSPF routers use in order to learn the topology within a given area. The BDR will take over if the DR fails. You can use the router ID to influence which OSPF router is given the job of being the town crier. If you leave the selection of DR to a router ID generated using a poor IP addressing scheme then you could be left with a DR that can cause network performance problems as it doesn’t have enough resources to provide LSAs efficiently and responsibly. Physical interfaces can sometimes fail to show up on reboots. This makes it possible for an OSPF router with a different routerID than the one it has to reboot with.