Riverstone Networks RS Switch Router User Guide Release 8.0 17-21
MPLS Configuration LDP Configuration
17.4 LDP CONFIGURATION
LDP is a set of procedures and messages that allow LSRs to establish an LSP through a network by mapping
network-layer routing information to data-link layer switched paths. The LSP can have an endpoint at a directly
attached neighbor or it may have an endpoint at an egress LSR with switching enabled via transit LSRs. LDP supports
label distribution for MPLS forwarding along normally-routed paths (as determined by destination-based routing
protocols); this is also called MPLS hop-by-hop forwarding.
LDP is generally used in applications where traffic engineering is not required. In contrast, RSVP is generally used for
label distribution and LSP setup where traffic engineering is necessary, primarily in backbone networks. LDP is also
used for signaling layer 2 FEC-to-label mappings to tunnel L2 frames across an MPLS network, as discussed in
Section17.6.2, "Configuring Dynamic L2 Labels."
You must enable both LDP and MPLS on each router interface on which you want LDP to run. You also need to enable
a unicast routing protocol (for example, OSPF) on the same interface; otherwise, LSPs may not be established between
an egress router and all ingress routers. LDP can be enabled on all router interfaces or on specific router interfaces, as
described in Section 17.2, "Enabling and Starting MPLS on the RS." The following configuration commands enable
and start LDP and MPLS on the router interface to_r1 on the RS:
Note You must configure the router identifier on the LSR with the ip-router global
set router-id command.
Note You should not enable LDP, RSVP, or MPLS on interfaces where they will not be
used, as this creates an unnecessary amount of processing overhead and signaling
traffic.

17.4.1 Establishing LDP Sessions

LSRs that use LDP to exchange FEC-label binding information are called LDP peers. LDP allows LSRs to
automatically discover potential LDP peers. When LDP is started on the RS, the router attempts to discover other LDP
peers by sending LDP hello packets out on its LDP-enabled interfaces. LDP hello packets are sent as multicast UDP
packets. If multiple LDP-enabled interfaces exist between two adjacent routers, only one LDP session is established
between the routers.
An LDP session using a TCP connection is established between LDP peers to exchange the binding information. When
an LDP peer is discovered, the LSR attempts to establish an LDP session through the well-known port 646. After
session parameters are successfully negotiated between the peers, the session is used for label distribution.
ldp add interface to_r1
ldp start
mpls add interface to_r1
mpls start