Link-state advertisement

Last updated

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.

Contents

Types

The LSA types defined in OSPF are as follows:

OSPF link state advertisements
LS typeLS nameGenerated byDistanceLSA description
1Router-LSAsEach internal router within an areaarea-localOriginated by all routers.

The link-state ID of the type 1 LSA is the originating router ID.

2Network-LSAsDesignated router (DR)area-localOriginated for broadcasts and NBMA networks by the Designated Router. This LSA contains the list of routers connected to the network.The link-state ID of the type 2 LSA is the IP interface address of the DR.
In OSPFv3 Network-LSAs have no address information and are network protocol independent.
3Summary-LSAs (OSPFv2)

Inter-Area-Prefix-LSAs (OSPFv3)

Area Border Router (ABR)routing domainan Area Border Router (ABR) takes information it has learned on one of its attached areas and summarizes it before sending it out on other areas it is connected to. Each summary-LSA describes a route to a destination outside the area, yet still inside the AS (i.e., an inter-area route). This summarization helps provide scalability by removing detailed topology information for other areas, because their routing information is summarized into just an address prefix and metric. The summarization process can also be configured to remove a lot of detailed address prefixes and replace them with a single summary prefix, helping scalability.
In OSPFv3 Inter-Area-Prefix-LSAs have been renamed.
4ASBR-Summary (OSPFv2)

Inter-Area-Router-LSAs (OSPFv3)

Area Border Router (ABR)routing domainThis is needed because Type 5 External LSAs are flooded to all areas with the source as the Autonomous System Boundary Router's (ASBR) router ID, but router IDs are not advertised between areas. This is solved by an Area Border Router flooding the information of the ASBR where the type 5 originated. The link-state ID is the router ID of the described ASBR for type 4 LSAs.
In OSPFv3 Inter-Area-Router-LSAs have been renamed.
5AS-external-LSAsAutonomous System Boundary Router's (ASBR)routing domainthese LSAs contain information imported into OSPF from other routing processes. They are flooded to all areas unchanged (except stub and NSSA areas). For "External Metric Type 1" LSAs the metric sent is the cost from the ASBR to the External destination network and must be added to the OSPF cost to the ASBR advertising the Type 5, while for "External Type 2" LSAs routing decisions are made using the Type 1 metric cost sent as the total cost to get to the external destination including the cost to the ASBR. The link-state ID of the type 5 LSA is the external network number. [1] Default routes for the AS can also be described by AS-external-LSAs.
6Group Membership LSAThis was defined for Multicast extensions to OSPF (MOSPF), [2] a multicast OSPF routing protocol which was not in general use. MOSPF has been deprecated since OSPFv3 [3] and is not currently used. It may be reassigned in the future.
7NSSA External Link-State AdvertisementsThe ASBR, within a Not-so-stubby areaIntra-areaType 7-LSAs are identical to type-5 LSAs.
Type-7 LSAs are only flooded within the NSSA.
This are allows routers in NSSA to send external routing information for redistribution. They use type 7 LSAs to tell the ABRs about these external routes, which the Area Border Router then translates to type 5 external LSAs and floods as normal to the rest of the OSPF network.

At the area border router, selected type-7 LSAs are translated into type 5-LSAs and flooded into the backbone.

8

Link-local LSAs (OSPFv3)

Each internal router within an areaLinkA Type 8 LSA is used to give information about link-local addresses and a list of IPv6 addresses on the link.
  • In OSPFv2, the Type 8 was originally intended to be used as a so-called External-Attributes-LSA for transit autonomous systems where OSPFv2 could replace the internal Border Gateway Protocol (iBGP). In these networks, the BGP destinations would be carried in LSA Type 5 while their BGP attributes would be inserted into LSA Type 8. Most OSPFv2 implementations never supported this feature, and it was never standardised for OSPFv2.
9link-local "opaque" [3] (OSPFv2)

Intra-Area-Prefix [1] (OSPFv3)

