Label Distribution Protocol

Label Distribution Protocols

Label distribution protocol is a set of rules and procedures that one LSR can use to inform another LSR about which label will be used to to forward MPLS traffic between and through them The path set up by these bilateral agreement is called label switched path (LSP)

Label Distribution Protocols

MPLS architecture does not assume a single label distribution protocol. A number of protocols have been standarised

Label Distribution Protocol

LDP CR-LDP RSVP-TE

Constraint-based Routing with LDP

RSVP with TE extensions

Distributing labels with BGP-4

Label Distribution Protocol
Upstream LDP peer Net: 10.0.0.0 Label: 17

LSR 4 5

Net: 10.0.0.0 Label: 52

Downstream LDP peer

Net: 10.0.0.0 Label: 29

3

1

2
Receive outgoing label

3

MPLS Table
In (3, 35) Out (1, 17)

Advertise incoming label

MPLS Table
In (4, 17) Out (5, 52)

MPLS Table
In (2, 52) Out (3, 29)

Labels assigned by downstream peer

Limitations

LSPs follow the conventional IGP path

Label Distribution Protocol

Set of procedures and messages by which LSRs create LSPs through a network by mapping network layer routing information directly to data link layer switched paths LSPs may have their end point
 

At a directly attached LSR At a network egress LSR i.e. number of LSRs away

 

A FEC be defined for each of the LSP Each EFC contains one or more FEC elements Each element identifies which set of incoming packets will be mapped to an LSP

LDP Messages
 

LDP communicate using messages There are 4 categories of LDP messages

Discovery Messages

Announce and maintain the presence of an LSR Establish, maintain and terminate session between LDP peers Create, change and delete label mappings for FECs Advisory and signal error notification

Session Messages

Advertisement Messages

Notification Messages

LDP Messages

 

Discovery messages provide a mechanism by which the LSRs indicate their presence in a network by sending Hello message periodically This is transmitted as a UDP packet When an LSR chooses to establish a session with another LSR learned via Hello message, uses LDP initialisation procedure over TCP transport When multiple sessions are required between two LSRs there is one TCP session

LDP Messages

Upon successful completion of the initialisation procedure, the two LSRs are LDP peers and may exchange advertisement messages LDP peers communicate over an LDP session created between them An LSP can be viewed as a series of LDP peers and their associated sessions Correct operation of LDP requires reliable and in order delivery of messages

Uses the TCP transport for Session, Advertisement and Notification messages(Port646)

LDP Messages
A T N D LDP Discovery Msg UDP IP Session Msgs TCP

To/From Physical Layer

LDP Messages & Codes
S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Message Name Notification Hello Intialisation Keep Alive Address Label Mapping Label Request Label Withdraw Label Release Label Abort Request Message Value 0001H 0100H 0200H 0201H 0300H 0400H 0401H 0402H 0403H 0404H

Address Withdraw 0301H

LDP Message Exchange

LDP message exchanges are accomplished by sending LDP protocol data units (PDUs) over LDP session TCP connections Each LDP PDU can carry one or more messages Messages in an LDP PDU need not be related to one another
LDP Header LDP Msg#1 LDP Msg#2 LDP Msg#N LDP PDU

LDP PDU Message Format

LDP Header LDP Msg#1 LDP Msg#2 LDP Msg#N LDP PDU
Octet-0 Octet-1 Octet-2 Octet-3

VERSION LDP IDENTIFIER LDP IDENTIFIER

LENGTH

LDP Header (10Bytes)

Version(2B)

Present version is 1 Total PDU length in octets Exclusive of the version and length fields Negotiated during session intialisation Maximum allowable length is 4096 Bytes

Length(2B)
   

LDP Header (10Bytes)
 

LDP Identifier(6B) Uniquely identifies the label space of the sending LSR

Router ID (4B)

Identifies the LSR and must be a globally unique value Router ID is the IP address of this LSR Identifies the label space within the LSR

Label Space ID (2B)

LDP Message Format
Octet-0 Octet-1 Octet-2 Octet-3

U

MESSAGE TYPE MESSAGE ID

MESSAGE LENGTH

MANDATORY PARAMETERS OPTIONAL PARAMETERS

U bit-Unknown message bit

Upon receipt of an unknown message, if

