↓ Skip to main content
  1. Network Articles/
  2. OSPF Articles/

OSPF Behavior When Router IDs Collide

Table of Contents

What happens when two routers share a router ID

An OSPF router ID has to be unique within the AS (RFC 2328 §1.2, Appendix C.1). How it is chosen and when it changes is covered in OSPF Router ID.

How things break depends on whether the two routers are directly connected. So does how you notice, and how hard it is to track down.

Where the duplicates sitDoes the router notice?What happens
Adjacent (next to each other)Yes. %ROUTING-OSPF-3-DUP_RTRID appears in syslogThe adjacency on that link never forms
Non-adjacent (at least one router between)No. Nothing is loggedAdjacencies stay healthy, but a prefix disappears from the routing table

The reason is that two different things carry the router ID, and they travel different distances.

Hellos reach the next router; LSAs flood the whole domain

How duplicates happen

A router ID is either configured by hand or chosen by the router. Both routes lead to duplicates.

  • A copied configuration. A new router is built from an existing one’s configuration and router-id is never changed
  • A moved loopback. Automatic selection usually takes a loopback address, so putting an address that another router was using on a loopback duplicates the router ID with it
  • A device swap. A decommissioned router’s loopback is carried over to its replacement while the old one is still running

None of these are visible from one side alone. With a non-adjacent duplicate, nothing is logged even on the two routers that collide.

Adjacent duplicates are detected

A Hello carries the router ID of its sender. If a Hello arrives carrying your own router ID, the sender is claiming to be you. IOS XR detects that, logs it, and never brings up the adjacency with that neighbor.

This behavior is not mandated by the RFC. RFC 2328 says nothing about what to do when a duplicate is detected; it is up to the implementation.

Non-adjacent duplicates go unnoticed

Hellos are never forwarded. They only reach the other end of the same link, so with even one router in between, the two duplicates never see each other’s Hellos. Nothing is logged.

What breaks is the link state database. An LSA is identified by the tuple of LS type, Link State ID and Advertising Router, and the database can hold only one instance of that tuple (RFC 2328 §12.1, §13). The Advertising Router of a Router-LSA is that router’s router ID, so the Router-LSAs of two routers sharing an ID are treated as the same LSA, and one overwrites the other.

The link information of the overwritten router disappears from the domain. Any prefix that only that router advertised — a loopback, typically — becomes unreachable from everywhere.

RFC 2328 §13.4 does say that a router receiving an LSA with its own router ID, newer than the last instance it originated, must advance the sequence number and originate a new instance. That would make the two escalate against each other, but this test never observed it (shown below: the sequence number stayed at 80000005 for five minutes while only the LS age moved from 1075 to 1676).

The route disappears before the adjacency goes down

When a router ID changes, IOS XR flushes the self-originated LSAs of the old router ID with MaxAge (3600 seconds) and then re-originates under the new one — the behavior RFC 2328 Appendix C.1 asks for.

So the database changes essentially at the same moment as the configuration. The adjacency, on the other hand, only goes down when the dead interval expires. The database breaks first and the adjacency follows. These are two different durations and have to be measured separately.

Test topology

Four IOS XR routers (XRd 26.1.1) in a line. Every link is point-to-point, cost 1, in area 0, and Loopback0 carries the same address as the router ID. R1’s router ID is never changed. Setting R2 to 1.1.1.1 produces an adjacent duplicate; setting R3 to 1.1.1.1 produces a non-adjacent one.

Duplicate OSPF router ID test topology
RouterManagement IPRouter IDRole
R110.19.3.661.1.1.1The router being duplicated. Its ID never changes
R210.19.3.672.2.2.2Set to 1.1.1.1 for the adjacent duplicate
R310.19.3.683.3.3.3Set to 1.1.1.1 for the non-adjacent duplicate
R410.19.3.694.4.4.4The observation point, never reconfigured

The test runs in six steps.

|STEP|Operation|What it shows| |0|Initial state (all four router IDs unique)|R4 reaches 1.1.1.1. There are four Router-LSAs| |1|Set R3’s router ID to 1.1.1.1 (non-adjacent duplicate)|No DUP_RTRID. R2 shows the same Neighbor ID twice and 1.1.1.1/32 disappears from R4| |2|No change (collected again five minutes later)|The sequence number has not moved, so no escalation is happening| |3|Set R3’s router ID back to 3.3.3.3|Recovery| |4|Set R2’s router ID to 1.1.1.1 (adjacent duplicate)|DUP_RTRID appears on both ends and R1 is left with zero neighbors| |5|Set R2’s router ID back to 2.2.2.2 (final state)|Recovery|

