Router ID · OSPF Fundamentals
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.
router-id configured → OSPF process → identifies LSAs
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip ospf | include IDVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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_RTRIDmessages 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-idis 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 · 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.
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.
show ip ospf— Routing Process with IDshow running-config | section router ospf— router-id
ReferenceWhat it is1 section · depth on demand
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-idcommand; 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 afterrouter-idis 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)
| Order | Source |
|---|---|
| 1 | router-id under router ospf |
| 2 | Highest IPv4 address on an up loopback |
| 3 | Highest 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
| Effect | Detail |
|---|---|
| LSA ownership | Router and network LSAs are keyed by router ID |
| DR/BDR tie-break | Higher router ID wins when priorities are equal |
| Duplicate router IDs | Adjacency problems, LSA flapping, %OSPF-4-DUP_RTRID_NBR or DUP_RTRID_AREA messages |
| Troubleshooting | show 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.
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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%Quick lookup tables
Router ID · technical reference
Compact OSPF/FHRP mechanics, design and evidence boundaries for fast lookup.
| Item | Meaning |
|---|---|
| Format | 32-bit value shown as dotted decimal |
| Used by | Neighbor identity, LSAs, DR/BDR tie-break |
| Best practice | Explicit, unique and stable |
| Not proof of | Reachable interface or forwarding path |
Router ID operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Router ID | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches the 32-bit OSPF router identity used in protocol databases, neighbor relationships, LSA ownership and election tie-breaks design | Configuration differs from design/peer | Compare effective configuration |
| Control/security state | Stable expected neighbor/database/binding/election state | duplicate 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 ID | Inspect protocol/security detail and adjacent state |
| Forwarding | Expected Layer-2 or RIB/FIB/gateway path | Control state exists but traffic path disagrees | MAC/ARP/RIB/FIB/CEF proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or protection disabled | Regression test |