cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3300
Views
0
Helpful
1
Replies

OSPF Sequence Number Question!

Iluvnetwork
Level 1
Level 1

When does the sequence number of LSA change?

How does the router first make sequence number for the advertising LSA? 

 

P.S. LSA sequence number has nothing to do with the sequence number during the LSDB Synchronization. Right?

1 Reply 1

damasiel
Cisco Employee
Cisco Employee

Hello,

Every route in the OSPF database has a sequence number.  A initial sequence number is assigned when the OSPF process is started on the router and interfaces or networks are entered into the OSPF process.  This process is done by either the network statement under the OSPF process or at the interface subcommand

Initially, every route in an OSPF database is assigned the beginning sequence in Hex of 0x80000001

This sequence number will increase when:

There is an update to the specific network entry in the database, such as the best path has changed.

I would say, in a stable environment the sequence number changes when the OSPF timers for each route reach a certain age.  By default the age is 30 mins.  The OSPF database also keeps track of this age value within the database.  When the route gets "old" enough, its time for OSPF to increase the sequence number and then flood the update out to all the routers within in the area.

So once the entry of 192.168.1.128 /25 reaches a LS age of something like 1800 seconds the local router determines it's time to increase the sequence number by 1, 0x80000002 and flood this new LSA out to everyone as an OSPF packet type of LSA Update.  Other routers see the 0x80000002 and replaces their entry for that route with the "newer" one.

 

The sequence number is a signed value.  Meaning it does have a positive / negative value.  Sounds crazy but yes I had to do more digging on this.  Think of the sequence number of 0x80000001 as a negative value, it can keep increasing getting greater in value, until it reaches 0x8FFFFFFF (which would be -1) we add one to this value, -1+1 = 0, 0x8FFFFFFF + 1 is (We've run out of bits so we go to Zero) 0x00000000 allowing the number to keep incrementing. 

So 0x0000000A is larger / newer than 0x852425A2

Review Cisco Networking products for a $25 gift card