Ldp

  • Uploaded by: api-26084493
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ldp as PDF for free.

More details

  • Words: 2,690
  • Pages: 52
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 



Constraint-based Routing with LDP 



CR-LDP

RSVP with TE extensions 



LDP

RSVP-TE

Distributing labels with BGP-4

Label Distribution Protocol Upstream LDP peer

Net: 10.0.0.0

LSR

Net: 10.0.0.0 Label: 52

Downstream LDP peer

Label: 17

3

1

4

MPLS Table



In

Out

(3, 35)

(1, 17)

Advertise incoming label

5

MPLS Table In

Out

(4, 17)

(5, 52)

2 Receive outgoing label

Net: 10.0.0.0 Label: 29

3

MPLS Table In

Out

(2, 52)

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



Session Messages 



Establish, maintain and terminate session between LDP peers

Advertisement Messages 



Announce and maintain the presence of an LSR

Create, change and delete label mappings for FECs

Notification Messages 

Advisory and signal error notification

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

LDP Discovery Msg

Session Msgs

UDP

TCP

N

IP

D

To/From Physical Layer

LDP Messages & Codes S.No.

Message Name

1.

Notification

Message Value 0001H

2.

Hello

0100H

3.

Intialisation

0200H

4.

Keep Alive

0201H

5.

Address

0300H

6.

Address Withdraw 0301H

7.

Label Mapping

0400H

8.

Label Request

0401H

9.

Label Withdraw

0402H

10.

Label Release

0403H

11.

Label Abort Request

0404H

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

VERSION

LENGTH LDP IDENTIFIER

LDP IDENTIFIER

Octet-3

LDP Header (10Bytes) 

Version(2B) 



Present version is 1

Length(2B)    

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

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

Label Space ID (2B) 

Identifies the label space within the LSR

LDP Message Format Octet-0

U

Octet-1

Octet-2

MESSAGE TYPE

Octet-3

MESSAGE LENGTH MESSAGE ID

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



Message Length (2B) 





Length in octets of the Message ID, Mandatory Parameters & Optional Parameters

Message ID (4B) 



Identifies the type of message

Notification messages, if to be sent, in response to this message carry this value back in the Status TLV

Mandatory Parameters-Variable Optional Parameters-Variable

Type-Length-Value Encoding 

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

UF

Octet-1

Octet-2

TYPE

Octet-3

LENGTH VALUE ……………..

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



Length (2B) 



Identifies the various message types Length in octets of ONLY the value field

Value-Variable 



String of octets that encodes the information TLVs can be nested i.e. Value field itself may contain further TLV encodings

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

Extended discovery 



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

Hello Message

0 0

0X0400

LENGTH

HOLD TIME

Octet-0

0

T R

Octet-1

RESERVED

Octet-2

HELLO (0100H)

Octet-3

MESSAGE LENGTH MESSAGE ID

COMMON HELLO PARAMETERS (TLV) OPTIONAL PARAMETERS

Hello Message 

Hold Time-Seconds 





T-Bit-Target Hello Bit  



0000-Default time of 15 sec for Link Hello and 45 sec for Targeted Hello FFFF-Means infinite 0-Link Hello 1-Targeted Hello

R-Bit-Request Send Target Hello  

0-No Request 1-Request the receiver to 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

Transport connection establishment 







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

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

LENGTH

PROTOCOL VERSION A D RESERVED

KEEP ALIVE TIME

PV LIMIT

MAXIMUM PDU LENGTH

RECEIVER LDP IDENTIFIER RECEIVER LDP IDENTIFIER

Octet-0

0

Octet-1

Octet-2

INITIALISATION (0200H)

Octet-3

MESSAGE LENGTH

MESSAGE ID COMMON SESSION PARAMETERS (TLV) OPTIONAL PARAMETERS

Initialisation Message 

Protocol Version (2B) 



Keep-alive Time (2B) 



Time in seconds that may elapse between the receipt of successive PDUs from the LDP peer on the session TCP connection

A-Bit-Label Advertisement Discipline  



LDP protocol version

0-Downstream Unsolicited Advertisement 1-Downstream on demand

D-Bit-Loop Detection  

0-Loop Detection Disabled 1-Loop Detection enabled

Initialisation Message 

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



