Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Router ID · OSPF Fundamentals

Direct answer

The OSPF router ID is a 32-bit value written like an IPv4 address that uniquely identifies each OSPF router. It is chosen from router-id, else the highest loopback IP, else the highest active interface IP — duplicates break adjacencies and SPF.

When to use this

Use it when the design or fault is specifically about the 32-bit OSPF router identity used in protocol databases, neighbor relationships, LSA ownership and election tie-breaks. Stay on that boundary until configuration intent, live control/security state and the adjacent dependency agree.

First 30 seconds

1. Router ID: configured router-id, else highest loopback IP, else highest active interface IP.

2. Must be unique in the domain.

3. Changes need clear ip ospf process.

4. Duplicate RIDs cause LSA flapping.

5. Set it explicitly.

Operational verification

router-id configured → OSPF process → identifies LSAs

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · IOS/IOS XE · Cisco IOS XE
Key commandshow ip ospf | include ID
Scope / prerequisiteUse it when the design or fault is specifically about the 32-bit OSPF router identity used in protocol databases, neigh…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

6 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 First 30 seconds Verify boundary

Immediate answer: Identify the active OSPF router ID and where it came from before changing interfaces or adjacency parameters.

Verification chain: configured/selected router ID → OSPF process identity → neighbor view → LSA advertising-router identity → SPF

Stop condition: An expected router ID does not show adjacency, LSDB completeness or route installation.

Step 2 Operational verification and known-good state Verify boundary
show ip ospf | include ID
show ip protocols | include Router ID
show ip ospf neighbor

The first two show the ID in use. In the neighbour table, the Neighbor ID column is each neighbour's router ID — it is normal that it differs from the neighbour's interface address shown in the Address column.

Known-good: every router has an explicitly configured, unique ID, and the ID in use equals the configured one.

Step 3 Verification and output interpretation Verify boundary

Verify the active Router ID from the OSPF process and neighbor/LSDB outputs rather than only from running configuration. Confirm uniqueness across peers and correlate the Advertising Router field of important LSAs to the expected device. During a planned Router ID change, observe adjacency reset/reformation and replacement LSAs, then verify routes and CEF separately. If an election result is unexpected, include Router ID together with interface priority because the ID is only the tie-breaker after priority. For Router ID, capture the exact Router ID, interface, area and timestamp with the output, then compare the next evidence layer rather than stopping at the first healthy line.

Step 4 Verification & troubleshooting Narrow the fault

1. show ip ospf | include ID → the ID the process is using.

2. Compare it with the configured router-id; if they differ, the process has not been restarted since the command was entered.

3. Collect the IDs of all routers and check for duplicates.

4. show logging | include DUP_RTRID → OSPF's own report of a duplicate.

5. Set router-id and restart the process in a maintenance window.

Step 5 Failure signatures and troubleshooting branches Narrow the fault
  • DUP_RTRID messages in the log. Two routers use the same ID.
  • Routes behind two particular routers flap, and their Router LSA sequence numbers climb quickly. A duplicate ID between routers that are not neighbours.
  • A neighbour will not form although everything else matches. Both ends have the same ID.
  • The ID changed after a reload. It was never configured explicitly.
  • router-id is configured but the old ID is still shown. The process has not been restarted.
Step 6 When the problem is really fixed Narrow the fault
  • Each router uses the ID that is configured on it.
  • No two routers in the domain share an ID.
  • No duplicate-ID messages appear after the change.
  • LSA sequence numbers are no longer racing.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Do not infer service health from one command. For Router ID, distinguish configured intent, protocol/security state, installed forwarding state and the original workload result.

Key checks
  • show ip ospf — Routing Process with ID
  • show running-config | section router ospf — router-id
ReferenceWhat it is1 section · depth on demand

What it is

The OSPF router ID is a 32-bit number, written like an IPv4 address, that identifies a router within OSPF. Every LSA is labelled with the ID of the router that originated it, and neighbours are listed by it. It is a name, not an address — it does not have to be reachable.

ReferenceWhy it matters1 section · depth on demand

Why it matters

Uniqueness is essential. Two routers with the same ID in one area overwrite each other's LSAs, and routes behind them flap or disappear; two neighbours with the same ID refuse to form an adjacency. And because the ID is picked automatically when not configured, it can change after a reload if interfaces were added — which silently changes DR elections and anything that refers to the router by ID. Setting it explicitly avoids both problems.

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • Selection order: the router-id command; otherwise the highest loopback address; otherwise the highest address on an active interface.
  • It is chosen when the OSPF process starts and does not change until the process is restarted (clear ip ospf process) or the router reloads — even after router-id is configured.
  • It must be unique in the whole OSPF domain.
  • It is the tie-breaker in the DR election and appears as Neighbor ID in show ip ospf neighbor.
  • Common practice: make it equal to the Loopback0 address.

In depth

The router ID identifies the router in every LSA it originates

The Catalyst 9300 OSPF guide states that OSPF uses the highest IP address on the router's interfaces as router ID, with a loopback address taking precedence, because loopbacks never fail. A configured router-id overrides both.

