Octet

How does OSPF decide an LSA is newer, and how are LSAs refreshed and removed?

Show the answer

Say this first

Each LSA has a 32-bit sequence number that starts at 0x80000001 and increases with every new copy. Higher sequence wins, then higher checksum, then an age of MaxAge. The originator refreshes every 30 minutes, and an LSA that reaches MaxAge, 3600 seconds, is flushed. To withdraw early, the originator floods it at MaxAge.

Go deeper

Constants from RFC 2328

NameValue
LSRefreshTime1800 s
MaxAge3600 s
MaxAgeDiff900 s
InitialSequenceNumber0x80000001
MaxSequenceNumber0x7FFFFFFF

Which copy is newer

  1. Higher sequence number.
  2. If equal, higher checksum.
  3. If equal, a copy at MaxAge is newer.
  4. If ages differ by more than MaxAgeDiff, the younger copy is newer. Otherwise they are the same.

Reading it in the database

Age counts up from 0. Seq# shows the sequence. An LSA with a high and rising sequence number on a stable network means it is being re-originated again and again: a flapping link or a duplicate router ID.

Withdrawal

When a router removes a prefix it originated, such as a stopped redistribution, it sets the LSA age to 3600 and floods it. Every router removes it after acknowledging it. That is "premature aging".

Traps

  • Saying LSAs time out after 30 minutes. 30 minutes is the refresh. MaxAge is 60 minutes.
How did you do?