The ping that measures the outage runs from R4. Opening a second SSH session to a router that is being configured gets cut during the key exchange and makes only the configuration push fail silently, so the observation point is a router that no step touches.

The non-adjacent duplicate (STEP 1 and 2)

R3’s router ID is set to 1.1.1.1, the same as R1’s. R2 sits between them, so they are not directly connected.

STEP 1: set R3's router ID to 1.1.1.1
RP/0/RP0/CPU0:R3#show configuration commit changes last 1
Sun Oct  4 07:35:58.317 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router ospf 1
 router-id 1.1.1.1
!
end

From that commit onward, the source router ID in the Hellos R3 sends is 1.1.1.1.

STEP 1: source router ID of every Hello R3 sent over R2 - R3
2026-10-04T16:35:49.423534000+0900	3.3.3.3
2026-10-04T16:35:57.484474000+0900	1.1.1.1
2026-10-04T16:36:07.310177000+0900	1.1.1.1
2026-10-04T16:36:17.096025000+0900	1.1.1.1
2026-10-04T16:36:26.852953000+0900	1.1.1.1
2026-10-04T16:36:36.269512000+0900	1.1.1.1
2026-10-04T16:36:45.537587000+0900	1.1.1.1
2026-10-04T16:36:55.412025000+0900	1.1.1.1
2026-10-04T16:37:05.284527000+0900	1.1.1.1
2026-10-04T16:37:14.892085000+0900	1.1.1.1
2026-10-04T16:37:24.487593000+0900	1.1.1.1
2026-10-04T16:37:33.940956000+0900	1.1.1.1
2026-10-04T16:37:43.746264000+0900	1.1.1.1
2026-10-04T16:37:52.751657000+0900	1.1.1.1
2026-10-04T16:38:02.117694000+0900	1.1.1.1
2026-10-04T16:38:12.112898000+0900	1.1.1.1
2026-10-04T16:38:22.010363000+0900	1.1.1.1
2026-10-04T16:38:32.007094000+0900	1.1.1.1
2026-10-04T16:38:41.550484000+0900	1.1.1.1
2026-10-04T16:38:51.407694000+0900	1.1.1.1
2026-10-04T16:39:01.020104000+0900	1.1.1.1
2026-10-04T16:39:10.856573000+0900	1.1.1.1
2026-10-04T16:39:20.656685000+0900	1.1.1.1
2026-10-04T16:39:30.172935000+0900	1.1.1.1
2026-10-04T16:39:39.600403000+0900	1.1.1.1
2026-10-04T16:39:48.614523000+0900	1.1.1.1
2026-10-04T16:39:58.074098000+0900	1.1.1.1
2026-10-04T16:40:07.297057000+0900	1.1.1.1
2026-10-04T16:40:16.453573000+0900	1.1.1.1
2026-10-04T16:40:25.850353000+0900	1.1.1.1
2026-10-04T16:40:35.784673000+0900	1.1.1.1
2026-10-04T16:40:45.647488000+0900	1.1.1.1
2026-10-04T16:40:55.026390000+0900	1.1.1.1
2026-10-04T16:41:04.238121000+0900	1.1.1.1
2026-10-04T16:41:13.618342000+0900	1.1.1.1
2026-10-04T16:41:22.668012000+0900	1.1.1.1
2026-10-04T16:41:31.957462000+0900	1.1.1.1
2026-10-04T16:41:41.026920000+0900	1.1.1.1
2026-10-04T16:41:50.951032000+0900	1.1.1.1
2026-10-04T16:42:00.678712000+0900	1.1.1.1
2026-10-04T16:42:10.478377000+0900	1.1.1.1
2026-10-04T16:42:19.629626000+0900	1.1.1.1
2026-10-04T16:42:28.674133000+0900	1.1.1.1
2026-10-04T16:42:37.727899000+0900	1.1.1.1
2026-10-04T16:42:47.058305000+0900	1.1.1.1
2026-10-04T16:42:56.832617000+0900	1.1.1.1
2026-10-04T16:43:05.904306000+0900	1.1.1.1
2026-10-04T16:43:15.292478000+0900	1.1.1.1
2026-10-04T16:43:24.853099000+0900	1.1.1.1
2026-10-04T16:43:34.531342000+0900	1.1.1.1
2026-10-04T16:43:44.035074000+0900	1.1.1.1
2026-10-04T16:43:53.791159000+0900	1.1.1.1
2026-10-04T16:44:03.444978000+0900	1.1.1.1
2026-10-04T16:44:12.566563000+0900	1.1.1.1
2026-10-04T16:44:22.231932000+0900	1.1.1.1
2026-10-04T16:44:31.913449000+0900	1.1.1.1
2026-10-04T16:44:41.279111000+0900	1.1.1.1
2026-10-04T16:44:51.178141000+0900	1.1.1.1
2026-10-04T16:45:00.406619000+0900	1.1.1.1
2026-10-04T16:45:10.140573000+0900	1.1.1.1
2026-10-04T16:45:19.940915000+0900	1.1.1.1
2026-10-04T16:45:29.065335000+0900	1.1.1.1
2026-10-04T16:45:39.041694000+0900	1.1.1.1
2026-10-04T16:45:48.085635000+0900	1.1.1.1
2026-10-04T16:45:58.041657000+0900	1.1.1.1
2026-10-04T16:46:07.450754000+0900	1.1.1.1
2026-10-04T16:46:16.876595000+0900	1.1.1.1
2026-10-04T16:46:26.779897000+0900	1.1.1.1
2026-10-04T16:46:36.249501000+0900	1.1.1.1
2026-10-04T16:46:45.401109000+0900	1.1.1.1
2026-10-04T16:46:54.663258000+0900	1.1.1.1
2026-10-04T16:47:04.244936000+0900	1.1.1.1
2026-10-04T16:47:13.460051000+0900	1.1.1.1
2026-10-04T16:47:23.306518000+0900	1.1.1.1
2026-10-04T16:47:32.372573000+0900	1.1.1.1
2026-10-04T16:47:42.003859000+0900	1.1.1.1
2026-10-04T16:47:51.315111000+0900	1.1.1.1
2026-10-04T16:48:00.727738000+0900	1.1.1.1
2026-10-04T16:48:10.561063000+0900	1.1.1.1
2026-10-04T16:48:19.812548000+0900	1.1.1.1
2026-10-04T16:48:28.981246000+0900	1.1.1.1
2026-10-04T16:48:38.700556000+0900	1.1.1.1
2026-10-04T16:48:48.095126000+0900	1.1.1.1
2026-10-04T16:48:57.138199000+0900	1.1.1.1
2026-10-04T16:49:06.263352000+0900	1.1.1.1
2026-10-04T16:49:15.363430000+0900	1.1.1.1
2026-10-04T16:49:25.282485000+0900	1.1.1.1
2026-10-04T16:49:34.945380000+0900	1.1.1.1
2026-10-04T16:49:44.284645000+0900	1.1.1.1
2026-10-04T16:49:53.373025000+0900	1.1.1.1
2026-10-04T16:50:02.437164000+0900	1.1.1.1
2026-10-04T16:50:11.669362000+0900	1.1.1.1
2026-10-04T16:50:21.138873000+0900	1.1.1.1
2026-10-04T16:50:30.803502000+0900	1.1.1.1
2026-10-04T16:50:40.634412000+0900	1.1.1.1
2026-10-04T16:50:50.633949000+0900	1.1.1.1
2026-10-04T16:50:59.998715000+0900	1.1.1.1
2026-10-04T16:51:09.554903000+0900	1.1.1.1
2026-10-04T16:51:19.030636000+0900	1.1.1.1
2026-10-04T16:51:28.100038000+0900	1.1.1.1
2026-10-04T16:51:37.667345000+0900	1.1.1.1
2026-10-04T16:51:47.558492000+0900	1.1.1.1
2026-10-04T16:51:56.863024000+0900	1.1.1.1
2026-10-04T16:52:06.780594000+0900	1.1.1.1
2026-10-04T16:52:16.001958000+0900	1.1.1.1
2026-10-04T16:52:25.624606000+0900	1.1.1.1
2026-10-04T16:52:35.060857000+0900	1.1.1.1
2026-10-04T16:52:44.506562000+0900	1.1.1.1
2026-10-04T16:52:54.350931000+0900	1.1.1.1
2026-10-04T16:53:03.573772000+0900	1.1.1.1
2026-10-04T16:53:12.928084000+0900	1.1.1.1
2026-10-04T16:53:22.515443000+0900	1.1.1.1
2026-10-04T16:53:32.372901000+0900	1.1.1.1
2026-10-04T16:53:41.888862000+0900	1.1.1.1
2026-10-04T16:53:51.661093000+0900	1.1.1.1
2026-10-04T16:54:01.108695000+0900	1.1.1.1
2026-10-04T16:54:10.128943000+0900	1.1.1.1
2026-10-04T16:54:19.182326000+0900	1.1.1.1
2026-10-04T16:54:28.911205000+0900	1.1.1.1

