OSPF Abnormal State Information
Huaimo Chen
Futurewei
Boston, MA
USA
hchen.ietf@gmail.com
2024
General
Internet Engineering Task Force
template
This document describes a couple of options for an OSPF router to advertise its abnormal state information in a routing domain.

Introduction
There may be some states that are not normal in an OSPF router, which include the state that a link state advertisement (LSA) stays in a retransmission list on the router for more than a given time period such as more than hello dead interval, and may include the state that a database description (DD) packet does not get acknowledged for a given period of time.
If a link state advertisement (LSA) with a topology change in a router can not get through over an OSPF interface for a given time period, some of the routers in the routing domain may have different view of the real network topology, thus routing loops may occur and some traffic may get dropped.
It is useful for an OSPF router in a routing domain to advertise its abnormal state information to other routers, or notify some systems such as an event management or monitoring system for its abnormal state.
This document describes a couple of options for an OSPF router to advertise its abnormal state information in a routing domain.

Terminology
This document uses terminologies defined in RFC 4970, RFC 2328, and RFC 2740.

Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

OSPF Router State Information LSA
OSPF routers MAY advertise their state information in a area-scoped or AS-scoped router state information LSA with a router state informatioin TLV.

OSPFv2 Router State Information (RSI) Opaque LSA
OSPFv2 routers will advertise an area-scoped or AS-scoped Router State Information Opaque-LSA [RFC 2370], which has an Opaque type of 5 and Opaque ID of 0.
The RSI LSA will be originated initially by an OSPF router when an OSPF instance is created and re-originated in every refresh interval (LSRefreshTime) with the current state information of the router. When the current state information changes, the RSI LSA will also be originated.

OSPFv2 Router State Information Opaque LSA

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            LS age             |     Options   |    10/11      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       5       |                    0                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Advertising Router                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     LS sequence number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         LS checksum           |             length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+-                            TLVs                             -+
|                             ...                               |

The format of the TLVs within the body of a RSI LSA is the same as the format used by the Traffic Engineering Extensions to OSPF [RFC 3630]. The LSA payload consists of one or more nested Type/Length/Value (TLV) triplets. The format of each TLV is:

TLV Format

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Type             |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Value...                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Length field defines the length of the value portion in octets (thus a TLV with no value portion would have a length of 0). The TLV is padded to 4-octet alignment; padding is not included in the length field (so a 3-octet value would have a length of 3, but the total size of the TLV would be 8 octets). Nested TLVs are also 32-bit aligned. For example, a 1-byte value would have the length field set to 1, and 3 octets of padding would be added to the end of the value portion of the TLV. Unrecognized types are ignored.

OSPFv3 Router State Information (RSI) Opaque LSA
TBD.

OSPF Router State Information (RSI) TLV
A router advertising a RSI LSA MAY include the Router State Information TLV. If included, it MUST be the first TLV in the LSA. Additionally, the TLV MUST accurately reflect the OSPF router's state information in the scope advertised.
The format of the Router State Information TLV is as follows:

Router State Information TLV

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Type (1)            |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             State Information sub-TLVs                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type: A 2-octet field set to 1.
Length: A 2-octet field that indicates the length of the value portion in octets and will be the total number of octets that state information sub-TLVs use.
Value: A variable length sequence of router state information sub-TLVs.
The format of the Router State Information LSA retranmission time sub-TLV is as follows:

Retranmission Time Sub-TLV

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Type (1)           |           Length (2)          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Max LSA retransmission time  |            Padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type: A 2-octet field set to 1.
Length: A 2-octet field that indicates the length of the value portion in octets and will be 2.
Value: A 2-octet field set to the current maximum time (in seconds) that an LSA stays in a retransmission list in a router.
The format of the sub-TLV for the maximum time that a Database Description packet is not acknowledged is illustrated below.

Maximum DD Time Sub-TLV

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Type (2)            |          Length (2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Max time DD not acked     |            Padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type: A 2-octet field set to 2.
Length: A 2-octet field that indicates the length of the value portion in octets and will be 2.
Value: A 2-octet field set to the current maximum time (in seconds) for which a DD packet is not acknowledged in a router.

Attach RSI TLV to Router Inforamtion LSA
Instead of using a Router State Information LSA to advertise the abnormal state information for a router, we may use the existing Router Information LSA defined in RFC 4970 to advertise the state information through adding the Router State Information (RSI) TLV into the Router Inforamtion LSA.
When a Router State Information (RSI) TLV is put into a Router Information LSA, the type of the TLV may be different from the one mentioned in the section above.

Notify Other Systems
An OSPF router may also notify other systems such as an event management system about its abnormal state when the abnormal state occurs in the router.

Security Considerations
The mechanism described in this document does not raise any new security issues for the OSPF protocols.

IANA Considerations
tb

Acknowledgement
The author would like to thank people for their valuable comments on this draft.

Normative References

Informative References