link-localIt is the OSPFv3 LSA that contains prefixes for stub and transit networks in the link-state ID. It is also used for IETF NSF (Non-Stop Forwarding).
10area-local "opaque" [3] (OSPFv2)area-localOpaque LSAs contain information which should be flooded by other routers even if the router is not able to understand the extended information itself. Typically type 10 LSAs are used for traffic engineering (MPLS-TE) extensions to OSPF for creating the Traffic Engineering Database (TED), by flooding extra information about links beyond just their metric, such as link bandwidth and color.
11Autonomous System (AS) "opaque" [3] (OSPFv2)routing domainLSA Type 11 packets serve the same purpose as LSA Type 10 packets but are not flooded into special area types (Stub areas).

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 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

OSPFv2 for IPv4

As per Appendix-A.3.1 of RFC 2328, all OSPF packets start with a common LSA "24-byte header" as shown below.

OSPF v2 packet Header format, field length in bytes
11244228Variable
Version 2TypePacket lengthRouter IDArea IDChecksumAuTypeAuthenticationData

For


Options

Options Field , length in bits
11111111
*ODCEAN/PxE*

The Options field is present in:

The option field Indicative the feature supported by the source router. In Hello packet, a mismatch, will result in reject of neighbor. for LSA only packet that matches the destination routes willingness is forward.

Options (8 bits)
  • E-Bit: Indicative if area is AS-external capable, or STUBed.
  • x-bit: Set 0, used previously used by MOSPF
  • N/P-bit: Indicative if area is NSSA.
  • EA-bit: Indicative receive and forward External-Attributes-LSAs
  • DC-bit: Indicative router's handling of demand circuits, RFC   1793.
  • O-bit: Indicative router's willingness to receive and forward Opaque-LSAs
  • *: Reserved set 0

Database description DBD

Database description, Field length in bytes
242114Variable
Header
Interface MTUOptionsFlagsDD sequence numberLSA Data
00000IMMS

Database description messages contain descriptions of the topology of the autonomous system or area. They convey the contents of the link-state database (LSDB) for the area from one router to another. Communicating a large LSDB may require several messages to be sent by having the sending device designated as a master device and sending messages in sequence, with the slave (recipient of the LSDB information) responding with acknowledgments.

Interface MTU (16 bits)
the largest IP datagram that can be sent without fragmentation. In bytes.
flags(8 bits)
3 bits are defined.
  • I-Bit: Indicative this is the first packet in the sequence of Database Description Packets.
  • M-Bit: Indicative there is more packet to follow.
  • MS-bit Indicative if source is master during the Database Exchange process.
DD sequence number (32 bits)
Database Description, increments until the complete database description has been sent.

Link state request (LSR): Link state request messages are used by one router to request updated information about a portion of the LSDB from another router. The message specifies the link(s) for which the requesting device wants more current information.

Link State request packet , Field length in bytes
24444Variable
Header
LS typeLink State IDAdvertising RouterData
OSPF Link State Update packet , Field length in bytes
244Variable
Header
# LSAslist of LSAs
  1. LSAs: the total number of LSAs included in this update.

Link-state update (LSU) messages contain updated information about the state of certain links on the LSDB. They are sent in response to a link state request message, and also broadcast or multicast by routers on a regular basis. Their contents are used to update the information in the LSDBs of routers that receive them.

OSPF v2 Link State Acknowledgment, Field length in bytes
24Variable
Header
list of LSAs

Link-state acknowledgment (LSAck)messages provide reliability to the link-state exchange process, by explicitly acknowledging receipt of a Link State Update message. The LSA acknowledgment, explicitly acknowledged, that it have received a LSA, by mirroring it back.


Common LSA 20-byte Packet Header

LSA 20-byte Packet Header format, field length in bytes
2421144422Variable
OSPF HeaderLS AgeOptionsLS TypeLink State IDAdvertising RouterLS Sequence NumberLS ChecksumLengthDATA

Appendix-A.4.1 of RFC   2328, all LSA packets start with a common LSA "20-byte header" as shown below. Note: These LSA Packet Headers are all preceded by OSPFv2 "24-byte" OSPF Headers.


LS age (16 bits)
The time in seconds since the LSA was created.
LS type (8 bits)
1,2,3,4,5,6 or 7
Link State ID (32 bits)
Identifies the portion of the network environment that is being described by the LSA. The contents of this field depend on the LSA's LS type.
Advertising Router ID (32 bits)
source router, that originally created it.
LS sequence number (32 bits)
sequence number is incremented each time the router originates a new instance of the LSA. used to detect old and duplicate LSAs.
LS Checksum (16 bits)
Checksum of the contents of the LSA.
Length (16 bits)
The length of the LSA, in bytes.