At the same moment R3 withdraws the Router-LSA it had originated under the old router ID, by flooding it with LS Age 3600 (MaxAge).

STEP 1: the LSU with which R3 withdrew its old Router-LSA (No.101)
Open Shortest Path First
    OSPF Header
        Version: 2
        Message Type: LS Update (4)
        Packet Length: 112
        Source OSPF Router: 3.3.3.3
        Area ID: 0.0.0.0 (Backbone)
        Checksum: 0x84d9 [correct]
        Instance ID: Base IPv4 Unicast Instance (0)
        Auth Type: Null (0)
        Auth Data (none): 0000000000000000
    LS Update Packet
        Number of LSAs: 1
        LSA-type 1 (Router-LSA), len 84
            .000 1110 0001 0000 = LS Age (seconds): 3600
            0... .... .... .... = Do Not Age Flag: 0
            Options: 0x22, (DC) Demand Circuits, (E) External Routing
                0... .... = DN: Not set
                .0.. .... = (O) Opaque: Not set
                ..1. .... = (DC) Demand Circuits: Supported
                ...0 .... = (L) LLS Data block: Not Present
                .... 0... = (N) NSSA: Not supported
                .... .0.. = (MC) Multicast: Not capable
                .... ..1. = (E) External Routing: Capable
                .... ...0 = (MT) Multi-Topology Routing: No
            LS Type: Router-LSA (1)
            Link State ID: 3.3.3.3
            Advertising Router: 3.3.3.3
            Sequence Number: 0x80000004
            Checksum: 0x0111
            Length: 84
            Flags: 0x00
                0... .... = (H) Host: No
                ..0. .... = (S) Shortcut-capable ABR: No
                ...0 .... = (N) NSSA translation: No
                .... 0... = (W) Wild-card multicast receiver: No
                .... .0.. = (V) Virtual link endpoint: No
                .... ..0. = (E) AS boundary router: No
                .... ...0 = (B) Area border router: No
            Number of Links: 5
            Type: Stub     ID: 3.3.3.3         Data: 255.255.255.255 Metric: 1
                Link ID: 3.3.3.3 - IP network/subnet number
                Link Data: 255.255.255.255
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: PTP      ID: 2.2.2.2         Data: 10.0.23.3       Metric: 1
                Link ID: 2.2.2.2 - Neighboring router's Router ID
                Link Data: 10.0.23.3
                Link Type: 1 - Point-to-point connection to another router
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: Stub     ID: 10.0.23.0       Data: 255.255.255.0   Metric: 1
                Link ID: 10.0.23.0 - IP network/subnet number
                Link Data: 255.255.255.0
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: PTP      ID: 4.4.4.4         Data: 10.0.34.3       Metric: 1
                Link ID: 4.4.4.4 - Neighboring router's Router ID
                Link Data: 10.0.34.3
                Link Type: 1 - Point-to-point connection to another router
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: Stub     ID: 10.0.34.0       Data: 255.255.255.0   Metric: 1
                Link ID: 10.0.34.0 - IP network/subnet number
                Link Data: 255.255.255.0
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
Download the pcap of the packet in the tshark output above (No.101 LSU)

