Skip to main content

14. Aging The Link State Database

Each link state advertisement has an age field. The age is expressed in seconds. An advertisement's age field is incremented while it is contained in a router's database. Also, when copied into a Link State Update Packet for flooding out a particular interface, the advertisement's age is incremented by InfTransDelay.

An advertisement's age is never incremented past the value MaxAge. Advertisements having age MaxAge are not used in the routing table calculation. As a router ages its link state database, an advertisement's age may reach MaxAge.[17] At this time, the router must attempt to flush the advertisement from the routing domain. This is done simply by reflooding the MaxAge advertisement just as if it was a newly originated advertisement (see Section 13.3).

When a Database summary list for a newly adjacent neighbor is formed, any MaxAge advertisements present in the link state database are added to the neighbor's Link state retransmission list instead of the neighbor's Database summary list. See Section 10.3 for more details.

A MaxAge advertisement is removed entirely from the router's link state database when a) it is no longer contained on any neighbor Link state retransmission lists and b) none of the router's neighbors are in states Exchange or Loading. When, in the process of aging the link state database, an advertisement's age hits a multiple of CheckAge, its checksum should be verified. If the checksum is incorrect, a program or memory error has been detected, and at the very least the router itself should be restarted.

14.1. Premature aging of advertisements​

A link state advertisement can be flushed from the routing domain by setting its age to MaxAge and reflooding the advertisement. This procedure follows the same course as flushing an advertisement whose age has naturally reached the value MaxAge (see Section 14). In particular, the MaxAge advertisement is removed from the router's link state database as soon as a) it is no longer contained on any neighbor Link state retransmission lists and b) none of the router's neighbors are in states Exchange or Loading. We call the setting of an advertisement's age to MaxAge premature aging.

Premature aging is used when it is time for a self-originated advertisement's sequence number field to wrap. At this point, the current advertisement instance (having LS sequence number of 0x7fffffff) must be prematurely aged and flushed from the routing domain before a new instance with sequence number 0x80000001 can be originated. See Section 12.1.6 for more information.

Premature aging can also be used when, for example, one of the router's previously advertised external routes is no longer reachable. In this circumstance, the router can flush its external advertisement from the routing domain via premature aging. This procedure is preferable to the alternative, which is to originate a new advertisement for the destination specifying a metric of LSInfinity.

A router may only prematurely age its own (self-originated) link state advertisements. These are the link state advertisements having the router's own OSPF Router ID in the Advertising Router field.