OSPF v3

In 2008, with the introduction of RFC5340 a new standard was set.

Common OSPFv3 packet header 16-byte
Bit012345678910111213141516171819202122232425262728293031
0Version #TypePacket length
32Router ID
64Area ID
96ChecksumAuType
128Depending on the "OSPF packet types" details of the contents will vary.
(Details of each LS Type are listed below.)
~
~
~
~
~...

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
012345678910111213141516171819202122232425262728293031
0LS AgeLS Type
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
160Depending on the "LS Type" details of the contents will vary.
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 CodeLS TypeDescription
10x2001Router-LSA
20x2002Network-LSA
30x2003Inter-Area-Prefix-LSA
Also referred to as Summary-LSA in OSPFv2.
40x2004Inter-Area-Router-LSA
Also referred to as ASBR-Summary-LSA in OSPFv2.
50x4005AS-External-LSA
Also referred to as External-LSA or AS-External-LSA in OSPFv2.
60x2006MOSPF-LSA Deprecated in OSPFv3 (may be reassigned)
Was referred to as Multicast-OSPF-LSA in OSPFv2.
70x2007NSSA-LSA
Also referred to as NSSA-LSA in OSPFv2.
80x0008Link-LSA
90x2009Intra-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
012345678910111213141516171819202122232425262728293031
0LS Age0011
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
1600NtxVEBOptions
192Type0Metric
224Interface ID
256Neighbor Interface ID
288Neighbor Router ID
320...
~Type0Metric
~Interface ID
~Neighbor Interface ID
~Neighbor Router ID
~...

Type 2: Network-LSA Header

Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0012
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
1600Options
192Attached Router
~...

Type 3: Inter-Area-Prefix-LSA Header

Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0013
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
1600Metric
192PrefixLengthPrefixOptions0
224Address Prefix
256
288...

Type 4: Inter-Area-Router-LSA Header

Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0014
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
1600Options
1920Metric
224Destination Router ID

Type 5: AS-External-LSA Header

Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0105
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
160EFTMetric
192PrefixLengthPrefixOptionsReferenced LS Type
224Address Prefix
...
256
288Forwarding Address (Optional)
~
~
~
~External Route Tag (Optional)
~Referenced Link State ID (Optional)

Type 6: MOSPF LSA Header (Deprecated)

Bit/
Byte
012345678910111213141516171819202122232425262728293031
N/AThis 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
012345678910111213141516171819202122232425262728293031
0LS Age0107
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
160EFTMetric
192PrefixLengthPrefixOptionsReferenced LS Type
224Address Prefix
...
256
288Forwarding Address (Optional)
~
~
~
~External Route Tag (Optional)
~Referenced Link State ID (Optional)
Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0008
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
160Rtr PriorityOptions
192Link-local Interface Address
224
256
288
320# prefixes
352PrefixLengthPrefixOptions0
384Address Prefix
...
~
~...
~PrefixLengthPrefixOptions0
~Address Prefix
...
~

Type 9: Intra-Area-Prefix LSA Header

Bit/
Byte
012345678910111213141516171819202122232425262728293031
0LS Age0009
32Link State ID
64Advertising Router
96LS Sequence Number
128LS ChecksumLength
160# PrefixesReferenced LS Type
192Referenced Link State ID
224Referenced Advertising Router
256PrefixLengthPrefixOptionsMetric
288Address Prefix
...
320
352...
~PrefixLengthPrefixOptionsMetric
~Address Prefix
...
~

Related Research Articles

The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating success or failure when communicating with another IP address, for example, an error is indicated when a requested service is not available or that a host or router could not be reached. ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications.

IPv4 Fourth version of the Internet Protocol

Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983. It is still used to route most Internet traffic today, even with the ongoing deployment of Internet Protocol version 6 (IPv6), its successor.

IPv6 Version 6 of the Internet Protocol

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and is intended to replace IPv4. In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017.

Multiprotocol Label Switching (MPLS) is a routing technique in telecommunications networks that directs data from one node to the next based on labels rather than network addresses. Whereas network addresses identify endpoints the labels identify established paths between endpoints. MPLS can encapsulate packets of various network protocols, hence the multiprotocol component of the name. MPLS supports a range of access technologies, including T1/E1, ATM, Frame Relay, and DSL.

