LDP Point-to-Point LSPs

This chapter provides information about Label Distribution Protocol (LDP) point-to-point Label Switched Paths (LSPs)

Topics in this chapter include:

Applicability

This chapter is applicable to SR Linux 26.7.1. There are no prerequisites or conditions on the hardware for this configuration.

Overview

Because of the connectionless nature of the network layer protocol, IP packets travel through the network on a hop-by-hop basis with routing decisions made at each node. As a result, hyper aggregation of data on specific links may occur and it may impact the provider's ability to provide guaranteed service levels across the network end-to-end. To address these shortcomings, Multi-Protocol Label Switching (MPLS) was developed.

MPLS provides the capability to establish connection-oriented paths, called Label Switched Paths (LSPs), over a connectionless (IP) network. The LSP offers a mechanism to engineer network traffic independently from the underlying network routing protocol (mostly IP) to improve the network resiliency and recovery options and to permit delivery of services that are not readily supported by conventional IP routing techniques, such as Layer 2 Virtual Private Networks (VPNs). These benefits are essential for today's communication network explaining the wide deployment base of the MPLS technology.

RFC 3031 specifies the MPLS architecture whereas this chapter describes the configuration and troubleshooting of point-to-point LSPs on SR Linux.

Packet forwarding

When a packet of a connectionless network layer protocol travels from one router to the next, each router in the network makes an independent forwarding decision by performing the following basic tasks:
  1. analyzing the packet header
  2. referencing the local routing table to find the longest prefix match based on the destination address in the IP header
  3. sending out the packet on the corresponding interface

The first function partitions the entire set of incoming packets into a set of Forwarding Equivalence Classes (FECs). All packets mapped to a particular FEC are forwarded along the same path to the same destination. The second function maps each FEC to a next hop destination router. Each router along the path performs these actions.

In MPLS, the assignment of a packet to a particular FEC is done only when the packet enters the network. The FEC is mapped to an LSP, which must be established before the packets can be forwarded.

An MPLS egress label, representing the FEC to which the packet is assigned, is attached to the packet (push operation) and the labeled packet is forwarded to the next hop router along that LSP path.

At subsequent hops, the packet IP header is not analyzed. Instead, the ingress label is used as an index into a table which specifies the next hop and a new egress label. The ingress label is replaced with the new egress label (swap operation), and the packet is forwarded to the specified next hop.

At the MPLS network egress, the ingress label is removed from the packet (pop operation). If this router is the destination of the packet (based on the remaining packet), the packet is handed to the receiving application, such as a MAC VRF. If this router is not the destination of the packet, the packet is sent into a new MPLS tunnel or forwarded by conventional IP forwarding toward the Layer 3 destination.

Terminology

Figure 1. Generic MPLS network, MPLS label operations
Generic MPLS network, MPLS label operations shows a general network topology clarifying the MPLS-related terms. A Label Edge Router (LER) is a device at the edge of an MPLS network, with at least one interface outside the MPLS domain. A router is usually defined as an LER based on its position relative to a particular LSP:
  • The MPLS router at the head-end of an LSP is called the ingress Label Edge Router (ILER)
  • The MPLS router at the tail-end of an LSP is called the egress Label Edge Router (ELER)

The ILER receives unlabeled packets from outside the MPLS domain, applies MPLS egress labels to the packets, and forwards the labeled packets into the MPLS domain.

The ELER receives labeled packets from the MPLS domain, removes the ingress labels, and forwards unlabeled packets outside the MPLS domain. The ELER can signal an implicit-null label. This informs the previous hop to send MPLS packets without an outer egress label. This is known as Penultimate Hop Popping (PHP).

A Label Switching Router (LSR) is a device internal to an MPLS network, with all interfaces inside the MPLS domain. These devices switch labeled packets inside the MPLS domain. In the core of the network, LSRs ignore the packet IP header and simply forward the packet using the MPLS label swapping mechanism.

LSP establishment

The LSP must be established before any packets can be forwarded. To set up an LSP, labels need to be distributed for the path. Labels are usually distributed by a downstream router in the upstream direction (relative to the data flow). Label distribution can be static or via a protocol such as LDP. For static P2P LSPs, see Static MPLS LSPs.

LDP (RFC 5036) can be considered as an extension to the network Interior Gateway Protocol (IGP). As routers become aware of new destination networks, they advertise labels in the upstream direction that allow upstream routers to reach the destination.

LDP loopfree alternate (LFA) allows for computing backup paths and advertising the backup labels before a failure takes place. In this way traffic can flow almost continuously, without waiting for routing protocol convergence; see MPLS LDP LFA using ISIS as IGP.

Example topology

MPLS example topology shows the example topology consisting of six SR Linux nodes located in a single autonomous system.

Figure 2. MPLS example topology

Configuration

The configuration of dynamic MPLS LSPs requires a correctly working Interior Gateway Protocol (IGP). Intermediate System to Intermediate System (IS-IS) or Open Shortest Path First (OSPF) can be used as IGP.

LDP is a simple Label Distribution Protocol with basic MPLS functionality (no traffic engineering). It supports LFA for fast rerouting; see MPLS LDP LFA using ISIS as IGP. LDP relies on the underlying routing information provided by an IGP to forward labeled packets. Each LDP configured LSR originates a label for its system address and a label for each FEC for which it has a next hop that is external to the MPLS domain, without the explicit need to manually configure the LSPs. When deviations from this default behavior are needed, import and export policies can be applied.

The configuration is as simple as enabling the LDP protocol instance and adding all network interfaces, for each node. The configuration for IPv4 on node PE-1 is as follows; similar configurations apply on the other nodes. Configuration for IPv6 is also supported, but not described in this chapter.

