admin Posted on 7:54 am

Cisco CCNA Certification Exam Tutorial: OSPF RID

OSPF is a big topic on your CCNA exam, and it should be. OSPF is a widely used WAN protocol and you need to learn the basics before moving on to more complicated setups. One of those details is the OSPF router ID or RID.

The RID is the dotted decimal value by which other OSPF routers will identify a given OSPF router. There are some interesting defaults for this value and a command you should know to encode the RID. You also better know what needs to happen for this command to take effect, so let’s take a closer look at the OSPF RID.

In this example, R1 has an adjacency with R2 and R3 in the frame network 172.12.123.0/24. R1 is the center, with R2 and R3 as spokes. No other interfaces are OSPF-enabled on any of the routers. Running show ip ospf neighbor on R1, we see some unusual values ​​in “Neighbor ID”, which is another name for OSPF RID.

R1#show ip ospf neighbor

Neighbor ID Pri Status Dead Time Address Interface

3.3.3.3 0 FULL/DROTHER 00:01:57 172.12.123.3 Serial0

2.2.2.2 0 FULL/DROTHER 00:01:57 172.12.123.2 Serial0

Note that the neighbor ID of each remote address is the loopback address. How can that be if they are not OSPF enabled?

When determining the Router ID (RID) of an OSPF-enabled router, OSPF will always use the numerically highest IP address on the router’s loopback interfaces, regardless of whether that loopback is OSPF-enabled.

What if there is no loopback? OSPF will then use the numerically highest IP address of the physical interfaces, regardless of whether that interface is OSPF-enabled.

BOTTOM LINE: An interface does not need to be running OSPF for its IP address to be used as the OSPF RID.

The OSPF RID can be changed, but requires a reboot or reinitialization of the OSPF routing process. Use the router-id command to change the default RID of each router, as shown, and kill the OSPF process to do so.

R1#conf t

Enter the configuration commands, one per line. Finish with CNTL/Z.

R1 (config) # router ospf 1

R1 (config router) # router id 11.11.11.11

Reload or use the “clear ip ospf process” command, for this to take effect

Process R1#clear ip ospf

Reset ALL OSPF processes? [no]:Yes

1d05h: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0 from 2WAY to
DOWN, neighbor down: interface down or disconnected

1d05h: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0 from 2WAY to
DOWN, neighbor down: interface down or disconnected

After entering the router-id command, the router console informed you that you must reload the router or reset the OSPF processes for this to take effect. Enter the clear ip ospf process command to do this. Notice that when asked if you really want to do this, the message is “no”. This is because all OSPF adjacencies on this router will be lost and you will have to start the process over again. That’s fine in a practice rack, not good in a production network. Don’t wear that one at work.

The OSPF RID is not a complicated concept, but the fact that an interface does not have to be OSPF-enabled for its IP address to act as the RID takes some getting used to. And remember: when the router or switch asks you a question and the requested answer is “no,” take a step back and make sure you really want to do what you’re about to do.

Leave a Reply

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