C9300(config)# interface Loopback0
C9300(config-if)# ip address 10.0.0.11 255.255.255.255
C9300(config)# router ospf 1
C9300(config-router)# router-id 10.0.0.11
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect
C9300# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
C9300# show ip ospf | include Routing Process
 Routing Process "ospf 1" with ID 10.0.0.11

Selection order (IOS XE)

OrderSource
1router-id under router ospf
2Highest IPv4 address on an up loopback
3Highest IPv4 address on an up physical interface

The router ID is chosen when the process starts. Changing it requires clear ip ospf process, which resets all adjacencies of that process.

Why it matters

EffectDetail
LSA ownershipRouter and network LSAs are keyed by router ID
DR/BDR tie-breakHigher router ID wins when priorities are equal
Duplicate router IDsAdjacency problems, LSA flapping, %OSPF-4-DUP_RTRID_NBR or DUP_RTRID_AREA messages
Troubleshootingshow ip ospf neighbor lists neighbours by router ID

Practice

  • Set the router ID explicitly, equal to the Loopback0 address, so it is stable and recognisable.
  • Use a unique router ID per router across the whole OSPF domain.
  • When cloning a configuration to a new switch, change the router ID before enabling OSPF. A duplicate router ID can disturb the whole area.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

The OSPF router ID uniquely identifies a router in the OSPF domain. It is chosen when the process starts — configured router-id, else highest loopback IP, else highest active interface IP — and does not change until the process is restarted.

router ospf 1
 router-id 10.255.255.1
clear ip ospf process            ! needed to apply a new ID
show ip ospf | include ID

Documented example, not captured output.

Duplicate router IDs cause flapping LSAs and missing routes; always configure them explicitly.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Mechanics and state ownership

The router ID is in the header of every OSPF packet and in every LSA as the advertising router. An LSA is identified by its type, its link-state ID and that advertising router.

That explains what a duplicate does. If two routers that are not neighbours share an ID, each originates a Router LSA under the same identity. Each of them then receives the other's LSA, takes it for an outdated copy of its own, and issues a new one with a higher sequence number. The two keep replacing each other's information, the rest of the area keeps recalculating, and routes to the networks behind both routers come and go.

Between direct neighbours the effect is simpler: a Hello carrying the receiver's own ID is rejected, so no adjacency forms.

Automatic selection is stable only as long as nothing changes. Add a loopback with a higher address, reload, and the router comes back under a different ID.

State model and technical mechanics

OSPF identifies a router with a 32-bit Router ID that looks like an IPv4 address but functions as a protocol identifier. It appears in neighbor tables, LSA Advertising Router fields and DR/BDR tie-breaking. Platforms can derive it from configured values or interface addresses according to selection rules, but relying on automatic selection can make identity change unexpectedly after topology or interface changes. Once the OSPF process has selected an ID, changing the configuration may require a process restart or equivalent event before the active protocol identity changes. Uniqueness inside the OSPF domain is essential because duplicate IDs make database and adjacency identity ambiguous.

Limits and common misconceptions

Router ID is not automatically a reachable IP address, loopback requirement or data-plane source. Pinging the numeric Router ID may be meaningless if no interface owns it. A stable Router ID also does not guarantee stable adjacencies if interface/timer/authentication state is changing. Conversely, a routing failure should not be blamed on the Router ID merely because it appears throughout OSPF outputs. Treat it as identity metadata that participates in protocol object ownership and elections.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Configure Router IDs explicitly in stable infrastructure, using an addressing/identity scheme that remains unique and operationally recognizable. Do not couple the Router ID unnecessarily to a transient physical interface. Plan changes as control-plane identity changes rather than cosmetic edits, because LSAs and neighbor relationships use the ID. Keep the chosen ID documented across monitoring, diagrams and OSPF reference content. If multiple OSPF processes or VRFs exist, preserve the platform-specific scope of the identifier instead of assuming one global identity model.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2328

Authoritative/upstream documentation reviewed for bounded claims in Routing → OSPF → OSPF Fundamentals → Router ID. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%
Embedded reference data

Quick lookup tables

Router ID · technical reference

Compact OSPF/FHRP mechanics, design and evidence boundaries for fast lookup.

ItemMeaning
Format32-bit value shown as dotted decimal
Used byNeighbor identity, LSAs, DR/BDR tie-break
Best practiceExplicit, unique and stable
Not proof ofReachable interface or forwarding path

Router ID operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for Router IDSuspicious signatureNext proof
IntentMatches the 32-bit OSPF router identity used in protocol databases, neighbor relationships, LSA ownership and election tie-breaks designConfiguration differs from design/peerCompare effective configuration
Control/security stateStable expected neighbor/database/binding/election stateduplicate Router IDs causing adjacency/database instability, an unexpected dynamically selected Router ID, an intended router-id change not taking effect in the running process, or troubleshooting the peer interface address when the LSDB references a different Router IDInspect protocol/security detail and adjacent state
ForwardingExpected Layer-2 or RIB/FIB/gateway pathControl state exists but traffic path disagreesMAC/ARP/RIB/FIB/CEF proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Confirmation

Confirm action

Continue?