It then re-originates a Router-LSA under the new router ID 1.1.1.1. An LSA describing R3’s five links goes out with the same Advertising Router: 1.1.1.1 that R1 uses.

STEP 1: the Router-LSA R3 originated under its new router ID (No.116)
Open Shortest Path First
    OSPF Header
        Version: 2
        Message Type: LS Update (4)
        Packet Length: 112
        Source OSPF Router: 1.1.1.1
        Area ID: 0.0.0.0 (Backbone)
        Checksum: 0x087b [correct]
        Instance ID: Base IPv4 Unicast Instance (0)
        Auth Type: Null (0)
        Auth Data (none): 0000000000000000
    LS Update Packet
        Number of LSAs: 1
        LSA-type 1 (Router-LSA), len 84
            .000 0000 0000 0001 = LS Age (seconds): 1
            0... .... .... .... = Do Not Age Flag: 0
            Options: 0x22, (DC) Demand Circuits, (E) External Routing
                0... .... = DN: Not set
                .0.. .... = (O) Opaque: Not set
                ..1. .... = (DC) Demand Circuits: Supported
                ...0 .... = (L) LLS Data block: Not Present
                .... 0... = (N) NSSA: Not supported
                .... .0.. = (MC) Multicast: Not capable
                .... ..1. = (E) External Routing: Capable
                .... ...0 = (MT) Multi-Topology Routing: No
            LS Type: Router-LSA (1)
            Link State ID: 1.1.1.1
            Advertising Router: 1.1.1.1
            Sequence Number: 0x80000005
            Checksum: 0x9789
            Length: 84
            Flags: 0x00
                0... .... = (H) Host: No
                ..0. .... = (S) Shortcut-capable ABR: No
                ...0 .... = (N) NSSA translation: No
                .... 0... = (W) Wild-card multicast receiver: No
                .... .0.. = (V) Virtual link endpoint: No
                .... ..0. = (E) AS boundary router: No
                .... ...0 = (B) Area border router: No
            Number of Links: 5
            Type: Stub     ID: 3.3.3.3         Data: 255.255.255.255 Metric: 1
                Link ID: 3.3.3.3 - IP network/subnet number
                Link Data: 255.255.255.255
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: PTP      ID: 2.2.2.2         Data: 10.0.23.3       Metric: 1
                Link ID: 2.2.2.2 - Neighboring router's Router ID
                Link Data: 10.0.23.3
                Link Type: 1 - Point-to-point connection to another router
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: Stub     ID: 10.0.23.0       Data: 255.255.255.0   Metric: 1
                Link ID: 10.0.23.0 - IP network/subnet number
                Link Data: 255.255.255.0
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: PTP      ID: 4.4.4.4         Data: 10.0.34.3       Metric: 1
                Link ID: 4.4.4.4 - Neighboring router's Router ID
                Link Data: 10.0.34.3
                Link Type: 1 - Point-to-point connection to another router
                Number of Metrics: 0 - TOS
                0 Metric: 1
            Type: Stub     ID: 10.0.34.0       Data: 255.255.255.0   Metric: 1
                Link ID: 10.0.34.0 - IP network/subnet number
                Link Data: 255.255.255.0
                Link Type: 3 - Connection to a stub network
                Number of Metrics: 0 - TOS
                0 Metric: 1
