(RID 188.8.131.52) (RID 184.108.40.206) port down (RID 220.127.116.11) (RID 18.104.22.168)
After R2’s port is shut down, R4 floods LSA 22.214.171.124 with Max Age because R4 is the originator of this LSA. R5 removes network 126.96.36.199 from Link State database. R5 removes both 188.8.131.52 and 184.108.40.206 from Routing table.
Based on wireshark capture, R2 did not flood LSA 220.127.116.11 with Max Age. R1 removed 18.104.22.168 and 22.214.171.124 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.
debug ip packet
debug ip routing
*Mar 6 11:09:01.281: RT: del 126.96.36.199/24 via 188.8.131.52, ospf metric [110/21]
*Mar 6 11:09:01.281: RT: delete subnet route to 184.108.40.206/24
*Mar 6 11:09:01.281: RT: delete network route to 220.127.116.11
*Mar 6 11:09:01.281: RT: del 18.104.22.168/24 via 22.214.171.124, ospf metric [110/11]
*Mar 6 11:09:01.281: RT: delete subnet route to 126.96.36.199/24
*Mar 6 11:09:01.281: RT: delete network route to 188.8.131.52
First of all, the LSA 184.108.40.206 you are writing about is in fact LSA-2 220.127.116.11 - 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 18.104.22.168 in which it will no longer advertise a link to the LSA-2 22.214.171.124 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 126.96.36.199 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.
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.
I have learned a lot from you . Giuseppe, Reza Sharif over the years on this forum and I am very grateful for it.