01-23-2025 06:31 AM
R7(RID:7.7.7.7) is the DR and R9(RID:9.9.9.9) is the BDR. R8(RID:8.8.8.8 IS DROTHER)
This is what I have when I issue "show ip ospf database network".
When I shut down the interface of the DR router(R7), R9 became the new DR.
In the OSPF database, I see two network LSAs(One from the new DR and old one).
----------------------------------------------------------------------------------------------------------------R9#show ip ospf database network
OSPF Router with ID (9.9.9.9) (Process ID 1)
Net Link States (Area 0)
LS age: 154
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 20.1.0.1 (address of Designated Router)
Advertising Router: 7.7.7.7
LS Seq Number: 80000004
Checksum: 0x8818
Length: 36
Network Mask: /24
Attached Router: 7.7.7.7
Attached Router: 8.8.8.8
Attached Router: 9.9.9.9
LS age: 22
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 20.1.0.2 (address of Designated Router)
Advertising Router: 9.9.9.9
LS Seq Number: 80000001
Checksum: 0x308A
Length: 32
Network Mask: /24
Attached Router: 9.9.9.9
Attached Router: 8.8.8.8
-------------------------------------------------------------------------
My questions for the experts here
1) Does the old network LSA go away after the expiry time?
2) How does the router know which network LSA to use amongst those two LSAs?
Solved! Go to Solution.
01-23-2025 07:33 AM
Hello @Paheeradan Nagulan
No, the router will not use the old stale network LSA, even though it has a higher sequence number, because the two LSAs in your output represent different Link State id, which correspond to different DRs. In OSPF, the sequence number is only relevant when comparing LSAs that share the same Link State ID and Advertising Router. In your case, the old LSA is associated with Link State ID: 20.1.0.1, which represents the old DR (R7). The new LSA is associated with Link State ID: 20.1.0.2, which represents the new DR (R9).
Since these LSAs have different LSIDs, they are treated as separate entities and do not compete directly based on their sequence numbers.
When OSPF routers process LSAs, they select the most relevant LSA for routing calculations. The LSA associated with the current active DR (R9) will be used because it reflects the accurate and up-to-date state of the network. The old LSA, while still present in the database, is effectively ignored for routing purposes since the DR (R7) is no longer operational. It remains in the database until it ages out (after reaching its MaxAge of 3600 seconds) or is explicitly flushed.
01-23-2025 06:34 AM
You need to wait
Lsa age when it end the router will delete old lsa from Database
MHM
01-23-2025 06:47 AM
You can faster the process with
Clear ip ospf
This will clese all old lsa
MHM
01-23-2025 06:50 AM
Got it. That makes sense! Thanks!
01-23-2025 06:45 AM
Hello @Paheeradan Nagulan
Yes, the old network LSA will eventually disappear after its lifetime expires. Each LSA in OSPF has a predefined lifetime, typically 3600 seconds (1 hour). When the DR (R7) interface is shut down, the router stops refreshing its network LSA. Without periodic refreshes, the LSA will gradually age out in the OSPF database and be removed. Additionally, OSPF routers monitor LSAs, and if an LSA exceeds its maximum age (MaxAge), it is purged from the database. The old LSA may also be explicitly flushed if the originating router (R7) sends an updated LSA with the MaxAge value to ensure its removal from the network.
When there are multiple network LSAs for the same subnet, OSPF routers use specific rules to determine which LSA to use. OSPF relies on the advertising router's status and sequence number to make a decision. Routers prefer LSAs with a higher sequence number as they indicate the most recent information. In your scenario, the new DR (R9) advertises its network LSA with a higher sequence number, making it the preferred LSA. Once selected, this updated LSA is used for path computation and SPF calculations. The older LSA remains in the database until it ages out, but it is not used for routing decisions since it is considered stale.
01-23-2025 06:52 AM
Thanks. That makes sense. In my output,
The OLD network LSA has a higher Sequence number than the new LSA. Does that mean the router is going to use the old stale network LSA?
----------
OLD
LS age: 2923
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 20.1.0.1 (address of Designated Router)
Advertising Router: 7.7.7.7
LS Seq Number: 80000004
Checksum: 0x8818
Length: 36
Network Mask: /24
Attached Router: 7.7.7.7
Attached Router: 8.8.8.8
Attached Router: 9.9.9.9
NEW
LS age: 783
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 20.1.0.2 (address of Designated Router)
Advertising Router: 9.9.9.9
LS Seq Number: 80000002
Checksum: 0x2E8B
Length: 32
Network Mask: /24
Attached Router: 9.9.9.9
Attached Router: 8.8.8.8
01-23-2025 07:33 AM
Hello @Paheeradan Nagulan
No, the router will not use the old stale network LSA, even though it has a higher sequence number, because the two LSAs in your output represent different Link State id, which correspond to different DRs. In OSPF, the sequence number is only relevant when comparing LSAs that share the same Link State ID and Advertising Router. In your case, the old LSA is associated with Link State ID: 20.1.0.1, which represents the old DR (R7). The new LSA is associated with Link State ID: 20.1.0.2, which represents the new DR (R9).
Since these LSAs have different LSIDs, they are treated as separate entities and do not compete directly based on their sequence numbers.
When OSPF routers process LSAs, they select the most relevant LSA for routing calculations. The LSA associated with the current active DR (R9) will be used because it reflects the accurate and up-to-date state of the network. The old LSA, while still present in the database, is effectively ignored for routing purposes since the DR (R7) is no longer operational. It remains in the database until it ages out (after reaching its MaxAge of 3600 seconds) or is explicitly flushed.
01-23-2025 07:40 AM
Hello M02@rt37 , Understood. Thanks for the detailed explanation. I really appreciate it!
01-23-2025 07:52 AM
Check my answer above
MHM
01-23-2025 07:52 AM - edited 01-23-2025 10:00 AM
You are correct' the seq is matter here'
The router will use the new one.
Link state must compare with mask
Both have mask /24 so host part of link state is not calculate.
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide