Beruflich Dokumente
Kultur Dokumente
Sudhir Chadha
Divisional Engineer(DX)
Tel:+91-0120-2728429(O)
+91-0120-2728440(R)
E-mail: sudhirchadha@bsnl.in
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)
ALTTC/DX/SC/LDP 2
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
ALTTC/DX/SC/LDP 3
Label Distribution Protocol
Upstream Net: 10.0.0.0 Net: 10.0.0.0 Downstream Net:
LDP peer
LSR Label: 52 LDP peer 10.0.0.0
Label: 17 Label: 29
3 1 4 5 2 3
ALTTC/DX/SC/LDP 6
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
ALTTC/DX/SC/LDP 7
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) ALTTC/DX/SC/LDP 8
LDP Messages
T UDP TCP
N IP
ALTTC/DX/SC/LDP 9
LDP Messages & Codes
S.No. Message Name Message
Value
1. Notification 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 0404H
Request
ALTTC/DX/SC/LDP 10
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
ALTTC/DX/SC/LDP 11
LDP PDU Message Format
ALTTC/DX/SC/LDP 12
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
ALTTC/DX/SC/LDP 13
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
ALTTC/DX/SC/LDP 14
LDP Message Format
Octet-0 Octet-1 Octet-2 Octet-3
U MESSAGE TYPE MESSAGE LENGTH
MESSAGE ID
MANDATORY PARAMETERS
OPTIONAL PARAMETERS
ALTTC/DX/SC/LDP 17
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
ALTTC/DX/SC/LDP 18
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
ALTTC/DX/SC/LDP 19
LDP OPERATION
LDP Discovery
Session Establishment
Label Distribution
Error Notification
ALTTC/DX/SC/LDP 20
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
ALTTC/DX/SC/LDP 21
Hello Message
0 0 0X0400 LENGTH
HOLD TIME T R RESERVED
ALTTC/DX/SC/LDP 22
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
ALTTC/DX/SC/LDP 23
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
ALTTC/DX/SC/LDP 24
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
ALTTC/DX/SC/LDP 25
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
ALTTC/DX/SC/LDP 26
Initialisation Message
0 0 0x0500 LENGTH
PROTOCOL VERSION KEEP ALIVE TIME
A D RESERVED PV LIMIT MAXIMUM PDU LENGTH
RECEIVER LDP IDENTIFIER
RECEIVER LDP IDENTIFIER
ALTTC/DX/SC/LDP 27
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
ALTTC/DX/SC/LDP 28
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
ALTTC/DX/SC/LDP 29
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
ALTTC/DX/SC/LDP 30
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
ALTTC/DX/SC/LDP 31
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
ALTTC/DX/SC/LDP 32
Address Message
An LSR sends the address message
to advertise its interface addresses
0 0 0X0101 LENGTH
ADDRESS FAMILY ADDRESSES
ADDRESSES
ADDRESSES
ALTTC/DX/SC/LDP 33
Address Withdraw Message
An LSR sends to withdraw previously
advertised interface addresses
0 0 0X0101 LENGTH
ADDRESS FAMILY ADDRESSES
ADDRESSES
ADDRESSES
ALTTC/DX/SC/LDP 34
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
ALTTC/DX/SC/LDP 35
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 ALTTC/DX/SC/LDP
mechanism is used 36to
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
ALTTC/DX/SC/LDP 37
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 ALTTC/DX/SC/LDP 38
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
ALTTC/DX/SC/LDP 39
Label Request Message
0 0 0X0100 LENGTH
FEC ELEMENT-1
…………………..
FEC ELEMENT-N
ALTTC/DX/SC/LDP 40
Label Mapping Message
0 0 0X0100 LENGTH
FEC ELEMENT-1
…………………..
FEC ELEMENT-N
0 0 0X0200 LENGTH
LABEL
0 0 0X0200 LENGTH
LABEL
ALTTC/DX/SC/LDP 42
Label Withdraw Message
0 0 0X0100 LENGTH
FEC ELEMENT-1
…………………..
FEC ELEMENT-N
0 0 0X0200 LENGTH
LABEL
ALTTC/DX/SC/LDP 43
Label Release Message
0 0 0X0100 LENGTH
FEC ELEMENT-1
…………………..
FEC ELEMENT-N
0 0 0X0200 LENGTH
LABEL
ALTTC/DX/SC/LDP 47
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
ALTTC/DX/SC/LDP 48
Notification Message
Status TLV
Indicates the event being signaled
Malformed PDU
Malformed TLV
Expiry of Session Keep-alive Timer
Unilateral Session Shutdown ……….
Octet-0 Octet-1 Octet-2 Octet-3
0 NOTIFICATION (0001H) LENGTH
MESSAGE ID
STATUS (TLV)
OPTIONAL PARAMETERS
ALTTC/DX/SC/LDP 49
Notification Message
E F STATUS DATA
UF STATUS LENGTH
STATUS CODE
MESSAGE ID
MESSAGE TYPE
ALTTC/DX/SC/LDP 50
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
ALTTC/DX/SC/LDP 51
ALTTC/DX/SC/LDP 52