# On PE-1:
enter candidate
    system mpls label-ranges {
                dynamic dlb-ldp {
                    start-label 20000
                    end-label 29999

enter candidate
    network-instance default protocols ldp {
                admin-state enable
                dynamic-label-block dlb-ldp
                fec-resolution {
                    longest-prefix true
                }
                discovery {
                    interfaces {
                        interface ethernet-1/2.1 {
                            ipv4 {
                                admin-state enable
                            }
                        }
                        interface ethernet-1/4.1 {
                            ipv4 {
                                admin-state enable
                            }
                        }
                    }
                }

The LDP label range must be explicitly configured on all nodes as dynamic in the system mpls label-ranges context. The FEC resolution is based on the longest prefix match, with longest-prefix true in the network-instance default protocols ldp fec-resolution context. By default, SR Linux supports /32 IPv4 and /128 IPv6 FEC resolution using IGP routes. When longest-prefix match is enabled for IPv4 and IPv6 FEC resolution, IPv4 and IPv6 prefix FECs can be resolved by less-specific routes in the route table, as long as the prefix bits of the route match the prefix bits of the FEC. The IP route with the longest prefix match is the route that is used to resolve the FEC.

On each node, the local network interfaces that are part of the MPLS network must be configured in the network-instance default protocols ldp discovery interfaces context.

The LDP configuration can be verified as follows:
# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# show / network-instance default protocols ldp summary
=========================================================================================================================================================
Net-Inst default LDP Summary
---------------------------------------------------------------------------------------------------------------------------------------------------------
Admin State                     : enable
FEC Match Longest Prefix        : true
Dynamic Label Block             : dlb-ldp
Dynamic Label Block Status      : available
Graceful Restart Enabled        : false
GR Max Reconnect Time           : 120
GR Max Recovery Time            : 120
Max Multipaths                  : 1
IPv4 Oper State                 : up
IPv4 Last oper state change     : 2026-07-29T08:44:53.300Z
IPv4 LSR ID                     : 192.0.2.1    # different for each node
IPv6 Oper State                 : down    # this setup does not have IPv6 configuration
IPv6 Oper Down Reason           : no-system-ipv6-address
IPv6 Last oper state change     : 2026-07-29T08:44:04.500Z
IPv6 LSR ID                     : ::
Session Keepalive Holdtime      : 180
Session Keepalive Interval      : 60
---------------------------------------------------------------------------------------------------------------------------------------------------------
=========================================================================================================================================================
The LDP adjacencies can be verified as follows:
# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# show / network-instance default protocols ldp neighbor
=========================================================================================================================================================
Net-Inst default LDP neighbors
---------------------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------+
| Interface              Peer LDP ID                 Nbr Address       Local Address     Proposed     Negotiated   Remaining  |
|                                                                                        Holdtime     Holdtime     Holdtime   |
+=============================================================================================================================+
| ethernet-1/2.1         192.0.2.2:0                 192.168.12.2      192.168.12.1      15           15           12         |
| ethernet-1/4.1         192.0.2.4:0                 192.168.14.2      192.168.14.1      15           15           13         |
+-----------------------------------------------------------------------------------------------------------------------------+
=========================================================================================================================================================

The LDP tunnels that are automatically set up to the remote destinations can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# show / network-instance default tunnel-table ipv4
---------------------------------------------------------------------------------------------------------------------------------------------------------
IPv4 tunnel table of network-instance "default"
---------------------------------------------------------------------------------------------------------------------------------------------------------
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
| IPv4 Prefix  | Tunnel Type  |  Tunnel ID   |     FIB      |    Metric    |  Preference  | Last Update  |    Backup    |   Next-hop   |   Next-hop   |
|              |              |              |              |              |              |              |   Nexthops   |    (Type)    |              |
+==============+==============+==============+==============+==============+==============+==============+==============+==============+==============+
| 192.0.2.2/32 | ldp          | 65537        | Y            | 10           | 9            | 2026-07-     |              | 192.168.12.2 | ethernet-    |
|              |              |              |              |              |              | 29T08:45:05. |              | (mpls)       | 1/2.1        |
|              |              |              |              |              |              | 421Z         |              |              |              |
| 192.0.2.3/32 | ldp          | 65538        | Y            | 20           | 9            | 2026-07-     |              | 192.168.12.2 | ethernet-    |
|              |              |              |              |              |              | 29T08:45:16. |              | (mpls)       | 1/2.1        |
|              |              |              |              |              |              | 739Z         |              |              |              |
| 192.0.2.4/32 | ldp          | 65539        | Y            | 10           | 9            | 2026-07-     |              | 192.168.14.2 | ethernet-    |
|              |              |              |              |              |              | 29T08:45:27. |              | (mpls)       | 1/4.1        |
|              |              |              |              |              |              | 560Z         |              |              |              |
| 192.0.2.5/32 | ldp          | 65540        | Y            | 20           | 9            | 2026-07-     |              | 192.168.12.2 | ethernet-    |
|              |              |              |              |              |              | 29T08:45:39. |              | (mpls)       | 1/2.1        |
|              |              |              |              |              |              | 007Z         |              |              |              |
| 192.0.2.6/32 | ldp          | 65541        | Y            | 30           | 9            | 2026-07-     |              | 192.168.12.2 | ethernet-    |
|              |              |              |              |              |              | 29T08:45:49. |              | (mpls)       | 1/2.1        |
|              |              |              |              |              |              | 559Z         |              |              |              |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------
5 LDP tunnels, 5 active, 0 inactive
---------------------------------------------------------------------------------------------------------------------------------------------------------

Five LDP tunnels start on each node, one to each remote node. A node does not have an LDP tunnel to itself. As a result of the SPF computation on PE-1, only the LDP tunnel from PE-1 to PE-4 (IPv4 prefix 192.0.2.4/32) starts at the ethernet-1/4.1 subinterface on PE-1 (to PE-4). The LDP tunnels from PE-1 to all other nodes start at the ethernet-1/2.1 subinterface on PE-1 (to PE-2). The SPF computation on the other nodes governs the LDP tunnels that start on them.

The LDP tunnel from PE-1 to PE-6 (tunnel ID 65541) uses egress label 20005 and passes through PE-2. This can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state / network-instance default tunnel-table ipv4 tunnel * id * type ldp owner * | as table | filter fields next-hop-group metric preference
+------------------+---------------------+-----------------------------+------------------+------------+----------------------+------------+------------+
| Network-instance |     Ipv4-prefix     |            Type             |      Owner       |     Id     |    Next-hop-group    |   Metric   | Preference |
+==================+=====================+=============================+==================+============+======================+============+============+
| default          | 192.0.2.2/32        | ldp                         | ldp_mgr          |      65537 |             32365220 |         10 |          9 |
| default          | 192.0.2.3/32        | ldp                         | ldp_mgr          |      65538 |             32365221 |         20 |          9 |
| default          | 192.0.2.4/32        | ldp                         | ldp_mgr          |      65539 |             32365222 |         10 |          9 |
| default          | 192.0.2.5/32        | ldp                         | ldp_mgr          |      65540 |             32365223 |         20 |          9 |
| default          | 192.0.2.6/32        | ldp                         | ldp_mgr          |      65541 |             32365224 |         30 |          9 |
+------------------+---------------------+-----------------------------+------------------+------------+----------------------+------------+------------+

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default tunnel-table
    network-instance default {
        tunnel-table {
            ipv4 {
                ---snip---
                tunnel 192.0.2.6/32 type ldp owner ldp_mgr id 65541 {
                    next-hop-group 32365224
                    metric 30
                    preference 9
                    last-app-update "2026-07-29T08:45:49.559Z (3 minutes ago)"
                    resource-allocation-failed false
                    fib-programming {
                        last-successful-operation-type modify
                        last-successful-operation-timestamp "2026-07-29T08:45:49.560Z (3 minutes ago)"
                        pending-operation-type none
                        last-failed-operation-type none
                    }
                }
                statistics {
                    active-tunnels 5
                    total-tunnels 5
                }
                tunnel-summary {
                    tunnel-type ldp {
                        active-tunnels 5
                        total-tunnels 5
                    }
                }

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default route-table next-hop-group *
    network-instance default {
        route-table {
            ---snip---
            next-hop-group 32365224 {
                backup-next-hop-group 0
                backup-active false
                fib-programming {
                    last-successful-operation-type add
                    last-successful-operation-timestamp "2026-07-29T08:45:49.560Z (3 minutes ago)"
                    pending-operation-type none
                    last-failed-operation-type none
                }
                next-hop 0 {
                    next-hop 32365220
                    resolved not-applicable
                    resource-allocation-failed false
                }
            }

--{ + running }--[  ]--
A:admin@PE-1# info from state / network-instance default route-table next-hop * |
 as table | filter fields type ip-address subinterface mpls-encapsulation/pushed-mpls-label-stack
+--------------------------+----------------------+--------------------+--------------------------+--------------------------+--------------------------+
|     Network-instance     |        Index         |        Type        |        Ip-address        |       Subinterface       |    Mpls-encapsulation    |
|                          |                      |                    |                          |                          | pushed-mpls-label-stack  |
+==========================+======================+====================+==========================+==========================+==========================+
| ---snip---    # non-MPLS                                                                                                                              |
| default                  |             32365216 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20000                    |
| default                  |             32365217 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20002                    |
| default                  |             32365218 | mpls               | 192.168.14.2             | ethernet-1/4.1           | 20000                    |
| default                  |             32365219 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20004                    |
| default                  |             32365220 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20005                    |
+--------------------------+----------------------+--------------------+--------------------------+--------------------------+--------------------------+

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default route-table next-hop *
    network-instance default {
        route-table {
            ---snip---
            next-hop 32365220 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.12.2
                subinterface ethernet-1/2.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20005
                    ]
                }
            }

On PE-1, the LDP tunnel to PE-6 (tunnel ID 65541) has next-hop-group 32365224, which uses next-hop 32365220 that specifies pushed-mpls-label-stack [20005] and ip-address 192.168.12.2 via subinterface ethernet-1/2.1.

The MPLS ingress label processing on each node through which the LDP tunnel passes can be verified as follows:

# On PE-2:
--{ + running }--[  ]--
A:admin@PE-2# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.12.1 (mpls)    | ethernet-1/1.1       | 20000            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.23.2 (mpls)    | ethernet-1/3.1       | 20000            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.12.1 (mpls)    | ethernet-1/1.1       | 20003            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.25.2 (mpls)    | ethernet-1/5.1       | 20000            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.23.2 (mpls)    | ethernet-1/3.1       | 20005            |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+

--{ + running }--[  ]--
A:admin@PE-2# info from state / network-instance default route-table mpls label-entry * | as table | filter fields operation entry-type next-hop-group
+-----------------------------------------------------------+-------------+------------------------+-----------------------------+----------------------+
|                     Network-instance                      | Label-value |       Operation        |         Entry-type          |    Next-hop-group    |
+===========================================================+=============+========================+=============================+======================+
| default                                                   |       20000 | pop                    | ldp                         |                      |
| default                                                   |       20001 | swap                   | ldp                         |             32365327 |
| default                                                   |       20002 | swap                   | ldp                         |             32365328 |
| default                                                   |       20003 | swap                   | ldp                         |             32365329 |
| default                                                   |       20004 | swap                   | ldp                         |             32365330 |
| default                                                   |       20005 | swap                   | ldp                         |             32365331 |
+-----------------------------------------------------------+-------------+------------------------+-----------------------------+----------------------+

When PE-2 receives a packet labeled with (ingress) label 20000, PE-2 pops the label and processes the packet locally. When PE-2 receives a packet labeled with (ingress) label 20001, PE-2 swaps the label to the next-hop MPLS (egress) label 20000 and forwards the packet to PE-1 (next-hop IP 192.168.12.1) via next-hop subinterface ethernet-1/1.1. When PE-2 receives a packet labeled with (ingress) label 20002, PE-2 swaps the label to the next-hop MPLS (egress) label 20000 and forwards the packet to PE-3 (next-hop IP 192.168.23.2) via next-hop subinterface ethernet-1/3.1.

PE-2 receives a packet from PE-1, which is labeled with (ingress) label 20005. PE-2 swaps the label to the next-hop MPLS (egress) label 20005 and forwards the packet to PE-3 (next-hop IP 192.168.23.2) via next-hop subinterface ethernet-1/3.1.

# On PE-3:
--{ + running }--[  ]--
A:admin@PE-3# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20001            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20000            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20003            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20004            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.36.2 (mpls)    | ethernet-1/6.1       | 20000            |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+

PE-3 receives the packet from PE-2, which is labeled with (ingress) label 20005. PE-3 swaps the label to the next-hop MPLS (egress) label 20000 and forwards the packet to PE-6 (next-hop IP 192.168.36.2) via next-hop subinterface ethernet-1/6.1.

# On PE-6:
--{ + running }--[  ]--
A:admin@PE-6# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.36.1 (mpls)    | ethernet-1/3.1       | 20001            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.36.1 (mpls)    | ethernet-1/3.1       | 20002            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.36.1 (mpls)    | ethernet-1/3.1       | 20000            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.56.1 (mpls)    | ethernet-1/5.1       | 20004            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.56.1 (mpls)    | ethernet-1/5.1       | 20000            |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+

PE-6 receives the packet from PE-3, which is labeled with (ingress) label 20000. PE-6 pops the label and processes the packet locally.

The (egress) next hops can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default route-table next-hop * | grep mpls-encapsulation --before-context 5 --after-context 6
            next-hop 32365216 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.12.2
                subinterface ethernet-1/2.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20000
                    ]
                }
            }
            next-hop 32365217 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.12.2
                subinterface ethernet-1/2.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20002
                    ]
                }
            }
            next-hop 32365218 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.14.2
                subinterface ethernet-1/4.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20000
                    ]
                }
            }
            next-hop 32365219 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.12.2
                subinterface ethernet-1/2.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20004
                    ]
                }
            }
            next-hop 32365220 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.12.2
                subinterface ethernet-1/2.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20005
                    ]
                }
            }

