Вы находитесь на странице: 1из 12

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 

Constraint-based Routing with LDP

CR-LDP

RSVP with TE extensions

RSVP-TE

Distributing labels with BGP-4

Label Distribution Protocol


Upstream Net: 10.0.0.0 Net: 10.0.0.0 Downstream Net: 10.0.0.0
LDP peer Label: 17
LSR Label: 52 LDP peer Label: 29

3 1 4 5 2 3

MPLS Table MPLS Table MPLS Table


In Out Advertise In Out Receive In Out
(3, 35) (1, 17) incoming (4, 17) (5, 52)
outgoing
(2, 52) (3, 29)
label label

 Labels assigned by downstream peer


 Limitations
LSPs follow the conventional IGP path
Does not support explicit routing
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 at the ingress
LDP Messages
LDP communicate using messages
There are 4 categories of LDP messages
Discovery Messages

 Announce and maintain the presence of an LSR


Session Messages

 Establish, maintain and terminate session between LDP


peers
Advertisement Messages

 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 for each LDP 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(Port-646)
Uses UDP transport for Discovery messages(Port-646)

A LDP Discovery Msg Session Msgs

T UDP TCP

N IP

D To/From Physical Layer

LDP Messages
LDP Messages & Codes

S.No. Message Name Message Value


1. Notification 0001H
2. Hello 0100H
3. I ntialisation 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 PDU Message Format
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


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

Message Length (2B)


Length in octets of the Message ID, Mandatory
Parameters & Optional Parameters
Message ID (4B)
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
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 (2B)
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
Hello Message
Hold Time-Seconds
0000-Default time of 15 sec for Link Hello and 45 sec for

Targeted Hello
FFFF-Means infinite

T-Bit-Target Hello Bit


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 for LDP session establishment

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
Initialisation Message
Protocol Version (2B)
LDP protocol version

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
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)
Configured maximum path vector length

Must be 0 if loop detection is disabled

Maximum PDU Length (2B)


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

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
Address Withdraw Message
An LSR sends to withdraw previously advertised interface
addresses
LDP Label Distribution
MPLS label distribution and management can be done in 2
ways
Downstream on Demand Label Distribution

FEC-Label bindings are distributed in response to an

explicit request from another LSR


Downstream Unsolicited

FEC-Label bindings are distributed to LSRs that have

not explicitly requested them


Both of these techniques may be used in the same network
at the same time
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 prevent these
messages going into loop
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

Label Mapping Message


Label Abort Message
Label Withdraw Message
Label Release Message
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 ……….

Notification Message
Notification Message
Status TLV
U-Bit

 0-Status TLV is sent in notification message


 1-Status TLV is sent in some other message
F-Bit

 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

Вам также может понравиться