Download the pcap of the packet in the tshark output above (No.116 LSU)

This is where a non-adjacent duplicate gets confusing. R1 and R3 each keep the instance they originated themselves.

STEP 1: show ospf database router self-originate on R1
RP/0/RP0/CPU0:R1#show ospf database router self-originate
Sun Oct  4 07:52:13.297 UTC


            OSPF Router with ID (1.1.1.1) (Process ID 1)

		Router Link States (Area 0)

  LS age: 1506
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000003
  Checksum: 0x7955
  Length: 60
   Number of Links: 3

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.0.12.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.12.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
STEP 1: show ospf database router self-originate on R3
RP/0/RP0/CPU0:R3#show ospf database router self-originate
Sun Oct  4 07:53:28.428 UTC


            OSPF Router with ID (1.1.1.1) (Process ID 1)

		Router Link States (Area 0)

  LS age: 1042
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000005
  Checksum: 0x9789
  Length: 84
   Number of Links: 5

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 3.3.3.3
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.0.23.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.23.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 4.4.4.4
     (Link Data) Router Interface address: 10.0.34.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.34.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

The surrounding routers hold only R3’s instance. Looking at the 1.1.1.1 Router-LSA in R4’s database, the contents are R3’s links (the 3.3.3.3 stub and the point-to-point links to R2 and R4); R1’s links are nowhere to be found.