--{ + running }--[  ]--
A:admin@PE-1# info from state / network-instance default route-table next-hop * | as table | filter fields type ip-address subinterface mpls-encapsulation/pushed-mpls-label-stack
+--------------------------+----------------------+--------------------+--------------------------+--------------------------+--------------------------+
|     Network-instance     |        Index         |        Type        |        Ip-address        |       Subinterface       |    Mpls-encapsulation    |
|                          |                      |                    |                          |                          | pushed-mpls-label-stack  |
+==========================+======================+====================+==========================+==========================+==========================+
| ---snip---    #non-MPLS                                                                                                                               |
| default                  |             32365216 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20000                    |
| default                  |             32365217 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20002                    |
| default                  |             32365218 | mpls               | 192.168.14.2             | ethernet-1/4.1           | 20000                    |
| default                  |             32365219 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20004                    |
| default                  |             32365220 | mpls               | 192.168.12.2             | ethernet-1/2.1           | 20005                    |
+--------------------------+----------------------+--------------------+--------------------------+--------------------------+--------------------------+

In the preceding output, the (egress) next hops that relate with LDP tunnels are those with pushed-mpls-label-stack [<LDP label>]. PE-1 learns the (egress) labels that it must use to reach a destination, from the FEC prefixes that its LDP peers (interfaces on PE-2 and PE-4) advertise. This information can be obtained as follows:

# On PE-1:--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp ipv4 bindings received-address
    network-instance default {
        protocols {
            ldp {
                ipv4 {
                    bindings {
                        received-address {
                            peer 192.0.2.2 label-space-id 0 {
                                ip-address [
                                    192.0.2.2
                                    192.168.12.2
                                    192.168.23.1
                                    192.168.25.1
                                ]
                            }
                            peer 192.0.2.4 label-space-id 0 {
                                ip-address [
                                    192.0.2.4
                                    192.168.14.2
                                    192.168.45.1
                                ]
                            }

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp ipv4 bindings received-prefix-fec
    network-instance default {
        protocols {
            ldp {
                ipv4 {
                    bindings {
                        received-prefix-fec {
                            prefix-fec 192.0.2.2/32 lsr-id 192.0.2.2 label-space-id 0 {
                                label 20000
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.12.2
                                    next-hop-type primary
                                    interface ethernet-1/2.1
                                }
                            }
                            prefix-fec 192.0.2.2/32 lsr-id 192.0.2.4 label-space-id 0 {
                                label 20002
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                            }
                            prefix-fec 192.0.2.3/32 lsr-id 192.0.2.2 label-space-id 0 {
                                label 20002
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.12.2
                                    next-hop-type primary
                                    interface ethernet-1/2.1
                                }
                            }
                            prefix-fec 192.0.2.3/32 lsr-id 192.0.2.4 label-space-id 0 {
                                label 20003
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                            }
                            prefix-fec 192.0.2.4/32 lsr-id 192.0.2.2 label-space-id 0 {
                                label 20003
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                            }
                            prefix-fec 192.0.2.4/32 lsr-id 192.0.2.4 label-space-id 0 {
                                label 20000
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.14.2
                                    next-hop-type primary
                                    interface ethernet-1/4.1
                                }
                            }
                            prefix-fec 192.0.2.5/32 lsr-id 192.0.2.2 label-space-id 0 {
                                label 20004
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.12.2
                                    next-hop-type primary
                                    interface ethernet-1/2.1
                                }
                            }
                            prefix-fec 192.0.2.5/32 lsr-id 192.0.2.4 label-space-id 0 {
                                label 20004
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                            }
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.2 label-space-id 0 {
                                label 20005
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.12.2
                                    next-hop-type primary
                                    interface ethernet-1/2.1
                                }
                            }
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.4 label-space-id 0 {
                                label 20005
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                            }

--{ + running }--[  ]--
A:admin@PE-1# info from state / network-instance default protocols ldp ipv4 bindings received-prefix-fec prefix-fec * label-space-id 0 lsr-id * | as table | filter fields *
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
|   Network-    |      Fec      |    Lsr-id     | Label-space-  |     Label     |   Entropy-    | Ingress-lsr-  |   Used-in-    |   Not-used-   |
|   instance    |               |               |      id       |               |    label-     |      fec      |  forwarding   |    reason     |
|               |               |               |               |               |   transmit    |               |               |               |
+===============+===============+===============+===============+===============+===============+===============+===============+===============+
| default       | 192.0.2.2/32  | 192.0.2.2     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.2/32  | 192.0.2.4     |             0 | 20002         | false         | true          | false         |               |
| default       | 192.0.2.3/32  | 192.0.2.2     |             0 | 20002         | false         | true          | true          |               |
| default       | 192.0.2.3/32  | 192.0.2.4     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.2     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.4     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.5/32  | 192.0.2.2     |             0 | 20004         | false         | true          | true          |               |
| default       | 192.0.2.5/32  | 192.0.2.4     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.6/32  | 192.0.2.2     |             0 | 20005         | false         | true          | true          |               |
| default       | 192.0.2.6/32  | 192.0.2.4     |             0 | 20005         | false         | true          | false         |               |
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+

--{ + running }--[  ]--
A:admin@PE-1# info from state / network-instance default protocols ldp ipv4 bindings received-prefix-fec prefix-fec * lsr-id * label-space-id 0 next-hop * | as table | filter fields *
+-------------+------------------+-------------+------------------------+----------+-------------+-------------+-----------------------+-------------+
|  Network-   |  Prefix-fec fec  | Prefix-fec  |   Prefix-fec label-    |  Index   |  Next-hop   |  Next-hop-  |       Interface       | Outer-label |
|  instance   |                  |   lsr-id    |        space-id        |          |             |    type     |                       |             |
+=============+==================+=============+========================+==========+=============+=============+=======================+=============+
| default     | 192.0.2.2/32     | 192.0.2.2   |                      0 |        1 | 192.168.12. | primary     | ethernet-1/2.1        |             |
|             |                  |             |                        |          | 2           |             |                       |             |
| default     | 192.0.2.3/32     | 192.0.2.2   |                      0 |        1 | 192.168.12. | primary     | ethernet-1/2.1        |             |
|             |                  |             |                        |          | 2           |             |                       |             |
| default     | 192.0.2.4/32     | 192.0.2.4   |                      0 |        1 | 192.168.14. | primary     | ethernet-1/4.1        |             |
|             |                  |             |                        |          | 2           |             |                       |             |
| default     | 192.0.2.5/32     | 192.0.2.2   |                      0 |        1 | 192.168.12. | primary     | ethernet-1/2.1        |             |
|             |                  |             |                        |          | 2           |             |                       |             |
| default     | 192.0.2.6/32     | 192.0.2.2   |                      0 |        1 | 192.168.12. | primary     | ethernet-1/2.1        |             |
|             |                  |             |                        |          | 2           |             |                       |             |
+-------------+------------------+-------------+------------------------+----------+-------------+-------------+-----------------------+-------------+

PE-1 receives IP addresses and FEC prefixes from its directly connected (PE-2 and PE-4) LDP peers (peer or lsr-id). PE-1 may receive the same FEC prefix with (typically) different MPLS labels from all (or some) of its LDP peers. For each FEC prefix, PE-1 uses only the one marked with used-in-forwarding true: it labels the IP packet with the corresponding (egress) label and sends the labeled packet to the corresponding next hop 1.

Each node receives five FEC prefixes (from each of its LDP peers), which correspond with the system addresses of the remote nodes .

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp peers | grep -E 'peer 192|address-statistics|fec-statistics' --after-context 4
                    peer 192.0.2.2 label-space-id 0 {
                        fec-limit 0
                        adv-local-lsr-id false
                        adjacency-type link
                        session-state operational
--
                            address-statistics {
                                ipv4 {
                                    received-addresses 4    # own system IP + 3 peer interface IPs
                                    advertised-addresses 3    # own system IP + 2 peer interface IPs
                                }
--
                            fec-statistics {
                                ipv4-prefix {
                                    received-fecs 5    # From each remote PE (5): 1 FEC (system)
                                    advertised-fecs 5    # To each remote PE (5): 1 FEC (system)
                                }
--
                    peer 192.0.2.4 label-space-id 0 {
                        fec-limit 0
                        adv-local-lsr-id false
                        adjacency-type link
                        session-state operational
--
                            address-statistics {
                                ipv4 {
                                    received-addresses 3    # own system IP + 2 peer interface IPs
                                    advertised-addresses 3    # own system IP + 2 peer interface IPs
                                }
--
                            fec-statistics {
                                ipv4-prefix {
                                    received-fecs 5    # From each remote PE (5): 1 FEC (system)
                                    advertised-fecs 5    # To each remote PE (5): 1 FEC (system)
                                }

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics ipv4
    network-instance default {
        protocols {
            ldp {
                statistics {
                    ipv4 {
                        total-discovery-interfaces 2
                        total-discovery-targets 0
                        total-interface-hello-adjacencies 2
                        total-targeted-hello-adjacencies 0
                        total-peers 2    # PE-2 and PE-4
                    }       

--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics fec-statistics ipv4-prefix
    network-instance default {
        protocols {
            ldp {
                statistics {
                    fec-statistics {
                        ipv4-prefix {
                            received-fecs 10
                            advertised-fecs 10
                        }

Penultimate hop popping

To signal PHP with LDP, null-label implicit must be configured in the network-instance default protocols ldp context on the ELER, as follows:

# On PE-6:
enter candidate
    network-instance default protocols ldp {
                null-label implicit

Before the null-label implicit configuration on PE-6, PE-6 advertises label 20000 for FEC prefix 192.0.2.6/32 to all remote nodes that belong to the MPLS network. Only PE-3 and PE-5 use (egress) label 20000 for FEC prefix 192.0.2.6/32 toward PE-6.

# On PE-6:
--{ + running }--[  ]--
A:admin@PE-6# info from state with-context / network-instance default protocols ldp ipv4 bindings advertised-prefix-fec | grep 'egress-lsr-fec true' --before-context 1 --after-context 3
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.3 label-space-id 0 {
                                egress-lsr-fec true
                                label 20000
                                label-type pop
                            }
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.5 label-space-id 0 {
                                egress-lsr-fec true
                                label 20000
                                label-type pop
                            }
# On PE-3:    # similar on PE-5 with other next-hop 1
--{ + running }--[  ]--
A:admin@PE-3# info from state with-context / network-instance default protocols ldp ipv4 bindings received-prefix-fec | grep 'prefix-fec 192.0.2.6/32 lsr-id 192.0.2.6' --after-context 10
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.6 label-space-id 0 {
                                label 20000
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.36.2
                                    next-hop-type primary
                                    interface ethernet-1/6.1
                                }
                            }
# On PE-3:    # similar on PE-5 for other next-hop
--{ + running }--[  ]--
A:admin@PE-3# info from state with-context / network-instance default route-table next-hop * | grep mpls-encapsulation --before-context 5 --after-context 6
            ---snip---
            next-hop 32397420 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.36.2
                subinterface ethernet-1/6.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        20000
                    ]
                }
            }
# On PE-3:    # similar on PE-5 with other Next-hop IP and other Next-hop Subinterface
--{ + running }--[  ]--
A:admin@PE-3# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20001            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20000            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20003            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20004            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.36.2 (mpls)    | ethernet-1/6.1       | 20000            |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
After the null-label implicit configuration on PE-6, PE-6 advertises label IMPLICIT_NULL for FEC prefix 192.0.2.6/32 to all remote nodes that belong to the MPLS network. Only PE-3 and PE-5 use (egress) label IMPLICIT_NULL for FEC prefix 192.0.2.6/32 toward PE-6.

All related labels are withdrawn and re-advertised immediately with label value IMPLICIT_NULL. The new label shows up on PE-3 and PE-5 as a swap from the ingress label to an egress label IMPLICIT_NULL, although label IMPLICIT_NULL is not pushed on to the frame.

# On PE-6:
--{ + running }--[  ]--
A:admin@PE-6# info from state with-context / network-instance default protocols ldp ipv4 bindings advertised-prefix-fec
    network-instance default {
        protocols {
            ldp {
                ipv4 {
                    bindings {
                        advertised-prefix-fec {
                            ---snip---
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.3 label-space-id 0 {
                                egress-lsr-fec true
                                label IMPLICIT_NULL
                                label-type pop
                            }
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.5 label-space-id 0 {
                                egress-lsr-fec true
                                label IMPLICIT_NULL
                                label-type pop
                            }
# On PE-3:    # similar on PE-5 with other next-hop 1
--{ + running }--[  ]--
A:admin@PE-3# info from state with-context / network-instance default protocols ldp ipv4 bindings received-prefix-fec | grep 'prefix-fec 192.0.2.6/32 lsr-id 192.0.2.6' --after-context 10
                            prefix-fec 192.0.2.6/32 lsr-id 192.0.2.6 label-space-id 0 {
                                label IMPLICIT_NULL
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding true
                                next-hop 1 {
                                    next-hop 192.168.36.2
                                    next-hop-type primary
                                    interface ethernet-1/6.1
                                }
                            }
# On PE-3:    # similar on PE-5 for other next-hop
--{ + running }--[  ]--
A:admin@PE-3# info from state with-context / network-instance default route-table next-hop * | grep mpls-encapsulation --before-context 5 --after-context 6
            ---snip---
            next-hop 32397421 {
                resource-allocation-failed false
                type mpls
                ip-address 192.168.36.2
                subinterface ethernet-1/6.1
                mpls-encapsulation {
                    entropy-label-transmit false
                    pushed-mpls-label-stack [
                        IMPLICIT_NULL
                    ]
                }
            }
# On PE-3:    # similar on PE-5 with other Next-hop IP and other Next-hop Subinterface
--{ + running }--[  ]--
A:admin@PE-3# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20001            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20000            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20003            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.23.1 (mpls)    | ethernet-1/2.1       | 20004            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.36.2 (mpls)    | ethernet-1/6.1       | IMPLICIT_NULL    |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+

Import and export policies

In each node, the default label handling behavior is to originate label bindings for the system address and to propagate all received FECs. If this is not the desired behavior, import or export policies can be applied. An LDP import policy impacts inbound filtering; an LDP export policy impacts outbound filtering. An export policy may be configured to control the set of LDP label bindings advertised by the LER (sending to LDP peers). As such, export policies are used to include additional FECs rather than filtering FECs from those advertised. An import policy can be used to control for which FECs a router generates labels (accepting from LDP peers). This functionality is not unique to LDP; it can be used for IS-IS and OSPF as well as others.

The policy can be global or LDP peer FEC prefix filtering, both for import and export. LDP peer FEC prefix filtering uses a similar policy context as the LDP global policies and works in addition to these global policies.

# On any LDP configured node:
enter candidate
    network-instance default protocols ldp {
        tree flat | grep policy

network-instance protocols ldp export-prefix-policy
network-instance protocols ldp import-prefix-policy
network-instance protocols ldp peers peer export-prefix-policy
network-instance protocols ldp peers peer import-prefix-policy

Export policy

By default, a node does not generate labels for its directly connected (local) interfaces. To change this behavior, an export policy is created and applied to the LDP instance or to the peers peer context of the LDP instance (applicable per peer). There is no configuration difference in defining an import and export policy.

A policy contains a list of statements. A statement typically contains matching criteria (however, it is not required in cases where everything matches) and a corresponding action. Statements without an action are considered incomplete and are rendered inactive. When processing the policy, the router executes the specified action on the first matching statement; it does not process any further matches. For this reason, statements must be sequenced correctly from most to least specific.

As an example, PE-1 exports its local interfaces. The configuration of the LDP export policy to advertise the local interfaces is as follows.

# On PE-1:
enter candidate
    routing-policy policy LDP-export-local {
            default-action {
                policy-result reject
            }
            statement export-local {
                match {
                    protocol local
                }
                action {
                    policy-result accept
                }
            }

The LDP export policy is applied to the LDP instance on PE-1, with the export-prefix-policy command in the network-instance default protocols ldp context.

# On PE-1:
enter candidate
    network-instance default protocols ldp {
                export-prefix-policy LDP-export-local
In the example, only PE-1 advertises its local interfaces. PE-1 has local interfaces 192.168.12.0/30 and 192.168.14.0/30. A node only advertises to its directly connected LDP peers (and to the LDP peers with which it has an LDP target binding). So, PE-1 advertises local interfaces 192.168.12.0/30 and 192.168.14.0/30 to PE-2 and PE-4.
# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp ipv4 bindings advertised-prefix-fec | grep 'prefix-fec 192.168' --after-context 6
                            prefix-fec 192.168.12.0/30 lsr-id 192.0.2.4 label-space-id 0 {
                                egress-lsr-fec true
                                label 20006
                                label-type pop
                            }
                            prefix-fec 192.168.14.0/30 lsr-id 192.0.2.2 label-space-id 0 {
                                egress-lsr-fec true
                                label 20007
                                label-type pop
                            }
                            prefix-fec 192.168.14.0/30 lsr-id 192.0.2.4 label-space-id 0 {
                                egress-lsr-fec true
                                label 20007
                                label-type pop
                            }

When the export policy is applied, the active LDP binding table of PE-2 (and PE-4) contains additional entries: the local interfaces of PE-2 or PE-4. In the following output, the entries for the system prefixes are snipped; only the additional prefixes are shown:

# On PE-2:
--{ + running }--[  ]--
A:admin@PE-2# info from state with-context / network-instance default protocols ldp ipv4 bindings received-prefix-fec | grep 'prefix-fec 192.168.' --after-context 6
                            prefix-fec 192.168.12.0/30 lsr-id 192.0.2.1 label-space-id 0 {
                                label 20006
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                                not-used-reason rejected-on-rx
                            }
                            prefix-fec 192.168.14.0/30 lsr-id 192.0.2.1 label-space-id 0 {
                                label 20007
                                entropy-label-transmit false
                                ingress-lsr-fec true
                                used-in-forwarding false
                                not-used-reason rejected-on-rx
                            }

--{ + running }--[  ]--
A:admin@PE-2# info from state / network-instance default protocols ldp ipv4 bindings received-prefix-fec prefix-fec * lsr-id * label-space-id 0 | as table | filter fields *
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
|   Network-    |      Fec      |    Lsr-id     | Label-space-  |     Label     |   Entropy-    | Ingress-lsr-  |   Used-in-    |   Not-used-   |
|   instance    |               |               |      id       |               |    label-     |      fec      |  forwarding   |    reason     |
|               |               |               |               |               |   transmit    |               |               |               |
+===============+===============+===============+===============+===============+===============+===============+===============+===============+
| default       | 192.0.2.1/32  | 192.0.2.1     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.1/32  | 192.0.2.3     |             0 | 20001         | false         | true          | false         |               |
| default       | 192.0.2.1/32  | 192.0.2.5     |             0 | 20001         | false         | true          | false         |               |
| default       | 192.0.2.3/32  | 192.0.2.1     |             0 | 20002         | false         | true          | false         |               |
| default       | 192.0.2.3/32  | 192.0.2.3     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.3/32  | 192.0.2.5     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.1     |             0 | 20003         | false         | true          | true          |               |
| default       | 192.0.2.4/32  | 192.0.2.3     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.5     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.1     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.3     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.5     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.6/32  | 192.0.2.1     |             0 | 20005         | false         | true          | false         |               |
| default       | 192.0.2.6/32  | 192.0.2.3     |             0 | 20005         | false         | true          | true          |               |
| default       | 192.0.2.6/32  | 192.0.2.5     |             0 | 20005         | false         | true          | false         |               |
| default       | 192.168.12.0/ | 192.0.2.1     |             0 | 20006         | false         | true          | false         | rejected-on-  |
|               | 30            |               |               |               |               |               |               | rx            |
| default       | 192.168.14.0/ | 192.0.2.1     |             0 | 20007         | false         | true          | false         | rejected-on-  |
|               | 30            |               |               |               |               |               |               | rx            |
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+

PE-2 and PE-4 add an MPLS label for the local prefixes.

# On PE-2:
--{ + running }--[  ]--
A:admin@PE-2# show / network-instance default route-table mpls
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+
| Label   | Operation | Type        | Next Net-Inst   | Next-hop IP (Type)     | Next-hop             | Next-hop MPLS    |
|         |           |             |                 |                        | Subinterface         | labels           |
+=========+===========+=============+=================+========================+======================+==================+
| 20000   | POP       | ldp         | default         |                        |                      |                  |
| 20001   | SWAP      | ldp         | N/A             | 192.168.12.1 (mpls)    | ethernet-1/1.1       | 20000            |
| 20002   | SWAP      | ldp         | N/A             | 192.168.23.2 (mpls)    | ethernet-1/3.1       | 20000            |
| 20003   | SWAP      | ldp         | N/A             | 192.168.12.1 (mpls)    | ethernet-1/1.1       | 20003            |
| 20004   | SWAP      | ldp         | N/A             | 192.168.25.2 (mpls)    | ethernet-1/5.1       | 20000            |
| 20005   | SWAP      | ldp         | N/A             | 192.168.23.2 (mpls)    | ethernet-1/3.1       | 20005            |
| 20007   | SWAP      | ldp         | N/A             | 192.168.12.1 (mpls)    | ethernet-1/1.1       | 20007            |
+---------+-----------+-------------+-----------------+------------------------+----------------------+------------------+

Import policy

By default, a node rejects all received local FECs. To change this behavior, an import policy is created and applied to the LDP instance or to the peers peer context of the LDP instance (applicable per peer). There is no configuration difference in defining an import and export policy.

As an example, PE-2 accepts received local interfaces. The configuration of the LDP import policy to accept received local interfaces is as follows:

# On PE-2:
enter candidate
    routing-policy {
        prefix-set import-prefix-set-30 {
            prefix 192.168.0.0/16 mask-length-range 30..30 {
            }
        }
        policy LDP-import-fec-30 {
            statement s1 {
                match {
                    prefix {
                        prefix-set import-prefix-set-30
                    }
                }
                action {
                    policy-result accept
                }
            }
        }

The LDP import policy is applied to the LDP instance on PE-2, with the import-prefix-policy command in the network-instance default protocols ldp context.

# On PE-2:
enter candidate
    network-instance default protocols ldp {
                import-prefix-policy LDP-import-fec-30

In the example, only PE-2 accepts received local interfaces. When the import policy is applied, the active LDP binding table of PE-2 contains additional entries: the local interfaces that PE-1 advertises.

# On PE-2:
--{ + running }--[  ]--
A:admin@PE-2# info from state / network-instance default protocols ldp ipv4 bindings received-prefix-fec prefix-fec * lsr-id * label-space-id 0 | as table | filter fields *
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+
|   Network-    |      Fec      |    Lsr-id     | Label-space-  |     Label     |   Entropy-    | Ingress-lsr-  |   Used-in-    |   Not-used-   |
|   instance    |               |               |      id       |               |    label-     |      fec      |  forwarding   |    reason     |
|               |               |               |               |               |   transmit    |               |               |               |
+===============+===============+===============+===============+===============+===============+===============+===============+===============+
| default       | 192.0.2.1/32  | 192.0.2.1     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.1/32  | 192.0.2.3     |             0 | 20001         | false         | true          | false         |               |
| default       | 192.0.2.1/32  | 192.0.2.5     |             0 | 20001         | false         | true          | false         |               |
| default       | 192.0.2.3/32  | 192.0.2.1     |             0 | 20002         | false         | true          | false         |               |
| default       | 192.0.2.3/32  | 192.0.2.3     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.3/32  | 192.0.2.5     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.1     |             0 | 20003         | false         | true          | true          |               |
| default       | 192.0.2.4/32  | 192.0.2.3     |             0 | 20003         | false         | true          | false         |               |
| default       | 192.0.2.4/32  | 192.0.2.5     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.1     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.3     |             0 | 20004         | false         | true          | false         |               |
| default       | 192.0.2.5/32  | 192.0.2.5     |             0 | 20000         | false         | true          | true          |               |
| default       | 192.0.2.6/32  | 192.0.2.1     |             0 | 20005         | false         | true          | false         |               |
| default       | 192.0.2.6/32  | 192.0.2.3     |             0 | 20005         | false         | true          | true          |               |
| default       | 192.0.2.6/32  | 192.0.2.5     |             0 | 20005         | false         | true          | false         |               |
| default       | 192.168.12.0/ | 192.0.2.1     |             0 | 20006         | false         | true          | false         |               |
|               | 30            |               |               |               |               |               |               |               |
| default       | 192.168.14.0/ | 192.0.2.1     |             0 | 20007         | false         | true          | false         |               |
|               | 30            |               |               |               |               |               |               |               |
+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+

PE-2 does no longer reject the local interfaces of PE-1, but still does not use them for forwarding.

OAM

The following operations, administration, and maintenance operations can be launched on an LDP LSP:

  • oam lsp-ping

  • oam lsp-trace

As an example, an LSP ping is sent from PE-1 to PE-6:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# tools oam lsp-ping ldp fec 192.0.2.6/32

/oam/lsp-ping/ldp/fec[prefix=192.0.2.6/32]:
    Initiated LSP Ping to prefix 192.0.2.6/32 with session id 49152

The result is not directly visible from the response, but can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / oam lsp-ping ldp fec 192.0.2.6/32
    oam {
        lsp-ping {
            ldp {
                fec 192.0.2.6/32 {
                    session-id 49152 {
                        test-active false
                        statistics {
                            round-trip-time {
                                minimum 81719
                                maximum 81719
                                average 81719
                                standard-deviation 0
                            }
                        }
                        path-destination {
                            ip-address 127.0.0.1
                        }
                        sequence 1 {
                            probe-size 48
                            request-sent true
                            out-interface ethernet-1/2.1
                            reply {
                                received true
                                reply-sender 192.0.2.6
                                udp-data-length 40
                                mpls-ttl 255
                                round-trip-time 81719
                                return-code replying-router-is-egress-for-fec-at-stack-depth-n
                                return-subcode 1
                            }
                        }

The ELER (PE-6) returns a reply. The reply includes the sender of the reply, the MPLS TTL (255), the round trip time (in microseconds), and a return-code.

LSP ping results remain present in the state. They can be cleared with:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# tools oam lsp-ping ldp clear

/oam/lsp-ping:
    LDP Ping data has been cleared

As an example, an LSP trace is sent from PE-1 to PE-6:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# tools oam lsp-trace ldp fec 192.0.2.6/32

/oam/lsp-trace/ldp/fec[prefix=192.0.2.6/32]:
    Initiated LSP Trace to prefix 192.0.2.6/32 with session id 49153

The result can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / oam lsp-trace ldp fec 192.0.2.6/32
    oam {
        lsp-trace {
            ldp {
                fec 192.0.2.6/32 {
                    session-id 49153 {
                        test-active false
                        path-destination {
                            ip-address 127.0.0.1
                        }
                        hop 1 {
                            probe 1 {
                                probe-size 76
                                probes-sent 1
                                reply {
                                    received true
                                    reply-sender 192.0.2.2
                                    udp-data-length 60
                                    mpls-ttl 1
                                    round-trip-time 4087
                                    return-code label-switched-at-stack-depth-n
                                    return-subcode 1
                                }
                                downstream-detailed-mapping 1 {
                                    mtu 1500
                                    address-type ipv4-numbered
                                    downstream-router-address 192.168.23.2
                                    downstream-interface-address 192.168.23.2
                                    mpls-label 1 {
                                        label 20005
                                        protocol ldp
                                    }
                                }
                            }
                        }
                        hop 2 {
                            probe 1 {
                                probe-size 76
                                probes-sent 1
                                reply {
                                    received true
                                    reply-sender 192.0.2.3
                                    udp-data-length 60
                                    mpls-ttl 2
                                    round-trip-time 5863
                                    return-code label-switched-at-stack-depth-n
                                    return-subcode 1
                                }
                                downstream-detailed-mapping 1 {
                                    mtu 1500
                                    address-type ipv4-numbered
                                    downstream-router-address 192.168.36.2
                                    downstream-interface-address 192.168.36.2
                                    mpls-label 1 {
                                        label IMPLICIT_NULL
                                        protocol ldp
                                    }
                                }
                            }
                        }
                        hop 3 {
                            probe 1 {
                                probe-size 76
                                probes-sent 1
                                reply {
                                    received true
                                    reply-sender 192.0.2.6
                                    udp-data-length 32
                                    mpls-ttl 3
                                    round-trip-time 15860
                                    return-code replying-router-is-egress-for-fec-at-stack-depth-n
                                    return-subcode 1
                                }
                            }
                        }

--{ + running }--[  ]--
A:admin@PE-1# info from state / oam lsp-trace ldp fec * session-id * hop * probe * | as table
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+
|     Fec      |  Session-id  |     Hop      | Probe-index  | Probes-sent  | Last-probe-  | Reply reply- | Reply round- |    Reply     |    Reply     |
|              |              |              |              |              |    send-     |    sender    |  trip-time   | return-code  |   return-    |
|              |              |              |              |              |   failure-   |              |              |              |   subcode    |
|              |              |              |              |              |    reason    |              |              |              |              |
+==============+==============+==============+==============+==============+==============+==============+==============+==============+==============+
| 192.0.2.6/32 |        49153 |            1 |            1 |            1 |              | 192.0.2.2    |         4087 | label-       |            1 |
|              |              |              |              |              |              |              |              | switched-at- |              |
|              |              |              |              |              |              |              |              | stack-       |              |
|              |              |              |              |              |              |              |              | depth-n      |              |
| 192.0.2.6/32 |        49153 |            2 |            1 |            1 |              | 192.0.2.3    |         5863 | label-       |            1 |
|              |              |              |              |              |              |              |              | switched-at- |              |
|              |              |              |              |              |              |              |              | stack-       |              |
|              |              |              |              |              |              |              |              | depth-n      |              |
| 192.0.2.6/32 |        49153 |            3 |            1 |            1 |              | 192.0.2.6    |        15860 | replying-    |            1 |
|              |              |              |              |              |              |              |              | router-is-   |              |
|              |              |              |              |              |              |              |              | egress-for-  |              |
|              |              |              |              |              |              |              |              | fec-at-      |              |
|              |              |              |              |              |              |              |              | stack-       |              |
|              |              |              |              |              |              |              |              | depth-n      |              |
+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+

The LSP trace has three hops: PE-6 is reached from PE-1 via PE-2 and PE-3.

The ELER (PE-6) and the LSRs (PE-2 and PE-3) return a reply. The reply includes the sender of the reply, the MPLS TTL (a sequence number that increases with 1 on each hop along the LSP trace), the round trip time (in microseconds), and a return-code. The ELER has another return-code than the LSRs.

The LSRs have additional downstream (toward the destination) detailed mapping information. The downstream detailed mapping information includes the maximum transfer unit (MTU), the type of IP address, the downstream router address and router interface address, and the label and protocol that is used to reach the next hop.

LSP trace results remain present in the state. They can be cleared with:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# tools oam lsp-trace ldp clear

/oam/lsp-trace:
    LDP Trace data has been cleared

LDP statistics

LDP related statistics on each node can be verified as follows:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# show / network-instance default protocols ldp statistics
=========================================================================================================================================================
Net-Inst default LDP statistics
---------------------------------------------------------------------------------------------------------------------------------------------------------
IPv4 Total Discovery Interfaces           : 2  # 2 direct neighbors: PE-2 and PE-4
IPv6 Total Discovery Interfaces           : 0
IPv4 Total Discovery Targets              : 0
IPv6 Total Discovery Targets              : 0
IPv4 Total Interface Hello Adjacencies    : 2
IPv6 Total Interface Hello Adjacencies    : 0
IPv4 Total Targeted Hello Adjacencies     : 0
IPv6 Total Targeted Hello Adjacencies     : 0
IPv4 Total Peers                          : 2
IPv6 Total Peers                          : 0
IPv4 Received Prefix FECs                 : 10
IPv4 Advertised Prefix FECs               : 10
IPv6 Received Prefix FECs                 : 0
IPv6 Advertised Prefix FECs               : 0
IPv4 Received P2MP FECs                   : 0
IPv4 Advertised P2MP FECs                 : 0
Bad Ldp Identifier                        : 0
Bad Protocol Version                      : 0
Bad Pdu Length                            : 0
Bad Message Length                        : 0
Unknown Tlv                               : 0
Bad Tlv Length                            : 0
Malformed Tlv Value                       : 0
Session Rejected No Hello                 : 0
Session Rejected Parameters Adv Mode      : 0
Session Rejected Parameters Max Pdu Length: 0
Session Rejected Parameters Label Range   : 0
---------------------------------------------------------------------------------------------------------------------------------------------------------
=========================================================================================================================================================
# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics
    network-instance default {
        protocols {
            ldp {
                statistics {
                    ipv4 {
                        total-discovery-interfaces 2    # PE-2 and PE-4
                        total-discovery-targets 0
                        total-interface-hello-adjacencies 2
                        total-targeted-hello-adjacencies 0
                        total-peers 2
                    }
                    ipv6 {
                        total-discovery-interfaces 0
                        total-discovery-targets 0
                        total-interface-hello-adjacencies 0
                        total-targeted-hello-adjacencies 0
                        total-peers 0
                    }
                    fec-statistics {
                        ipv4-prefix {
                            received-fecs 10
                            advertised-fecs 10
                        }
                        ipv6-prefix {
                            received-fecs 0
                            advertised-fecs 0
                        }
                        ipv4-p2mp {
                            received-fecs 0
                            advertised-fecs 0
                        }
                    }
                    protocol-errors {
                        bad-ldp-identifier 0
                        bad-protocol-version 0
                        bad-pdu-length 0
                        bad-message-length 0
                        unknown-tlv 0
                        bad-tlv-length 0
                        malformed-tlv-value 0
                        session-rejected-no-hello 0
                        session-rejected-parameters-adv-mode 0
                        session-rejected-parameters-max-pdu-length 0
                        session-rejected-parameters-label-range 0
                    }

Parts can be filtered out with the following commands:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics ipv4
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics ipv6
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics fec-statistics
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics fec-statistics ipv4-prefix
A:admin@PE-1# info from state with-context / network-instance default protocols ldp statistics fec-statistics ipv6-prefix
Each node has additional LDP peer statistics. They can be verified as follows:
# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp peers peer 192.0.2.2 label-space-id 0
    network-instance default {
        protocols {
            ldp {
                peers {
                    peer 192.0.2.2 label-space-id 0 {
                        fec-limit 0
                        adv-local-lsr-id false
                        adjacency-type link
                        session-state operational
                        last-oper-state-change "2026-07-29T08:45:05.365Z (an hour ago)"
                        ---snip---
                        session-holdtime {
                            peer-proposed 180
                            negotiated 180
                            remaining 179
                        }
                        statistics {
                            received-messages {
                                total-messages 83
                                address 1
                                address-withdraw 0
                                initialization 1
                                keepalive 64
                                label-abort-request 0
                                label-mapping 7    # import-prefix-policy LDP-import-fec-30 on PE-2 adds 1
                                label-release 3    # delete export-prefix-policy on PE-1 adds 2
                                label-request 0
                                label-withdraw 2    # delete import-prefix-policy on PE-2 adds 1
                                notification 5
                                capability 0
                            }
                            sent-messages {
                                total-messages 83
                                address 1
                                address-withdraw 0
                                initialization 1
                                keepalive 63
                                label-abort-request 0
                                label-mapping 8    # export-prefix-policy LDP-export-local on PE-1 adds 2
                                label-release 2    # delete import-prefix-policy on PE-2 adds 1
                                label-request 0
                                label-withdraw 3    # delete export-prefix-policy on PE-1 adds 2
                                notification 5
                                capability 0
                            }
                            address-statistics {
                                ipv4 {
                                    received-addresses 4
                                    advertised-addresses 3
                                }
                                ipv6 {
                                    received-addresses 0
                                    advertised-addresses 0
                                }
                            }
                            fec-statistics {
                                ipv4-prefix {
                                    received-fecs 5    # import-prefix-policy LDP-import-fec-30 on PE-2 adds 1
                                                       # delete import-prefix-policy on PE-2 subtracts 1
                                    advertised-fecs 5    # export-prefix-policy LDP-export-local on PE-1 adds 2
                                                         # delete export-prefix-policy on PE-1 subtracts 2
                                }
                                ipv6-prefix {
                                    received-fecs 0
                                    advertised-fecs 0
                                }
                                ipv4-p2mp {
                                    received-fecs 0
                                    advertised-fecs 0
                                }
                            }
                        }

On each node, LDP peer statistics can be filtered out for a single peer with the following command:

# On PE-1:
--{ + running }--[  ]--
A:admin@PE-1# info from state with-context / network-instance default protocols ldp peers peer <LSR IS> label-space-id 0

Debug

Debug logging can be configured for IS-IS and LDP as follows:

# On all nodes:
enter candidate
    system logging {
            file isis-log-messages {
                directory /var/log/srlinux/file    # default
                format RSYSLOG_FileFormat    # default
                rotate 4    # default
                size 10M    # default
                subsystem isis {
                    priority {
                        match-above debug
                        match-exact [ debug ]
                    }
                }
            }
            file ldp-log-messages {
                directory /var/log/srlinux/file    # default
                format RSYSLOG_FileFormat    # default
                rotate 4    # default
                size 10M    # default
                subsystem ldp {
                    priority {
                        match-above debug
                        match-exact [ debug ]
                    }
                }
            }

The log file can be verified as follows:

# On all nodes:
--{ + running }--[  ]--
A:admin@PE-1# show / system logging file isis-log-messages
#########################################################################################################################################################
# /var/log/srlinux/file/*isis-log-messages*        # presented with option: -c2
#########################################################################################################################################################
2026-07-29T11:51:20.390 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2002, using interface ethernet-1/2.1, moved to state DOWN.
2026-07-29T11:51:20.390 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2004, using interface ethernet-1/4.1, moved to state DOWN.
2026-07-29T11:51:20.431 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2004, using interface ethernet-1/4.1, moved to state INIT.
2026-07-29T11:51:20.464 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2004, using interface ethernet-1/4.1, moved to state UP.
2026-07-29T11:51:20.464 sr_isis_mgr: isis|109886|W: In network-instance default, the LSP with id 1920.0000.2001.00-00 in the level-1 database was re-originated with a sequence number that incremented by more than one.
2026-07-29T11:51:20.464 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2002, using interface ethernet-1/2.1, moved to state INIT.
2026-07-29T11:51:20.464 sr_isis_mgr: isis|109886|W: In network-instance default, the level-1 IS-IS adjacency with system 1920.0000.2002, using interface ethernet-1/2.1, moved to state UP.
#########################################################################################################################################################

--{ + running }--[  ]--
A:admin@PE-1# show / system logging file ldp-log-messages
#########################################################################################################################################################
# /var/log/srlinux/file/*ldp-log-messages*        # presented with option: -c2
#########################################################################################################################################################
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, the LDP session with peer 192.0.2.2:0 has changed to non-existent.
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, the LDP session with peer 192.0.2.2:0 has changed to non-existent.
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, the LDP session with peer 192.0.2.4:0 has changed to non-existent.
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, the LDP session with peer 192.0.2.4:0 has changed to non-existent.
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, LDP has changed oper-state to DOWN on the following IPv4 interface ethernet-1/2.1. The reason is ldp-instance-oper-down
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, LDP has changed oper-state to DOWN on the following IPv4 interface ethernet-1/4.1. The reason is ldp-instance-oper-down
2026-07-29T11:51:19.866 sr_ldp_mgr: ldp|113707|W: In network-instance default, LDP-IPv4 has changed oper-state to DOWN. The reason is ldp-admin-disabled
2026-07-29T11:51:20.375 sr_ldp_mgr: ldp|113707|I: In network-instance default, LDP is now up and functional on the following IPv4 interface ethernet-1/2.1.
2026-07-29T11:51:20.375 sr_ldp_mgr: ldp|113707|I: In network-instance default, LDP is now up and functional on the following IPv4 interface ethernet-1/4.1.
2026-07-29T11:51:20.375 sr_ldp_mgr: ldp|113707|I: In network-instance default, LDP-IPv4 is now up and functional.
2026-07-29T11:51:24.047 sr_ldp_mgr: ldp|113707|I: In network-instance default, an LDP session is now up and operational with peer 192.0.2.4:0.
2026-07-29T11:51:24.216 sr_ldp_mgr: ldp|113707|I: In network-instance default, an LDP session is now up and operational with peer 192.0.2.2:0.
#########################################################################################################################################################

--{ + running }--[  ]--
A:admin@PE-1#     bash
    cd /var/log/srlinux/file
    ls -lr
        admin@PE-1:/var/log/srlinux/file$ ls -lr
        total 360
        -rw-rw-rw-+ 1 syslog adm 357400 Jul 29 11:51 messages
        -rw-rw-r--+ 1 syslog adm   2411 Jul 29 11:51 ldp-log-messages
        -rw-rw-r--+ 1 syslog adm   1710 Jul 29 11:51 isis-log-messages

    cat ldp-log-messages
        admin@PE-1:/var/log/srlinux/file$ cat ldp-log-messages
        2026-07-29T11:51:19.866367+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00006|EV|ldpSessionDown|W: In network-instance default, the LDP session with peer 192.0.2.2:0 has changed to non-existent.
        2026-07-29T11:51:19.866478+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00007|EV|ldpSessionDown|W: In network-instance default, the LDP session with peer 192.0.2.2:0 has changed to non-existent.
        2026-07-29T11:51:19.866583+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00008|EV|ldpSessionDown|W: In network-instance default, the LDP session with peer 192.0.2.4:0 has changed to non-existent.
        2026-07-29T11:51:19.866620+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00009|EV|ldpSessionDown|W: In network-instance default, the LDP session with peer 192.0.2.4:0 has changed to non-existent.
        2026-07-29T11:51:19.866722+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00010|EV|ldpIPv4InterfaceDown|W: In network-instance default, LDP has changed oper-state to DOWN on the following IPv4 interface ethernet-1/2.1. The reason is ldp-instance-oper-down
        2026-07-29T11:51:19.866740+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00011|EV|ldpIPv4InterfaceDown|W: In network-instance default, LDP has changed oper-state to DOWN on the following IPv4 interface ethernet-1/4.1. The reason is ldp-instance-oper-down
        2026-07-29T11:51:19.866803+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00012|EV|ldpIpv4InstanceDown|W: In network-instance default, LDP-IPv4 has changed oper-state to DOWN. The reason is ldp-admin-disabled
        2026-07-29T11:51:20.375671+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00013|EV|ldpIPv4InterfaceUp|I: In network-instance default, LDP is now up and functional on the following IPv4 interface ethernet-1/2.1.
        2026-07-29T11:51:20.375687+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00014|EV|ldpIPv4InterfaceUp|I: In network-instance default, LDP is now up and functional on the following IPv4 interface ethernet-1/4.1.
        2026-07-29T11:51:20.375693+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00015|EV|ldpIpv4InstanceUp|I: In network-instance default, LDP-IPv4 is now up and functional.
        2026-07-29T11:51:24.047145+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00016|EV|ldpSessionUp|I: In network-instance default, an LDP session is now up and operational with peer 192.0.2.4:0.
        2026-07-29T11:51:24.216171+02:00 PE-1 sr_ldp_mgr: ldp|113707|113740|00017|EV|ldpSessionUp|I: In network-instance default, an LDP session is now up and operational with peer 192.0.2.2:0.

Conclusion

MPLS provides the capability to establish connection-oriented paths over a connectionless network. LDP point-to-point LSPs are dynamically signaled and LDP LFA is supported. This can greatly improve network resiliency. In this chapter, the configuration of several LDP point-to-point LSP features is given together with the associated show output which can be used to verify and troubleshoot.