U=0, a notification must be returned to the message originator U=1, the unknown message is silently ignored and the rest of message is processed

LDP Messages

Message Type (15 b)

Identifies the type of message Length in octets of the Message ID, Mandatory Parameters & Optional Parameters Notification messages, if to be sent, in response to this message carry this value back in the Status TLV

Message Length (2B)

Message ID (4B)

 

Mandatory Parameters-Variable Optional Parameters-Variable

Type-Length-Value Encoding

LDP messages carry information, encoded in Type-Length-Value (TLV) format
Octet-0 Octet-1 Octet-2 Octet-3

UF

TYPE VALUE ……………..

LENGTH

LDP Header LDP Msg#1 LDP Msg#2 LDP Msg#N LDP PDU

Type-Length-Value Encoding

U bit-Unknown TLV bit

Upon receipt of an unknown TLV, if

U=0, a notification must be returned to the message originator and ENTIRE message must be ignored U=1, the unknown TLV is silently ignored and the rest of message is processed

F bit-Forward Unknown TLV bit

Applies only when U=1, if

F=0, the unknown TLV is NOT forwarded with the containing message F=1, the unknown TLV is forwarded with the containing message

Type-Length-Value Encoding

Type (14b)

Identifies the various message types Length in octets of ONLY the value field String of octets that encodes the information TLVs can be nested i.e. Value field itself may contain further TLV encodings

Length (2B)

Value-Variable

LDP OPERATION
   

LDP Discovery Session Establishment Label Distribution Error Notification

LDP Discovery

LDP discovery is a mechanism that enables an LSR to discover potential LDP peers

Basic discovery

To discover LSR neighbors that are directly connected at the link level LSR periodically sends LDP link hellos out the interface as UDP packets using group multicast address To discover LSRs that are not directly connected at the link level LSR periodically sends LDP targeted hellos as UDP packets to a specific address

Extended discovery

Hello Message

0 0

0X0400 HOLD TIME T R

LENGTH RESERVED

Octet-0

Octet-1

Octet-2

Octet-3

0

HELLO (0100H) MESSAGE ID

MESSAGE LENGTH

COMMON HELLO PARAMETERS (TLV) OPTIONAL PARAMETERS

Hello Message

Hold Time-Seconds

0000-Default time of 15 sec for Link Hello and 45 sec for Targeted Hello FFFF-Means infinite 0-Link Hello 1-Targeted Hello 0-No Request 1-Request the receiver to send Target Hello

T-Bit-Target Hello Bit
 

R-Bit-Request Send Target Hello
 

LDP Discovery

LSR receiving hellos from another LSR maintains a hello adjacency If the parameters contained in the hello are acceptable

LSRs proceed establishment

for

LDP

session

If the parameters contained in the hello are not acceptable

LSRs ignore it and LDP session can not be established

LDP Session Establishment

Session establishment is a 2 step process:
 

Transport connection establishment Session intialisation TCP connection will be established for a new LDP session by the Active LSR LSRs will compare the Transport Address exchanged in the optional parameter of Hellos The LSR with greater Transport Address will become Active LSR If NO Transport Addresses are negotiated LSR with greater Router ID will become Active LSR

Transport connection establishment
 

LDP Session Establishment

Session intialisation

Active LSR starts negotiating session parameters by exchanging LDP intialisation messages
  

LDP Protocol version Label Distribution Method Timer Values etc.

If the parameters are acceptable the session is established and keep-alive messages are periodically exchanged If the parameters are NOT acceptable the session can not be established and TCP connection is closed

Initialisation Message
0 0 0x0500 PROTOCOL VERSION A D RESERVED PV LIMIT LENGTH KEEP ALIVE TIME MAXIMUM PDU LENGTH

RECEIVER LDP IDENTIFIER RECEIVER LDP IDENTIFIER

Octet-0

Octet-1

Octet-2

Octet-3

0

INITIALISATION (0200H) MESSAGE ID

MESSAGE LENGTH

COMMON SESSION PARAMETERS (TLV) OPTIONAL PARAMETERS

Initialisation Message

Protocol Version (2B)

LDP protocol version Time in seconds that may elapse between the receipt of successive PDUs from the LDP peer on the session TCP connection 0-Downstream Unsolicited Advertisement 1-Downstream on demand 0-Loop Detection Disabled 1-Loop Detection enabled

