3.5.1. Notification Message
An LSR sends a Notification message to inform an LDP peer of a significant event. A Notification message signals a fatal error or provides advisory information such as the outcome of processing an LDP message or the state of the LDP session.
The encoding for the Notification message is:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Notification (0x0001) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Status (TLV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID 32-bit value used to identify this message.
Status TLV Indicates the event being signaled. The encoding for the Status TLV is specified in Section "Status TLV".
Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The following Optional Parameters are generic and may appear in any Notification message:
Optional Parameter Type Length Value
Extended Status 0x0301 4 See below
Returned PDU 0x0302 var See below
Returned Message 0x0303 var See below
Other Optional Parameters, specific to the particular event being signaled by the Notification messages, may appear. These are described elsewhere.
Extended Status The 4 octet value is an Extended Status Code that encodes additional information that supplements the status information contained in the Notification Status Code.
Returned PDU An LSR uses this parameter to return part of an LDP PDU to the LSR that sent it. The value of this TLV is the PDU header and as much PDU data following the header as appropriate for the condition being signaled by the Notification message.
Returned Message An LSR uses this parameter to return part of an LDP message to the LSR that sent it. The value of this TLV is the message type and length fields and as much message data following the type and length fields as appropriate for the condition being signaled by the Notification message.
3.5.1.1. Notification Message Procedures
If an LSR encounters a condition requiring it to notify its peer with advisory or error information, it sends the peer a Notification message containing a Status TLV that encodes the information and optionally additional TLVs that provide more information about the condition.
If the condition is one that is a fatal error, the Status Code carried in the Notification will indicate that. In this case, after sending the Notification message the LSR SHOULD terminate the LDP session by closing the session TCP connection and discard all state associated with the session, including all label-FEC bindings learned via the session.
When an LSR receives a Notification message that carries a Status Code that indicates a fatal error, it SHOULD terminate the LDP session immediately by closing the session TCP connection and discard all state associated with the session, including all label-FEC bindings learned via the session.
The above statement does not apply to the processing of the Shutdown message in the session initialization procedure. When an LSR receives a Shutdown message during session initialization, it SHOULD transmit a Shutdown message and then close the transport connection.
3.5.1.2. Events Signaled by Notification Messages
It is useful for descriptive purpose to classify events signaled by Notification messages into the following categories.
3.5.1.2.1. Malformed PDU or Message
Malformed LDP PDUs or messages that are part of the LDP Discovery mechanism are handled by silently discarding them.
An LDP PDU received on a TCP connection for an LDP session is malformed if:
-
The LDP Identifier in the PDU header is unknown to the receiver, or it is known but is not the LDP Identifier associated by the receiver with the LDP peer for this LDP session. This is a fatal error signaled by the Bad LDP Identifier Status Code.
-
The LDP protocol version is not supported by the receiver, d or it is supported but is not the version negotiated for the session during session establishment. This is a fatal error signaled by the Bad Protocol Version Status Code.
-
The PDU Length field is too small (< 14) or too large (> maximum PDU length). This is a fatal error signaled by the Bad PDU Length Status Code. Section "Initialization Message" describes how the maximum PDU length for a session is determined.
An LDP message is malformed if:
-
The Message Type is unknown.
If the Message Type is < 0x8000 (high order bit = 0), it is an error signaled by the Unknown Message Type Status Code.
If the Message Type is >= 0x8000 (high order bit = 1), it is silently discarded.
-
The Message Length is too large, that is, indicates that the message extends beyond the end of the containing LDP PDU. This is a fatal error signaled by the Bad Message Length Status Code.
-
The Message Length is too small, that is, smaller than the smallest possible value component. This is a fatal error signaled by the Bad Message Length Status Code.
-
The message is missing one or more Mandatory Parameters. This is a non-fatal error signaled by the Missing Message Parameters Status Code.
3.5.1.2.2. Unknown or Malformed TLV
Malformed TLVs contained in LDP messages that are part of the LDP Discovery mechanism are handled by silently discarding the containing message.
A TLV contained in an LDP message received on a TCP connection of an LDP is malformed if:
-
The TLV Length is too large, that is, indicates that the TLV extends beyond the end of the containing message. This is a fatal error signaled by the Bad TLV Length Status Code.
-
The TLV type is unknown.
If the TLV type is < 0x8000 (high order bit = 0), it is an error signaled by the Unknown TLV Status Code.
If the TLV type is >= 0x8000 (high order bit = 1), the TLV is silently dropped.
-
The TLV Value is malformed. This occurs when the receiver handles the TLV but cannot decode the TLV Value. This is interpreted as indicative of a bug in either the sending or receiving LSR. It is a fatal error signaled by the Malformed TLV Value Status Code.
3.5.1.2.3. Session KeepAlive Timer Expiration
This is a fatal error signaled by the KeepAlive Timer Expired Status Code.
3.5.1.2.4. Unilateral Session Shutdown
This is a fatal event signaled by the Shutdown Status Code. The Notification message may optionally include an Extended Status TLV to provide a reason for the Shutdown. The sending LSR terminates the session immediately after sending the Notification.
3.5.1.2.5. Initialization Message Events
The session initialization negotiation (see Section "Session Initialization") may fail if the session parameters received in the Initialization message are unacceptable. This is a fatal error. The specific Status Code depends on the parameter deemed unacceptable, and is defined in Sections "Initialization Message".
3.5.1.2.6. Events Resulting from Other Messages
Messages other than the Initialization message may result in events that must be signaled to LDP peers via Notification messages. These events and the Status Codes used in the Notification messages to signal them are described in the sections that describe these messages.
3.5.1.2.7. Internal Errors
An LDP implementation may be capable of detecting problem conditions specific to its implementation. When such a condition prevents an implementation from interacting correctly with a peer, the implementation should, when capable of doing so, use the Internal Error Status Code to signal the peer. This is a fatal error.
3.5.1.2.8. Miscellaneous Events
These are events that fall into none of the categories above. There are no miscellaneous events defined in this version of the protocol.