100% found this document useful (1 vote)
4 views8 pages

Understanding OSPF Router ID Selection

The document discusses the OSPF (Open Shortest Path First) protocol, focusing on the selection and configuration of the router ID (RID), which must be unique within the network to avoid reachability issues. It outlines the criteria for selecting the RID, including manual configuration and the highest IP addresses on interfaces, and provides a practical example of configuring OSPF on a router. Additionally, it explains how to reset the OSPF process to change the RID if necessary.

Uploaded by

Vineet
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4 views8 pages

Understanding OSPF Router ID Selection

The document discusses the OSPF (Open Shortest Path First) protocol, focusing on the selection and configuration of the router ID (RID), which must be unique within the network to avoid reachability issues. It outlines the criteria for selecting the RID, including manual configuration and the highest IP addresses on interfaces, and provides a practical example of configuring OSPF on a router. Additionally, it explains how to reset the OSPF process to change the RID if necessary.

Uploaded by

Vineet
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OSPF LSAs and LSDB Flooding

OSPF Hello and Dead Interval

OSPF Router ID

OSPF Packets and Neighbor Discovery

OSPF DR/BDR Election

OSPF Passive Interface

Troubleshooting OSPF Neighbor Adjacency

 Unit 3: OSPF Network Types

 Unit 4: OSPF Stub Areas

 Unit 5: Advanced OSPF Topics

You are here: Home » OSPF

OSPF Router ID
Each OSPF router selects a router ID (RID) that has to be unique on your network. OSPF
stores the topology of the network in its LSDB (Link State Database) and each router is
identi ed with its unique router ID , if you have duplicate router IDs then you will run into
reachability issues.

Because of this, two OSPF routers with the same router ID will not become neighbors but
you could still have duplicated router IDs in the network with routers that are not directly
connected to each other.

OSPF uses the following criteria to select the router ID:

1. Manual con guration of the router ID.


2. Highest IP address on a loopback interface.
3. Highest IP address on a non-loopback interface.

Let’s see this in action. I will use the following router for this demonstration:
There are two physical interfaces and two loopback interfaces. All interfaces are active:

R1#show ip interface brief


Interface IP-Address OK? Method Status
Protocol
FastEthernet0/0 [Link] YES manual up
up
FastEthernet0/1 [Link] YES manual up
up
Loopback0 [Link] YES manual up
up
Loopback1 [Link] YES manual up
up

Let’s start an OSPF process:

R1(config)#router ospf 1
R1(config-router)#exit

Now we can check what router ID it selected:

R1#show ip protocols | include Router ID


Router ID [Link]
It selected [Link] which is the highest IP address on our loopback interfaces. Let’s
get rid of the loopbacks now:

R1(config)#no interface loopback 0


R1(config)#no interface loopback 1

Take a look again at the router ID:

R1#show ip protocols | include Router ID


Router ID [Link]

It’s still the same, this is because the router ID selection is only done once. You have to
reset the OSPF process before it will select another one:

R1#clear ip ospf process


Reset ALL OSPF processes? [no]: yes
Let’s see if this makes any di erence:

R1#show ip protocols | include Router ID


Router ID [Link]

There we go, the router ID is now the highest IP address of our physical interfaces. If you
want we can manually set the router ID. This will overrule everything:[teaser]

R1(config)#router ospf 1
R1(config-router)#router-id [Link]

Use the router-id command for this. Let’s verify our work:

R1#show ip protocols | include Router ID


Router ID [Link]

There we go, our new router ID is visible.


When your router doesn’t have any neighbors then OSPF will immediately
change the router ID (if you used the router-id command). When you do have
neighbors you will have to reset the OSPF process.

Configurations
Want to take a look for yourself? Here you will nd the con guration of R1.

R1
hostname R1
!
interface FastEthernet0/1
ip address [Link] [Link]
!
interface FastEthernet0/0
ip address [Link] [Link]
!
interface Loopback0
ip address [Link] [Link]
!
interface Loopback1
ip address [Link] [Link]
!
router ospf 1
router id [Link]
!
end

That’s all there is to it, I hope this example has been useful! Any questions? Just leave a
comment.

« Previous Lesson
OSPF Hello and Dead Interval
Next Lesson
OSPF Packets and Neighbor
Discovery
»

You might also like