Keep-alive Time (2B)

A-Bit-Label Advertisement Discipline
 

D-Bit-Loop Detection
 

Initialisation Message

PV Limit-Path Vector Limit (1B)
 

Configured maximum path vector length Must be 0 if loop detection is disabled Maximum allowable length for LDP PDUs Default is <=255 Octets Maximum is 4096 Octets Identifies the receiver’s label space This together with sender’s LDP identifier in the PDU header enables the receiver to match the initialisation message with its hello adjacencies

Maximum PDU Length (2B)
  

Maximum PDU Length (2B)
 

LDP Session Monitoring

LDP includes mechanism to monitor the integrity of LDP session An LSR maintains a Keep-Alive timer for each peer session If Keep-Alive timer expires without receipt of an LDP-PDU, LDP session is terminated and TCP connection is closed

Keep Alive Message

An LSR must arrange that its peer receive an protocol message or a Keep-Alive message from it at least every Keep-Alive timer
Octet-0 Octet-1 Octet-2 Octet-3

0

KEEPALIVE (0201H) MESSAGE ID

MESSAGE LENGTH

OPTIONAL PARAMETERS

LDP Identifiers & NH Addresses

An LSR maintains learned labels in a LIB (Label Information Base) When the next hop for a prefix changes the LSR must retrieve the label advertised by the new next hop from the LIB for use in forwarding To enable LSRs to map between a peer LDP identifier and the peer’s addresses, LSRs advertise their addresses using LDP Address and Address Withdraw messages

Address Message

An LSR sends the address message to advertise its interface addresses
0 0 0X0101 ADDRESS FAMILY ADDRESSES ADDRESSES LENGTH ADDRESSES

Octet-0

Octet-1

Octet-2

Octet-3

0

ADDRESS (0300H) MESSAGE ID

MESSAGE LENGTH

ADDRESS LIST (TLV) OPTIONAL PARAMETERS

Address Withdraw Message

An LSR sends to withdraw previously advertised interface addresses
0 0 0X0101 ADDRESS FAMILY ADDRESSES ADDRESSES LENGTH ADDRESSES

Octet-0

Octet-1

Octet-2

Octet-3

0 ADDRESS WITHDRAW (0301H) MESSAGE ID

MESSAGE LENGTH

ADDRESS LIST (TLV) OPTIONAL PARAMETERS

LDP Label Distribution

MPLS label distribution and management can be done in 2 ways

Downstream Distribution

on

Demand

Label

FEC-Label bindings are distributed in response to an explicit request from another LSR FEC-Label bindings are distributed to LSRs that have not explicitly requested them

Downstream Unsolicited

Both of these techniques may be

LDP Label Distribution

Each interface on an LSR is configured to operate in either Downstream on Demand Label Distribution or Downstream Unsolicited For any given session, each LSR must be aware of the label distribution method used by its peer LSRs exchange advertisement modes during initialisation Label Request and Label Mapping messages are exchanged for label distribution Loop Detection mechanism is used to

Label Distribution

Label Request Message

An upstream LSR sends this message to a downstream LDP peer to assign and advertise a binding (mapping) for a FEC A downstream LSR sends this message to the upstream LSR for a FEC An LSR receiving this message should not use the label for forwarding unless its routing table contains an entry that exactly matches the FEC element

Label Mapping Message
 

Label Distribution

Label Abort Request Message

An upstream LSR sends this message to abort an outstanding Label Request Message for FEC sent to downstream LSR A downstream LSR sends this message to an upstream LSR that the peer may not continue to use specific FEC-Label mappings the LSR had previously advertised

Label Withdraw Message

Label Distribution

Label Release Message

An upstream LSR sends this message to a downstream LSR that the peer no longer needs specific FEC-Label mappings previously requested

Label Request Message
0 0 0X0100 FEC ELEMENT-1 ………………….. FEC ELEMENT-N
Octet-0 Octet-1 Octet-2 Octet-3

LENGTH

0

LABEL REQUEST (0401H) MESSAGE ID FEC (TLV)

MESSAGE LENGTH

OPTIONAL PARAMETERS

Label Mapping Message
0 0 0X0100 FEC ELEMENT-1 ………………….. FEC ELEMENT-N 0 0 0X0200 LABEL
Octet-0 Octet-1 Octet-2 Octet-3

