Circular Sequence Number Spaces

Another approach is to use circular sequence number space, where the numbers "wrap"—that is, in a 32-
bit space the number following 4,294,967,295 is 0. Malfunctions can cause interesting dilemmas here,
too. A restarting router may encounter the same believability problem as discussed for linear sequence
numbers.
Circular sequence numbering creates a curious bit of illogic. If x is any number between 1 and
4,294,967,295 inclusive, then 0 < x < 0. This situation can be managed in well-behaved internetworks by
asserting two rules for determining when a sequence number is greater than or less than another sequence
number. Given a sequence number space n and two sequence numbers a and b, a is considered more
recent (of larger magnitude) in either of the following situations:
a b, and (a – b) \? n/2
a <> n/2
For the sake of simplicity, take a sequence number space of six bits, shown in Figure 4.9:

n = 26 = 64, so n/2 = 32.
Given two sequence numbers 48 and 18, 48 is more recent because by rule (1):
48 > 18and(48 – 18) = 30,and30 < 32.
Given two sequence numbers 3 and 48, 3 is more recent because by rule (2):
3 <> 32.
Given two sequence numbers 3 and 18, 18 is more recent because by rule (1):
18 > 3and(18 – 3) = 15,and15 <>.
So the rules seem to enforce circularity.
But what about a not-so-well-behaved internetwork? Imagine an internetwork running a six-bit sequence
number space. Now imagine that one of the routers on the internetwork decides to go belly-up, but as it
does so, it blurts out three identical LSAs with a sequence number of 44 (101100). Unfortunately, a
neighboring router is also malfunctioning—it is dropping bits. The neighbor drops a bit in the sequence
number field of the second LSA, drops yet another bit in the third LSA, and floods all three. The result is
three identical LSAs with three different sequence numbers:

44 (101100)
40 (101000)
8 (001000)
Applying the circularity rules reveals that 44 is more recent than 40, which is more recent than 8, which is
more recent than 44! The result is that every LSA will be continuously flooded, and databases will be
continually overwritten with the "latest" LSA, until finally buffers become clogged with LSAs, CPUs
become overloaded, and the whole internetwork comes crashing down.
This chain of events sounds pretty far-fetched. It is, however, factual. The ARPANET, the precursor of
the modern Internet, ran an early link state protocol with a six-bit circular sequence number space; on
October 27, 1980, two routers experiencing the malfunctions just described brought the entire ARPANET
to a standstill.