STEP 1: show ospf database router on R4 (the 1.1.1.1 part)
  LS age: 1075
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000005
  Checksum: 0x9789
  Length: 84
   Number of Links: 5

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 3.3.3.3
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.0.23.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.23.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 4.4.4.4
     (Link Data) Router Interface address: 10.0.34.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.34.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

The sequence number stays at 80000005. Five minutes later, in STEP 2, it is still 80000005 with only the LS age moving from 1075 to 1676. RFC 2328 §13.4’s “advance the sequence number when you receive something newer than your own instance” is not happening here. This is not an escalation; one router’s topology has simply vanished.

Why R1 never took R3’s instance was not determined by this test. Nothing relevant appears in R1’s syslog or trace, and R1’s database still held its own instance (80000003). R2 holding the same Neighbor ID 1.1.1.1 on both of its interfaces may be involved, but that was not verified. What this shows is only that the surrounding routers keep one instance and the other router’s link information disappears.

Which one survives depends on the situation. LSA recency is compared by sequence number, so which side wins depends on which originated later. Here R3’s instance (80000005) was newer than R1’s (80000003), so R1’s link information is what disappeared. Which loopback becomes unreachable changes the same way, so when narrowing down from the symptom, look for both routers claiming the ID, not just the one that disappeared.

The clue that reveals a duplicate is the neighbor table of the router in between. R2’s Gi0/0/0/0 and Gi0/0/0/1 both list the same Neighbor ID 1.1.1.1.

STEP 1: show ospf neighbor on R2
RP/0/RP0/CPU0:R2#show ospf neighbor
Sun Oct  4 07:52:43.234 UTC

* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up

Neighbors for OSPF 1

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1         1     FULL/  -        00:00:31    10.0.12.1       GigabitEthernet0/0/0/0
    Neighbor is up for 00:25:36
1.1.1.1         1     FULL/  -        00:00:31    10.0.23.3       GigabitEthernet0/0/0/1
    Neighbor is up for 00:16:36

Total neighbor count: 2

In the routing table, only the overwritten side disappears. From R4, R1’s loopback 1.1.1.1/32 is gone. The R1 - R2 link 10.0.12.0/24 survives because R2’s LSA also describes it, and 3.3.3.3/32 survives because it is a stub inside R3’s LSA (the one now advertised as 1.1.1.1).

STEP 1: show route ospf on R4 (no 1.1.1.1/32)
RP/0/RP0/CPU0:R4#show route ospf
Sun Oct  4 07:53:55.310 UTC

O    2.2.2.2/32 [110/3] via 10.0.34.3, 00:17:47, GigabitEthernet0/0/0/0
O    3.3.3.3/32 [110/2] via 10.0.34.3, 00:17:48, GigabitEthernet0/0/0/0
O    10.0.12.0/24 [110/3] via 10.0.34.3, 00:17:47, GigabitEthernet0/0/0/0
O    10.0.23.0/24 [110/2] via 10.0.34.3, 00:17:48, GigabitEthernet0/0/0/0

The adjacent duplicate (STEP 4)

R2’s router ID is set to 1.1.1.1. R1 and R2 are directly connected, so this one the routers notice.

STEP 4: set R2's router ID to 1.1.1.1
RP/0/RP0/CPU0:R2#show configuration commit changes last 1
Sun Oct  4 08:12:02.713 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router ospf 1
 router-id 1.1.1.1
!
end

%ROUTING-OSPF-3-DUP_RTRID appears in R1’s syslog. It records which interface the packets with the same ID arrived on and from which address. It repeats roughly every 20 seconds, so it is hard to miss.

STEP 4: syslog on R1, from detection to the adjacency going down
RP/0/RP0/CPU0:Oct  4 08:12:01.985 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.2 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:12:21.533 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.2 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:12:40.770 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.2 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:12:41.971 UTC: ospf[1035]: %ROUTING-OSPF-5-ADJCHG : Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0/0/0 in area 0 from FULL to DOWN, Neighbor Down: dead timer expired, vrf default vrfid 0x60000000 

The same log appears on the other end. From R2’s point of view, R1 is the one claiming its ID.

