Todays post will cover how OSPF withdraws a route after a link failure or deconfiguration. There are some fantastic resources out there describing how to originate and advertise links and prefixes, but I haven’t found a good summary of OSPF link failure handling.
We’ll cover link-down events within an area first, because it’s the easiest to explain. As we discussed in my previous router LSA P2P post, OSPF represents routes within an area by defining them as nodes and links with attached prefixes (stub networks).
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.
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.
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.
[amazon_link asins=’0201634724,B008K9ADRI,1587144239,0596002750,B00RN14G7W’ template=’ProductCarousel’ store=’seamlnetwo-20′ marketplace=’US’ link_id=’c3a556d7-f3f1-11e7-aa67-1d78eab3d1da’]