OSPF LSAs
OSPF routers use Link-State Advertisement to send updates to other routers about thier network connectivity. These LSAs are flooded into the network with different scopes i.e. flooded into an area, different areas etc.
LSA Header
Even though there are multiple LSA types, all of them have a common 20-octet LSA header. Fields in this common header include:
Link-State age [2-octets]: carries time since the LSA was first originated in the network. This age is incremented in seconds beginning at zero and maxes out to 3600 seconds or 1 hour. After Max-Age [3600seconds], LSA is removed from the database, unless the originated router resends this information before Max-Age.
Options [1-octet]: The originating router of this LSA advertises its capabilities in this field. e.g Bit 1 = E bit = support of Type 5 external LSAs. Similarly, Bit 3 = N/P bit = support for not-so-stubby LSAs.
Link-State Type [1-octet]: 1=Router LSA, 2=Network, 3=Network Summary, 4=ASBR summary, 5=AS External LSA, 6=Group Membership, 7=NSSA external, 9-11=Opaque LSAs.
Link-State ID [4-octets]: describes the part of network advertised by the LSA.
Link-State Sequence Number [4-octets]: a signed 4byte file used to uniquely define the version number of LSA. Each new LSA has this field set to 0x80000001, which gets incremented upto 0x7fffffff. For example for a newly generated LSA that is about to reach max-age, the originating router will re-issue this LSA with sequence number 0x80000002.
Link-State Checksum [2-octets]: IP checksum for entire LSA excluding the Age field.
Length [2-octet]: length of the entire LSA i.e. header length [20] + rest of the LSA length.
The OSPF Router LSA [LSA Type 1]
In the extensive ospf database output link type-field, such as (3), is followed by comments for explanation.
Each point-to-point link is advertised as two links: one stub and the other point-to-point. This is because on a pt-to-pt link, an OSPF router alwasys forms an adjacency with its peer over an unnumbered connection. Hence, the
link ID = the neighbor's router ID
Data = IP address on pt-to-pt interface of this router. [see below]