STEP 4: syslog on R2 (first occurrence)
RP/0/RP0/CPU0:Oct  4 08:12:06.919 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:12:11.893 UTC: ospf[1035]: %ROUTING-OSPF-5-ADJCHG : Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0/0/1 in area 0 from LOADING to FULL, Loading Done, vrf default vrfid 0x60000000 
RP/0/RP0/CPU0:Oct  4 08:12:25.398 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:12:44.274 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:13:03.424 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:13:22.210 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:13:41.235 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:14:00.357 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:14:20.133 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:14:39.677 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:14:58.824 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:15:17.524 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:15:37.423 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:15:56.385 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:16:15.752 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:16:34.654 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:16:54.056 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:17:12.815 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:17:32.043 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:17:50.560 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:18:09.722 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:18:29.060 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:18:48.772 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:19:07.521 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:19:26.227 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:19:45.845 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:20:05.425 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:20:24.462 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:20:42.958 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:21:01.759 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:21:21.356 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:21:39.861 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:21:59.130 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:22:17.940 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:22:36.662 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:22:56.228 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:23:15.143 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:23:34.972 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:23:53.608 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:24:12.650 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:24:30.935 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:24:50.261 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:09.729 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:28.514 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:41.684 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12356]: Accepted authentication/pam for cisco from 10.20.1.1 port 46786 ssh2 
RP/0/RP0/CPU0:Oct  4 08:25:44.970 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12361]: Received disconnect from 10.20.1.1 port 46786:11: disconnected by user 
RP/0/RP0/CPU0:Oct  4 08:25:44.970 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12361]: Disconnected from user cisco 10.20.1.1 port 46786 
RP/0/RP0/CPU0:Oct  4 08:25:46.825 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:53.770 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12421]: Accepted authentication/pam for cisco from 10.20.1.1 port 45420 ssh2 
RP/0/RP0/CPU0:Oct  4 08:25:56.095 UTC: logger[65723]: %OS-SYSLOG-6-LOG_INFO : informational STEP4-CLEAR: clear counters interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:56.364 UTC: statsd_manager_l[244]: %MGBL-IFSTATS-6-CLEAR_COUNTERS : Clear counters on GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:25:56.483 UTC: logger[65730]: %OS-SYSLOG-6-LOG_INFO : informational STEP4-CLEAR: clear ospf statistics 
RP/0/RP0/CPU0:Oct  4 08:25:56.789 UTC: logger[65736]: %OS-SYSLOG-6-LOG_INFO : informational STEP4-CLEAR: clear counters interface GigabitEthernet0/0/0/1 
RP/0/RP0/CPU0:Oct  4 08:25:57.060 UTC: statsd_manager_l[244]: %MGBL-IFSTATS-6-CLEAR_COUNTERS : Clear counters on GigabitEthernet0/0/0/1 
RP/0/RP0/CPU0:Oct  4 08:25:57.672 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12426]: Received disconnect from 10.20.1.1 port 45420:11: disconnected by user 
RP/0/RP0/CPU0:Oct  4 08:25:57.672 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12426]: Disconnected from user cisco 10.20.1.1 port 45420 
RP/0/RP0/CPU0:Oct  4 08:26:05.650 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:26:24.830 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:26:44.047 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:27:02.785 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:27:21.630 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:27:40.182 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:27:59.659 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:28:18.754 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:28:37.739 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 
RP/0/RP0/CPU0:Oct  4 08:28:39.641 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[12688]: Accepted authentication/pam for cisco from 10.20.1.1 port 56560 ssh2 
RP/0/RP0/CPU0:Oct  4 08:28:57.475 UTC: ospf[1035]: %ROUTING-OSPF-3-DUP_RTRID : OSPF detected duplicate router-id 1.1.1.1 from 10.0.12.1 on interface GigabitEthernet0/0/0/0 

The adjacency never forms. R1’s neighbor table ends up empty, while R2 keeps only its single adjacency with R3 (R2 - R3 is not duplicated, so it is unaffected).

STEP 4: show ospf neighbor on R1
RP/0/RP0/CPU0:R1#show ospf neighbor
Sun Oct  4 08:28:06.212 UTC
STEP 4: show ospf neighbor on R2
RP/0/RP0/CPU0:R2#show ospf neighbor
Sun Oct  4 08:28:46.866 UTC

* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up

Neighbors for OSPF 1

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3         1     FULL/  -        00:00:38    10.0.23.3       GigabitEthernet0/0/0/1
    Neighbor is up for 00:16:35

