Link-state advertisement


The link-state advertisement is a basic communication means of the OSPF routing protocol for the Internet Protocol. It communicates the router's local routing topology to all other local routers in the same OSPF area. OSPF is designed for scalability, so some LSAs are not flooded out on all interfaces, but only on those that belong to the appropriate area. In this way detailed information can be kept localized, while summary information is flooded to the rest of the network. The original IPv4-only OSPFv2 and the newer IPv6-compatible OSPFv3 have broadly similar LSA types.

Types

The LSA types defined in OSPF are as follows:
The opaque LSAs, types 9, 10, and 11, are designated for upgrades to OSPF for application-specific purposes. For example, OSPF-TE has traffic engineering extensions to be used by RSVP-TE in Multiprotocol Label Switching. Opaque LSAs are used to flood link color and bandwidth information. Standard link-state database flooding mechanisms are used for distribution of opaque LSAs. Each of the three types has a different flooding scope.
For all types of LSAs, there are 20-byte LSA headers. One of the fields of the LSA header is the link-state ID.
Each router link is defined as one of four types: type 1, 2, 3, or 4. The LSA includes a link ID field that identifies, by the network number and mask, the object that this link connects to.
Depending on the type, the link ID has different meanings as shown in below table:
Link typeDescriptionLink IDLink Data
1point-to-point connection to another routerneighboring router IDIP address of the originating's interface to the network
2connection to a transit networkIP address of Designated RouterIP address of the originating's interface to the network
3connection to a stub networkIP network/subnet numberSubnet mask of the interface
4virtual linkneighboring router IDIP address of the originating's interface to the network

----

OSPF v3 LSA Packet Header Formats

As per of RFC 5340, all LSA packets start with a common LSA "20-byte header" as shown below.
Note: These LSA Packet Headers are all preceded by standard "16-byte" OSPF Headers.
Common LSA 20-byte Packet Header

As per of RFC 5340 depending upon the LS Type, there are nine major LSA Packet formats as follows :
The nine different formats for each "Type" of LSA packet are listed below :
Type 1: Router LSA Header
Type 2: Network-LSA Header
Type 3: Inter-Area-Prefix-LSA Header
Type 4: Inter-Area-Router-LSA Header
Type 5: AS-External-LSA Header
Type 6: MOSPF LSA Header
Type 7: NSSA-LSA Header '
Type 8: Link-LSA Header
Type 9: Intra-Area-Prefix LSA Header'''