• Aucun résultat trouvé

Label Distribution Protocol Message Format

Dans le document Network Processors (Page 155-159)

Label Switched Routers exchange LDP messages between them that can be categorized into four types:

1. Discovery messages—Announcing the presence of an LSR in the network by sending periodic UDP Hello messages.

2. Session messages—Establishing, maintaining, and terminating LDP sessions between LDP peers (including Initialization and KeepAlive messages).

3. Advertisement messages—Creating, changing, and deleting label mappings assigned to or associated with FECs.

4. Notifi cation messages—Providing information (about the session or the status of a previously received message) and error signaling.

Following the discovery process, an LSR can establish an LDP session with a discovered LSR by using the LDP initialization procedure over TCP. The LSRs that maintain an LDP session are known as “LDP peers.” LDP protocol is bidirectional, that is each LDP session allows both peers to exchange and learn label mappings from the other.

Label Distribution Protocol uses TCP (port 646) for the session, advertisement and notifi cation messages for reliability demands and in-order delivery of mes-sages. For the discovery mechanism, LDP used UDP (port 646) in order to distrib-ute the LDP Hello messages without the requirement to establish a TCP session ahead.

Each LDP PDU63 contains an LDP header followed by one or more LDP messages.

LDP header is described in Figure A3.8. Version is a two-byte fi eld that indicates the protocol version. PDU Length is also a two-byte fi eld that indicates the total length of the PDU in bytes (excluding the fi rst four bytes of the Version and PDU Length fi elds). LDP Identifi er is a 6-byte fi eld that is used for assignment and distribution of

63All message types, as well as TLV information types, are detailed and updated in http://www.iana.

org/assignments/ldp-namespaces.

Appendix A: Routing Information Distribution Protocols 143

0 1 2 3

Version PDU Length

4 8 0

LDP Identifier

FIGURE A3.8 LDP header format

0 1 2 3

U 0 4 8

Message Type Message Length

Message Identifier Mandatory Parameters

Optional Parameters FIGURE A3.9

LDP message format

labels. The fi rst four bytes of the LDP Identifi er identify the LSR (e.g., its IP address), and the other 2-byte fi eld (called label space)64 can be used to identify an interface within the LSP platform.

An LDP message is described in Figure A3.9. Message Type indicates the type of message, and is a two-byte fi eld, starting with a U (Unknown message) bit. If the received Message Type is unknown, and the U bit is set to “1,” the message is silently ignored, otherwise, if the U bit is set to “0,” a notifi cation is sent to the LSR that originated the unknown message. Message Types and their classifi cations are grouped into the following categories, which are detailed in Table A3.1.

I General message types are 0x0001 to 0x00FF.

I Neighbor discovery message types are 0x0100 to 0x01FF.

I Initialization phase message types are 0x0200 to 0x02FF.

I Address message types are 0x0300 to 0x03FF.

I Label distribution message types are 0x0400 to 0x04FF.

I Connection-related messages have message types of 0x0500 to 0x05FF.

Message Length is a two-byte fi eld specifying the length of the message in bytes, excluding the fi rst four bytes of the Message Type and Message Length. The Message ID is a four-byte fi eld that identifi es the message in cases of notifi cations that refer to this message. Mandatory Parameters and Optional Parameters are variable length fi elds of required and optional sets of parameters. Parameters are specifi ed in LDP by the TLV encoding scheme.

LDP’s TLV has a typical structure as shown in Figure A3.10.An U (Unknown TLV) bit is used similarly to the U bit of the message; that is, the message is silently

64The label space is used to identify interfaces of the LSR (which is called per interface label space), or it contains zero for interfaces that can share the same labels (which is called platform-wide label space).

Table A3.1 LDP Messages

Message Name Message Type Type Description

Notifi cation 0x0001 Notifi cation Informs LDP peer of a signifi cant event

Hello 0x0100 Discovery Part of the LDP Discovery Mechanism

Initialization 0x0200 Session Part of the LDP session establishment KeepAlive 0x0201 Session Part of a mechanism that monitors the

LDP session transport connection Address 0x0300 Advertisement Advertises the LSR interface address Address

Withdraw

0x0301 Advertisement Used by an LSR to withdraw previously advertised interface addresses Label Mapping 0x0400 Advertisement Advertises LSR FEC-label bindings to

the LDP peer

Label Request 0x0401 Notifi cation LSR requests binding for a FEC from a LDP peer

Label Withdraw 0x0402 Notifi cation Used by LSR to notify a LDP peer that it cannot use previously advertised FEC label mapping

Label Release 0x0403 Notifi cation Used by a LSR to notify a LDP peer that a previously requested or advertised FEC label mapping is no longer needed

Label Abort Request 0x0404 Notifi cation Used to abort a Label Request message Call Setup 0x0500 LDP extensions for ITU-T’s Automatic Switched

Optical Network [5]

Call Release 0x0501

Vendor-Private 0x3E00-0x3EFF Used to transport vendor-private information between LSRs Experimental 0x3F00-0x3FFF

0 1 2 3

U

Value

F Type Length

0 4

FIGURE A3.10 TLV encoding

Appendix A: Routing Information Distribution Protocols 145

ignored when the received Type is unknown and the U bit is set to “1”; otherwise, if the U bit is set to “0,” a notifi cation is sent to the message originator. An F (Forward unknown TLV) bit is applied only when the U bit is set and the Type is unknown, and it determines that the message is to be forwarded with the contained message (when the F-bit is set to “1”), or not forwarded (when the F-bit is “0”).

The Type fi eld is 14 bits defi ning the Value, and Length is a two-byte fi eld specifying the length of the Value fi eld in bytes. Value is a variable length fi eld that contains information according to the Type fi eld. The Value fi eld may contain nested TLV information. The most commonly used TLVs that are defi ned in the LDP protocol are listed in Table A3.2, although there are additional TLVs

Table A3.2 TLV Types and Usage

TLV Type Contained in messages

Forwarding Equivalence Class (FEC) 0x0100 Label Mapping, Label Request, Label Abort Request, Label Withdraw, and Label Release

Address List 0x0101 Address, Address Withdraw

Hop Count 0x0103 Label Mapping, Label Request

Path Vector 0x0104 Label Mapping, Label Request

Generic Label 0x0200

ATM Label 0x0201 Initialization

Frame Relay Label 0x0202 Initialization

Status 0x0300 Notifi cation

Extended Status 0x0301 Notifi cation

Returned PDU 0x0302 Notifi cation

Returned Message 0x0303 Notifi cation

Common Hello Parameters 0x0400 Hello

IPv4 Transport Address 0x0401 Hello

Confi guration Sequence 0x0402 Hello

IPv6 Transport Address 0x0403 Hello

Common Session Parameters 0x0500 Initialization ATM Session Parameters 0x0501 Initialization Frame Relay Session Parameters 0x0502 Initialization Label Request Message ID 0x0600 Label Abort Request

in other LDP protocol enhancements, as described in the following subsection.

The most commonly used TLVs are FEC, Address List, Hop Count, Status, and Path Vector.

Dans le document Network Processors (Page 155-159)

Documents relatifs