In computer networking, the maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single network layer transaction. The MTU relates to, but is not identical to the maximum frame size that can be transported on the data link layer, e.g. Ethernet frame.

ping (networking utility) Network utility used to test the reachability of a host

ping is a computer network administration software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available for virtually all operating systems that have networking capability, including most embedded network administration software.

The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. Major internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP, which is part of the Transport Layer of the TCP/IP suite. SSL/TLS often runs on top of TCP.

In computer networking, the User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network. Prior communications are not required in order to set up communication channels or data paths.

Intermediate System to Intermediate System is a routing protocol designed to move information efficiently within a computer network, a group of physically connected computers or similar devices. It accomplishes this by determining the best route for data through a packet switching network.

In computing, Internet Protocol Security (IPsec) is a secure network protocol suite that authenticates and encrypts packets of data to provide secure encrypted communication between two computers over an Internet Protocol network. It is used in virtual private networks (VPNs).

Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. It uses a link state routing (LSR) algorithm and falls into the group of interior gateway protocols (IGPs), operating within a single autonomous system (AS).

IP fragmentation Process that breaks IP packets into smaller pieces

IP fragmentation is an Internet Protocol (IP) process that breaks packets into smaller pieces (fragments), so that the resulting pieces can pass through a link with a smaller maximum transmission unit (MTU) than the original packet size. The fragments are reassembled by the receiving host.

Generic Routing Encapsulation (GRE) is a tunneling protocol developed by Cisco Systems that can encapsulate a wide variety of network layer protocols inside virtual point-to-point links or point-to-multipoint links over an Internet Protocol network.

A ping of death is a type of attack on a computer system that involves sending a malformed or otherwise malicious ping to a computer.

In computer networking, the multicast DNS (mDNS) protocol resolves hostnames to IP addresses within small networks that do not include a local name server. It is a zero-configuration service, using essentially the same programming interfaces, packet formats and operating semantics as unicast Domain Name Service (DNS). It was designed to work as either a stand-alone protocol or compatibly with standard DNS servers. It uses IP multicast User Datagram Protocol (UDP) packets, and is implemented by the Apple Bonjour and open source Avahi software packages, included in most Linux distributions. Although the Windows 10 implementation was limited to discovering networked printers, subsequent releases resolved hostnames as well. mDNS can work in conjunction with DNS Service Discovery (DNS-SD), a companion zero-configuration networking technique specified separately in RFC 6763.

Robust Header Compression (ROHC) is a standardized method to compress the IP, UDP, UDP-Lite, RTP, and TCP headers of Internet packets.

Internet Control Message Protocol version 6 (ICMPv6) is the implementation of the Internet Control Message Protocol (ICMP) for Internet Protocol version 6 (IPv6). ICMPv6 is an integral part of IPv6 and performs error reporting and diagnostic functions.

In computer networking, source routing, also called path addressing, allows a sender of a packet to partially or completely specify the route the packet takes through the network. In contrast, in conventional routing, routers in the network determine the path incrementally based on the packet's destination. Another routing alternative, label switching, is used in connection-oriented networks such as X.25, Frame Relay, Asynchronous Transfer Mode and Multiprotocol Label Switching.

An IPv6 packet is the smallest message entity exchanged using Internet Protocol version 6 (IPv6). Packets consist of control information for addressing and routing and a payload of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers. The payload of an IPv6 packet is typically a datagram or segment of the higher-level transport layer protocol, but may be data for an internet layer or link layer instead.

The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the protocol provides the message-oriented feature of the User Datagram Protocol (UDP), while ensuring reliable, in-sequence transport of messages with congestion control like the Transmission Control Protocol (TCP). Unlike UDP and TCP, the protocol supports multihoming and redundant paths to increase resilience and reliability.

References

  1. 1 2 "RFC 5340 – OSPF for IPv6". ietf.org. Retrieved 5 April 2020.
  2. "RFC 1584 – Multicast Extensions to OSPF". ietf.org. Retrieved 14 August 2015.
  3. 1 2 3 4 "RFC 5250 – The OSPF Opaque LSA Option". ietf.org. Retrieved 14 August 2015.