Total neighbor count: 1

Traffic stops four to five seconds after the change

The outage was measured by starting a ping from R4 to 1.1.1.1 before changing anything, at 100 ms intervals. Measuring after convergence cannot span the moment of the change.

STEPPackets answeredFirst lossAfterwards
1 (non-adjacent duplicate)494.9 s innever recovers
3 (recovery)—2.0 s of loss at the startall 880 remaining answered
4 (adjacent duplicate)444.4 s innever recovers
5 (recovery)—2.0 s of loss at the startall 880 remaining answered

With either kind of duplicate, traffic stops four to five seconds after the configuration change. R1 lost its adjacency in the adjacent case at the dead timer expired timestamp, which is about 40 seconds after traffic had already stopped. The order — database first, adjacency afterwards — shows up as that gap in the timestamps.

Recovery took about two seconds in both cases, with nothing more than putting router-id back. No process restart is needed.

Configuration and show output from the test

Every step was collected from all four routers, split by router and by kind. The configuration under test is the ..._run.txt (the final state is the one from STEP 5).

FileContents
..._show.txtThe show set (show version / show interface description / show route / show route ospf / show ospf / show ospf interface / show ospf neighbor / show ospf database / show ospf database router / show router-id / show route 1.1.1.1/32 and more)
..._log.txtshow logging limited to that step. A marker is written with logmsg at the start of each step and its timestamp is passed to show logging start
..._run.txtshow running-config at that step (that is, the configuration under test)
..._ping.txtping and traceroute for that step, after convergence
..._trace.txtshow ospf trace events / errors
..._clear.txtA record of the counters cleared before collecting
..._commit.cfgOnly what was actually committed in that step (show configuration commit changes last 1), for the routers that were changed
..._outage.txtA ping that spans the configuration change (100 ms intervals), started before the change

STEP 0: Initial state (all four router IDs unique)

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclear——
R3showlogrun—traceclear——
R4showlogrunpingtraceclear——

STEP 1: Set R3’s router ID to 1.1.1.1 (non-adjacent duplicate)

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclear——
R3showlogrun—traceclearcommit—
R4showlogrunpingtraceclear—outage

STEP 2: No change (collected again five minutes later)

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclear——
R3showlogrun—traceclear——
R4showlogrunpingtraceclear——

STEP 3: Set R3’s router ID back to 3.3.3.3

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclear——
R3showlogrun—traceclearcommit—
R4showlogrunpingtraceclear—outage

STEP 4: Set R2’s router ID to 1.1.1.1 (adjacent duplicate)

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclearcommit—
R3showlogrun—traceclear——
R4showlogrunpingtraceclear—outage

STEP 5: Set R2’s router ID back to 2.2.2.2 (final state) (final state)

Routershowsyslogrunning-configpingtraceclearcommitoutage
R1showlogrunpingtraceclear——
R2showlogrun—traceclearcommit—
R3showlogrun—traceclear——
R4showlogrunpingtraceclear—outage

Packet captures were taken per step on three segments.

STEPR1-R2R2-R3R3-R4
0pcappcappcap
1pcappcappcap
2pcappcappcap
3pcappcappcap
4pcappcappcap
5pcappcappcap

Design notes

  • A non-adjacent duplicate is not logged. The adjacencies look healthy, so it shows up as “one particular loopback is unreachable.” When exactly one route is missing, check whether the router in between lists the same Neighbor ID twice
  • An adjacent duplicate is logged. %ROUTING-OSPF-3-DUP_RTRID includes the neighbor’s address and the interface, which identifies the other router directly
  • A router ID is also an advertised address. In designs where a loopback address is used as the router ID, a duplicate breaks the reachability of that loopback itself
  • Fixing it is just putting the router ID back (about two seconds in this test). But if a device is powered off without flushing the LSAs it originated under the old router ID, those LSAs stay until MaxAge (RFC 2328 Appendix C.1)

References

RFCTitleSummary
RFC 2328OSPF Version 2The router ID being unique within the AS (§1.2, Appendix C.1), how an LSA is identified and installed in the database (§12.1, §13), what to do on receiving a self-originated LSA (§13.4), and flushing self-originated LSAs before changing the router ID (Appendix C.1).

Related articles