OSPF Routing Convergence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2013 05:41 PM - edited 03-07-2019 12:05 PM
I have 4 routers in area 0. Here’s the Link State database of each router.
#show ip ospf data
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1574 0x80000005 0x0055AA 1
2.2.2.2 2.2.2.2 1299 0x80000009 0x00E0D9 2
4.4.4.4 4.4.4.4 1380 0x80000008 0x002C64 2
5.5.5.5 5.5.5.5 1778 0x80000005 0x00DEEE 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.1.1.1 1.1.1.1 1574 0x80000004 0x0044D3
15.1.1.4 4.4.4.4 1380 0x80000006 0x0007F0
17.1.1.5 5.5.5.5 1778 0x80000004 0x004F97
12.1.1.0 15.1.1.0 17.1.1.0
R1---------------------------------R2--------------------------------------R4-----------------------------------R5
(RID 1.1.1.1) (RID 2.2.2.2) port down (RID 4.4.4.4) (RID 5.5.5.5)
After R2’s port is shut down, R4 floods LSA 15.1.1.0 with Max Age because R4 is the originator of this LSA. R5 removes network 15.1.1.0 from Link State database. R5 removes both 15.1.1.0 and 17.1.1.0 from Routing table.
Based on wireshark capture, R2 did not flood LSA 15.1.1.0 with Max Age. R1 removed 15.1.1.0 and 17.1.1.0 from Routing table, and R1 keeps these 2 networks in Link State database. This is by design.
My 1st question is how does R1 know these 2 networks are disconnected? R1 will remove these 2 networks once they increments to MaxAge in Link State database. My 2nd questions is the design will make more sense if R1 removes these 2 networks from Link State database when R1 is removing them from Routing table.
R1:
debug ip packet
debug ip routing
*Mar 6 11:09:01.281: RT: del 17.1.1.0/24 via 12.1.1.2, ospf metric [110/21]
*Mar 6 11:09:01.281: RT: delete subnet route to 17.1.1.0/24
*Mar 6 11:09:01.281: RT: delete network route to 17.0.0.0
*Mar 6 11:09:01.281: RT: del 15.1.1.0/24 via 12.1.1.2, ospf metric [110/11]
*Mar 6 11:09:01.281: RT: delete subnet route to 15.1.1.0/24
*Mar 6 11:09:01.281: RT: delete network route to 15.0.0.0
thx,
Jingyi
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2013 01:35 AM
Hello Jingyi,
First of all, the LSA 15.1.1.0 you are writing about is in fact LSA-2 15.1.1.4 - we have to be very precise about this.
My 1st question is how does R1 know these 2 networks are disconnected?
It is because R2 will flood a new LSA-1 2.2.2.2 in which it will no longer advertise a link to the LSA-2 15.1.1.4 that represents the multiaccess network between R2 and R4. When R1 runs its SPF algorithm, it will discover that there is no link from R2 to the remainder of the network - it becomes unreachable, and the corresponding IP prefixes will be flushed from the routing table.
R1 will remove these 2 networks once they increments to MaxAge in Link State database
No. The networks from the routing table will be removed immediately after R1 receives the updated LSA-1 2.2.2.2 from R2 and runs its SPF. The LSAs that describe routers and networks in the disconnected topology will, however, remain in the link state database until they expire.
In OSPF, it is not allowed to modify or prematurely flush an LSA originated by another router. A router can always modify or flush only those LSAs it has originated itself. Therefore, even if the routers R4 and R5 become unreachable, R1 must not flush their LSAs from the link state database prematurely. This is a paradigm that absolutely must be upheld by all routers running OSPF - that foreign LSAs are intangible.
One of the reasons is the continuity in sequencing the LSAs - as you know, when two LSAs of the same type and Link State ID arrive to a router, the newer one is determined by the higher sequence number. If a router was rebooted after a prolonged uptime, it would start originating its LSAs with the sequence number set to the initial lowmost value but these would be considered obsolete by the remaining routers because they already store newer LSAs with higher sequence numbers from this rebooted router. In fact, no router would pay attention to this rebooted router for up to 3600 seconds. What really happens here is that if the router is rebooted and floods its LSAs with a lower sequence number, its neighbors will reply to this router by their own copies of the corresponding LSAs having higher sequence numbers. As a result, the rebooted router will catch on its own sequencing (where it left before the restart) and will continue from there - reissue the LSAs with the sequence number taken from its former LSAs incremented by one.
My 2nd questions is the design will make more sense if R1 removes these 2 networks from Link State database when R1 is removing them from Routing table.
No, it would not - see the explanation about the router restart above.
Feel welcome to ask further!
Best regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2013 02:10 AM
Peter,
As usual a brilliant explanation from an expert 5 stars to you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2016 01:21 PM
Hi Peter,
I hope you are doing fine.
My understanding is if the owner of LSA is rebooted, OWNER will flood OSPF's domain with all LSA it has generated with MAX age set to 3600 ( SEC), which forces all OSPF routers to flush those LSA from the database.
This ensures only fresh info is maintained in OSPF database and the OWNER is the who can best decides what is the fresh info or what is stale info.
Thoughts?
I have learned a lot from you . Giuseppe, Reza Sharif over the years on this forum and I am very grateful for it.
Have a nice day!!