Maximum PDU Length (2B)   



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

Maximum PDU Length (2B)  

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

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

0

Octet-1

Octet-2

KEEPALIVE (0201H)

Octet-3

MESSAGE LENGTH MESSAGE ID

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

LENGTH

ADDRESS FAMILY

ADDRESSES ADDRESSES

ADDRESSES

Octet-0

0

Octet-1

Octet-2

ADDRESS (0300H)

Octet-3

MESSAGE LENGTH MESSAGE ID

ADDRESS LIST (TLV) OPTIONAL PARAMETERS

Address Withdraw Message 

An LSR sends to withdraw previously advertised interface addresses 0 0

0X0101

LENGTH

ADDRESS FAMILY

ADDRESSES ADDRESSES

ADDRESSES

Octet-0

Octet-1

Octet-2

0 ADDRESS WITHDRAW (0301H)

Octet-3

MESSAGE LENGTH

MESSAGE ID ADDRESS LIST (TLV) OPTIONAL PARAMETERS

LDP Label Distribution 

MPLS label distribution and management can be done in 2 ways 

Downstream Distribution 



Demand

Label

FEC-Label bindings are distributed in response to an explicit request from another LSR

Downstream Unsolicited 



on

FEC-Label bindings are distributed to LSRs that have not explicitly requested them

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

Label Mapping Message 



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

Label Abort Request Message 



An upstream LSR sends this message to abort an outstanding Label Request Message for FEC sent to downstream LSR

Label Withdraw Message 

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

LENGTH FEC ELEMENT-1 ………………….. FEC ELEMENT-N

Octet-0

0

Octet-1

Octet-2

LABEL REQUEST (0401H)

Octet-3

MESSAGE LENGTH

MESSAGE ID FEC (TLV) OPTIONAL PARAMETERS

Label Mapping Message 0 0

0X0100

LENGTH FEC ELEMENT-1 ………………….. FEC ELEMENT-N

0 0

0X0200

LENGTH LABEL

Octet-0

0

Octet-1

Octet-2

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

Octet-3

LENGTH

Label Abort Message 0 0

0X0100

LENGTH FEC ELEMENT-1 ………………….. FEC ELEMENT-N

0 0

0X0200

LENGTH LABEL

Octet-0

0

Octet-1

Octet-2

LABEL ABORT REQUEST (0404H) MESSAGE ID

Octet-3

MESSAGE LENGTH

FEC (TLV) LABEL REQUEST MESSAGE ID (TLV) OPTIONAL PARAMETERS

Label Withdraw Message 0 0

0X0100

LENGTH FEC ELEMENT-1 ………………….. FEC ELEMENT-N

0 0

0X0200

LENGTH LABEL

Octet-0

0

Octet-1

Octet-2

LABEL ABORT REQUEST (0402H) MESSAGE ID

Octet-3

MESSAGE LENGTH

FEC (TLV) LABEL (TLV)-Optional OPTIONAL PARAMETERS

Label Release Message 0 0

0X0100

LENGTH FEC ELEMENT-1 ………………….. FEC ELEMENT-N

0 0

0X0200

LENGTH LABEL

Octet-0

0

Octet-1

Octet-2

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

Octet-3

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

Hop Count TLV 



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

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

Ordered Label Distribution Control 

The LSR must wait until a label from a downstream LSR is received before mapping the FEC and passing corresponding labels to upstream LSRs

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

Liberal Label Retention Mode 

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

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

0

Octet-1

Octet-2

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

Octet-3

LENGTH

Notification Message E F

STATUS DATA

UF

STATUS

LENGTH STATUS CODE MESSAGE ID

MESSAGE TYPE

Octet-0

0

Octet-1

Octet-2

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

Octet-3

LENGTH

Notification Message 

Status TLV 

U-Bit  



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

Status Code 

E-Bit- Fatal Error Bit  



0-Advisory Notification 1-Fatal Error Notification

F-Bit- Forward Bit  

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

Related Documents

Ldp
November 2019 35
Ldp Riska.docx
December 2019 36
Ldp Dev
June 2020 14
Panduan Pelaporan Ldp
November 2019 27
Kertas Kerja Ldp 3
December 2019 24
Lampiran A Ldp
June 2020 9