OSPF link failure handling:
Router LSA : When a link fails, the connected OSPF routers send an updated LSA which omits the now shutdown link from it’s list of connected links. This new LSA has an incremented sequence number which replaces the old LSA in the LSDB of all routers in that area. Thus the connected routers have now implicitly withdrawn that link and it’s associated prefix by overwriting the receiving routers LSDB with an updated router LSA. OSPF will kick off a new SFP run, calculate a new topology and remove any routes associated with that link.
Summary LSA: Remember that Summary LSAs are pure distance-vector advertisements. Summary LSAs don’t advertise link information, just prefix information (a.k.a. routes). Assuming no summarisation had been configured on the ABR, it will originate a single Type-3 Summary LSA for every Type-1 stub-network prefix it had installed in it’s routing table.
Now that the prefix associated with the failed link has been implicitly withdrawn, it has been removed from the routing table. The ABR now needs to withdraw the summary LSA it had flooded into the backbone. The ABR informs all backbone routers that it can no longer reach the prefix from the failed link and asks the those routers to flush the Type-3 LSA for that prefix from their LSDBs.
The ABR does this by sending a new Summary LSA with and updated sequence number. The prefix is flagged as unreachable by setting it’s 24-bit metric field to all ones. This is called LSInfinity and has a decimal value of 16777215. The LSA requests that it be flushed from the receiver’s LSDB by setting it’s LSAge to MaxAge (3600 seconds). If there are other ABRs in the network, they will cascade the prefix removal by re-originating these ‘poisoned’ Type-3s into their connected non-backbone areas. An interface cost of 65535 is also known as “LSInfinity”.
External LSA: External LSAs behave almost identically to Summary LSAs. As soon as the associated link goes down the ASBR will send an updated Type-5 LSA for the prefix with an updated sequence number. Again it will set the link cost to the 24-bit LSIninity and the LSAge to MaxAge. In fact the type-5 prefix withdrawal is even simpler as Type-5 LSAs have domain-wide flooding scope. As such the poisoned LSA will immediately be flooded to all routers in the OSPF domain, regarded as unreachable and flushed from the receivers LSDB and routing tables.
The OSPF RID is a node-identifer. It uses an IP address format, but it is an ID and does not need to match any interface present on the box.
The type-4 will be advertised for as long as the ABR sees that E-bit on R1’s Router LSA.
The ABR always generates the Type-4 LSA. Boris’ comment above clarified that there are two different triggers depending upon your area -type.
1) Non-stub ASBR – Configure redistribute cmd on area-internal R1, R1 becomes ASBR, notifies ABR of new role, ABR generates type-4.
2) ABR configured non-backbone area to NSSA-type.(not covered in this article). Because this ABR can now perform Type-7 to Type-5 translation, it regards itself as an ASBR, and set’s it’s E-bit. This router DOES NOT send a type-4 LSA. However the other Area 0 ABR-routers see this E-Bit, and they generate a Type-4 LSA to send into their connected non-backbone areas. Stretch has a great description of this scenario – http://packetlife.net/blog/2008/apr/21/where-are-type-4-lsas-generated/)
ABR is distinguished by setting the B (border) bit in its router LSA to signal other routers in the same area of its ABR
What is congestion window?
The congestion window indicates the maximum amount of data that can be sent out on a connection without being acknowledged.
how does TCP detect congestion?
TCP detects congestion when it fails to receive an acknowledgement for a packet within the estimated timeout.