LENGTH

LENGTH

0

LABEL MAPPING (0400H) MESSAGE ID FEC (TLV) LABEL (TLV) OPTIONAL PARAMETERS

LENGTH

Label Abort Message
0 0 0X0100 FEC ELEMENT-1 ………………….. FEC ELEMENT-N 0 0 0X0200 LABEL
Octet-0 Octet-1 Octet-2 Octet-3

LENGTH

LENGTH

0

LABEL ABORT REQUEST (0404H) MESSAGE ID FEC (TLV)

MESSAGE LENGTH

LABEL REQUEST MESSAGE ID (TLV) OPTIONAL PARAMETERS

Label Withdraw Message
0 0 0X0100 FEC ELEMENT-1 ………………….. FEC ELEMENT-N 0 0 0X0200 LABEL
Octet-0 Octet-1 Octet-2 Octet-3

LENGTH

LENGTH

0

LABEL ABORT REQUEST (0402H) MESSAGE ID FEC (TLV)

MESSAGE LENGTH

LABEL (TLV)-Optional OPTIONAL PARAMETERS

Label Release Message
0 0 0X0100 FEC ELEMENT-1 ………………….. FEC ELEMENT-N 0 0 0X0200 LABEL LENGTH LENGTH

Octet-0

Octet-1

Octet-2

Octet-3

0

LABEL RELEASE (0403H) MESSAGE ID FEC (TLV) LABEL (TLV)-Optional OPTIONAL PARAMETERS

LENGTH

Loop Detection Mechanism

Loop detection is a configurable option

Path Vector TLV

A message propagated by an LSR adds its LSR ID to the path vector list An LSR receiving a message containing its LSR ID detects that the message has traversed a loop Also an LSR that detects a path vector has reached the maximum configured length treats as if the message has traversed a loop A message propagated by an LSR increments the hop count An LSR that detects a hop count has reached the configured value treats as if the message has traversed a loop

Hop Count TLV

Label Distribution Control Mode

The behavior of the initial setup of LSPs is determined by the label distribution control mode

Independent Label Distribution Control

Each LSR may advertise label mappings to its neighbor at any time without waiting for a label mapping from the next hop The LSR must wait until a label from a downstream LSR is received before mapping the FEC and passing corresponding labels to upstream LSRs

Ordered Label Distribution Control

Label Retention Mode

Specifies whether an LSR maintains a label binding for a FEC learned from a neighbor that is not its next hop for the FEC

Conservative Label Retention Mode

Label mapping advertisements of all routes are received from all peers but only those mappings will be retained which will be used to forward packets Label mapping advertisements of all routes are received and retained from all peers regardless of whether the LSR is the next hop for the advertising mapping

Liberal Label Retention Mode

Error Notification

Sent by LSR to inform LDP peer of a significant event Two types of Notification Messages

Error Notification

Signal fatal errors
  

Expiration of a keep-alive timer Shutdown by a node Failure of an LSP session initialisation

Advisory Notification
 

Outcome of processing an LDP message State of the LDP session

Notification Message

Status TLV

Indicates the event being signaled
   

Malformed PDU Malformed TLV Expiry of Session Keep-alive Timer Unilateral Session Shutdown ……….
Octet-1 Octet-2 Octet-3

Octet-0

0

NOTIFICATION (0001H) MESSAGE ID STATUS (TLV) OPTIONAL PARAMETERS

LENGTH

Notification Message
E F STATUS DATA

UF

STATUS STATUS CODE MESSAGE ID MESSAGE TYPE

LENGTH

Octet-0

Octet-1

Octet-2

Octet-3

0

NOTIFICATION (0001H) MESSAGE ID STATUS (TLV) OPTIONAL PARAMETERS

LENGTH

Notification Message

Status TLV

U-Bit
 

0-Status TLV is sent in notification message 1-Status TLV is sent in some other message Same as F-Bit in Status Code field

F-Bit

Status Code

E-Bit- Fatal Error Bit
 

0-Advisory Notification 1-Fatal Error Notification 0-Notification should not be forwarded 1-Notification should be forwarded to the NH LSR

F-Bit- Forward Bit
 

Sign up to vote on this title
UsefulNot useful