Link-state advertisement

The link-state advertisement (LSA) is a basic communication means of the OSPF routing protocol for the Internet Protocol (IP). 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 (MPLS). Opaque LSAs are used to flood link color and bandwidth information. Standard link-state database (LSDB) 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 type Description Link ID Link Data
1 point-to-point connection to another router neighboring router ID IP address of the originating's interface to the network
2 connection to a transit network IP address of Designated Router IP address of the originating's interface to the network
3 connection to a stub network IP network/subnet number Subnet mask of the interface
4 virtual link neighboring router ID IP address of the originating's interface to the network

OSPF v3 LSA Packet Header Formats

As per Appendix A.4.2 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
Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age LS Type
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 Depending on the "LS Type" details of the contents will vary.
(Details of each LS Type are listed below.)
192
~
~
~
~ ...

As per Appendix A.4 of RFC 5340 (OSPFv3 for IPv6) depending upon the LS Type, there are nine major LSA Packet formats as follows (actually eight as one has been deprecated):

LSA Function Code LS Type Description
1 0x2001 Router-LSA
2 0x2002 Network-LSA
3 0x2003 Inter-Area-Prefix-LSA
Also referred to as Summary-LSA in OSPFv2.
4 0x2004 Inter-Area-Router-LSA
Also referred to as ASBR-Summary-LSA in OSPFv2.
5 0x4005 AS-External-LSA
Also referred to as External-LSA or AS-External-LSA in OSPFv2.
6 0x2006 MOSPF-LSA Deprecated in OSPFv3 (may be reassigned)
Was referred to as Multicast-OSPF-LSA in OSPFv2.
7 0x2007 NSSA-LSA
Also referred to as NSSA-LSA in OSPFv2.
8 0x0008 Link-LSA
9 0x2009 Intra-Area-Prefix-LSA

The nine different formats for each "Type" of LSA packet are listed below (including the deprecated LSA-6):

Type 1: Router LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 1 1
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 0 Nt x V E B Options
192 Type 0 Metric
224 Interface ID
256 Neighbor Interface ID
288 Neighbor Router ID
320 ...
~ Type 0 Metric
~ Interface ID
~ Neighbor Interface ID
~ Neighbor Router ID
~ ...

Type 2: Network-LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 1 2
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 0 Options
192 Attached Router
~ ...

Type 3: Inter-Area-Prefix-LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 1 3
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 0 Metric
192 PrefixLength PrefixOptions 0
224 Address Prefix
256
288 ...

Type 4: Inter-Area-Router-LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 1 4
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 0 Options
192 0 Metric
224 Destination Router ID

Type 5: AS-External-LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 1 0 5
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 E F T Metric
192 PrefixLength PrefixOptions Referenced LS Type
224 Address Prefix
...
256
288 Forwarding Address (Optional)
~
~
~
~ External Route Tag (Optional)
~ Referenced Link State ID (Optional)

Type 6: MOSPF LSA Header (Deprecated)

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
N/A This LSA Type is deprecated in OSPF v3 RFC 5340 and thus is not shown here.
~
~

Type 7: NSSA-LSA Header (Same as Type 5 except for the type number field)

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 1 0 7
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 E F T Metric
192 PrefixLength PrefixOptions Referenced LS Type
224 Address Prefix
...
256
288 Forwarding Address (Optional)
~
~
~
~ External Route Tag (Optional)
~ Referenced Link State ID (Optional)

Type 8: Link-LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 0 8
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 Rtr Priority Options
192 Link-local Interface Address
224
256
288
320 # prefixes
352 PrefixLength PrefixOptions 0
384 Address Prefix
...
~
~ ...
~ PrefixLength PrefixOptions 0
~ Address Prefix
...
~

Type 9: Intra-Area-Prefix LSA Header

Bit/
Byte
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 LS Age 0 0 0 9
32 Link State ID
64 Advertising Router
96 LS Sequence Number
128 LS Checksum Length
160 # Prefixes Referenced LS Type
192 Referenced Link State ID
224 Referenced Advertising Router
256 PrefixLength PrefixOptions Metric
288 Address Prefix
...
320
352 ...
~ PrefixLength PrefixOptions Metric
~ Address Prefix
...
~

References

  1. "RFC 1584 - Multicast Extensions to OSPF". ietf.org. Retrieved 14 August 2015.
  2. "RFC 5340 - OSPF for IPv6". ietf.org. Retrieved 14 August 2015.
  3. "RFC 5250 - The OSPF Opaque LSA Option". ietf.org. Retrieved 14 August 2015.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.