Sub topic 13
Flooding Link-State Advertisements
This chapter covers how a link-state router tells every other router in its area about its links, and how the network makes sure every router ends up with the same data. It assumes you know what a router's neighbor adjacency is (from the previous chapter on hello packets), basic IP addressing, and the weighted-graph view of a network.
What flooding has to achieve
A link-state router does not pass along a table of routes. It describes only its own links: its router ID, its neighbors, and the cost to each. That description is a link-state advertisement (LSA). The goal of flooding is that every router in the flooding scope receives every LSA, so all of them can build the same link-state database and run the same shortest-path computation.
Flooding must satisfy three requirements:
- Reach everyone. An LSA must propagate across the whole area, even through a partly broken network.
- Terminate. Without a stop rule, a topology with cycles would circulate the same LSA forever.
- Prefer newer data. If two versions of an LSA exist, every router must agree which is newer.
The basic flooding rule
When a router receives an LSA on one interface, it follows these steps:
- Check whether it already has this LSA in its database.
- If the LSA is new, or newer than the stored copy, store it and send it out every interface except the one it arrived on.
- If the LSA is the same as the stored copy, discard it.
- If the stored copy is newer, send the stored copy back to the sender so it can catch up.
The "discard duplicates" rule is what ends the flood. Each router forwards a given version of an LSA at most once per interface, so the number of messages is bounded even in a mesh.
Sequence numbers, age, and checksums
To decide which copy is newer, each LSA carries identifying and versioning fields. The names below follow OSPF. IS-IS uses equivalent fields, and its LSAs are called link-state PDUs.
| Field | Purpose |
|---|---|
| Advertising router ID | Who originated the LSA |
| LSA type and link-state ID | Which piece of the originator's information this is |
| Sequence number | Higher means newer |
| Age | Seconds since origination; an LSA that reaches maximum age is removed |
| Checksum | Detects corruption in transit or in memory |
Comparison goes in this order: higher sequence number wins; if equal, the larger checksum is used as a tiebreaker; if still equal, an age near the maximum counts as newer, because that is how a router withdraws an LSA. Otherwise the copies are treated as the same.
A router that originates an LSA increments the sequence number each time it reissues it. OSPF starts at a fixed initial value and counts upward as a signed 32-bit number. It also refreshes each of its own LSAs every 30 minutes even if nothing changed, and LSAs expire at 60 minutes. The refresh keeps live data from aging out and bounds how long stale data survives.
Reliable flooding
Flooding is built on top of unreliable packet delivery, so the protocol adds its own acknowledgments. In OSPF, a router sends LSAs inside Link State Update packets. The receiver answers with a Link State Acknowledgment, either explicitly or implicitly (a returned copy of the same LSA counts). Until the acknowledgment arrives, the sender keeps the LSA on a retransmission list for that neighbor and resends it after a timer, which defaults to 5 seconds in OSPF.
IS-IS handles this differently by interface type. On point-to-point links it uses explicit acknowledgments (PSNPs). On broadcast links the designated router periodically sends a summary of its database (a CSNP), and routers that notice a missing or older entry request it.
Initial synchronization
Flooding also covers a new neighbor. When two routers form an adjacency, they do not flood everything. They exchange summaries of their databases (OSPF uses Database Description packets with LSA headers only). Each router then requests only the LSAs it lacks or holds an older version of. After this exchange both databases match and the routers become fully adjacent. This is cheaper than resending every LSA and is why a router restart does not overwhelm its neighbors.
Flooding on shared segments
On a broadcast segment such as Ethernet with many routers, having every pair exchange LSAs would be wasteful. OSPF elects a designated router (DR). Other routers send updates to the DR using the multicast address 224.0.0.6, and the DR floods them to all routers using 224.0.0.5. Chapter content on DR election appears later in the OSPF chapter, so here the point is only that the DR reduces the number of copies on the segment.
A worked example
Suppose the link between B and D in the diagram above fails.
- B and D each detect the failure (through a missed-hello timeout or a link-down signal).
- B reissues its LSA without the link to D, with sequence number incremented. D does the same.
- Each sends the new LSA to its remaining neighbors. A receives B's new copy, sees a higher sequence number than the stored one, installs it, and forwards it to C.
- C receives B's LSA from A, installs it, and forwards it. Duplicates arriving later are discarded.
- Every router reruns the shortest-path computation. Traffic that used B-D now uses A-C-D.
The time for this to finish is the sum of failure detection, LSA propagation, and the SPF run. Propagation is usually a few milliseconds per hop, so detection time dominates unless you tune it.
Edge cases and common problems
- Rapid flapping. A link that goes up and down repeatedly causes a stream of new LSAs and repeated SPF runs. Routers use timers that delay and back off LSA generation and SPF calculation to limit the load. The trade-off is slower reaction to a real failure.
- Sequence number wraparound. After the maximum value, the originator must first flush the old LSA from the network by aging it out, then restart. This is rare because refreshes are slow.
- Database mismatch. If checksums fail or a router holds an LSA that no one else has, adjacencies can stall in the exchange phase. A common symptom is a neighbor stuck in the "Exchange" or "Loading" state, often caused by an MTU mismatch between the two interface ends.
- Duplicate router IDs. Two routers with the same ID each see the other's LSAs as their own. They fight over sequence numbers and the area never stabilizes. Router IDs must be unique.
- Scope. Flooding stays within a defined boundary, an area in OSPF or a level in IS-IS. Limiting scope reduces flood volume and SPF cost in large networks.
Exercise
Router X holds an LSA from router R with sequence number 12. It receives from neighbor N an LSA from R with sequence number 12 and an identical checksum, then later from neighbor M an LSA from R with sequence number 13. What does X do with each, and why?
Show answer
The copy from N is a duplicate of the stored LSA, so X discards it (and acknowledges it). The copy from M has a higher sequence number, so X installs it, replacing the old one, and floods it out every interface except the one facing M. Discarding duplicates stops the flood from looping, and the sequence number ordering tells X which version is current.
Exercise
Why does OSPF refresh its own LSAs every 30 minutes even when the topology has not changed?
Show answer
Every LSA has an age that grows until it reaches the 60-minute maximum, at which point routers remove it. If the originator did not refresh it, live information would age out of the database. The refresh also replaces any copy that may have been corrupted or lost in some router's memory, which bounds how long stale data can persist.