/
Example for Configuring MPLS LDP

Example for Configuring MPLS LDP


Network Requirement

Figure 1. MPLS LDP Configuration Example

MPLS LDP.jpg

LSR 1 and LSR 3 serve as the PE (Provider Edge) devices in the IP/MPLS backbone network. MPLS LDP (Label Distribution Protocol) needs to be configured on both LSR 1 and LSR 3 to establish LDP LSPs (Label Switched Paths), enabling the interconnection of LSP networks and supporting business traffic transmission.

Configure MPLS LDP as follows:

  1. Configure OSPF on each LSR to ensure IP connectivity in the backbone network. This includes configuring OSPF protocol and relevant network segments, areas, and neighbor relationships.

  2. Configure MPLS LDP on each LSR. This involves enabling MPLS functionality and configuring LDP protocol parameters such as LDP session parameters, LDP neighbor relationships, and LDP label distribution policies.

With this configuration, each LSR will be able to establish an IP/MPLS network and create LDP LSPs through MPLS LDP, thereby achieving interconnection and business transmission of LSP networks.

Procedure

LSR 1

Step 1         Configure VLAN interface.

admin@LSR1# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 10 admin@LSR1# set l3-interface vlan-interface vlan10 address 172.10.10.11 prefix-length 24 admin@LSR1# set vlans vlan-id 10 l3-interface vlan10   admin@LSR1# set l3-interface loopback lo1 address 1.1.1.1 prefix-length 32 

Step 2         Configure the OSPF protocol to advertise the network segments connected to each node's interfaces and the LSR's host routes.

admin@LSR1# set protocols ospf router-id 1.1.1.1 admin@LSR1# set protocols ospf network 172.10.10.0/24 area 0 admin@LSR1# set protocols ospf network 1.1.1.1/32 area 0

Step 3         Enable MPLS on the L3 interface.

admin@LSR1# set protocols mpls interface vlan10

Step 4         Enable MPLS LDP on the L3 interface.

admin@LSR1# set protocols mpls ldp ipv4-family interface vlan10

Step 5         Configure MPLS router ID.

admin@LSR1# set protocols mpls ldp router-id 1.1.1.1

Step 6         Configure MPLS LDP transmission address under IPv4 address family.

admin@LSR1# set protocols mpls ldp ipv4-family discovery transport-address 1.1.1.1

Step 7         Configure LDP ordered label distribution control.

admin@LSR1# set protocols mpls ldp ordered-control

Step 8         Enable IP routing.

admin@LSR1# set ip routing enable true

Step 9         Commit the configuration.  

admin@LSR1# commit

LSR 2

Step 1         Configure VLAN interface.

admin@LSR2# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 10 admin@LSR2# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 20 admin@LSR2# set l3-interface vlan-interface vlan10 address 172.10.10.22 prefix-length 24 admin@LSR2# set l3-interface vlan-interface vlan20 address 20.20.20.11 prefix-length 24 admin@LSR2# set vlans vlan-id 10 l3-interface vlan10   admin@LSR2# set vlans vlan-id 20 l3-interface vlan20 admin@LSR2# set l3-interface loopback lo2 address 2.2.2.2 prefix-length 32 

Step 2         Configure the OSPF protocol to advertise the network segments connected to each node's interfaces and the LSR's host routes.

admin@LSR2# set protocols ospf router-id 2.2.2.2 admin@LSR2# set protocols ospf network 172.10.10.0/24 area 0 admin@LSR2# set protocols ospf network 20.20.20.0/24 area 0 admin@LSR2# set protocols ospf network 2.2.2.2/24 area 0

Step 3         Enable MPLS on the L3 interface.

admin@LSR2# set protocols mpls interface vlan10 admin@LSR2# set protocols mpls interface vlan20

Step 4         Enable MPLS LDP on the L3 interface. Usually, both the incoming and outgoing interfaces of the packets need to enable MPLS. By default, MPLS is disabled on the L3 interface.

admin@LSR2# set protocols mpls ldp ipv4-family interface vlan10 admin@LSR2# set protocols mpls ldp ipv4-family interface vlan20

Step 5         Configure MPLS router ID.

admin@LSR2# set protocols mpls ldp router-id 2.2.2.2

Step 6         Configure MPLS LDP transmission address under IPv4 address family.

admin@LSR2# set protocols mpls ldp ipv4-family discovery transport-address 2.2.2.2

Step 7         Configure LDP ordered label distribution control.

admin@LSR2# set protocols mpls ldp ordered-control

Step 8         Enable IP routing.

admin@LSR2# set ip routing enable true

Step 9         Commit the configuration.  

admin@LSR2# commit

LSR 3

Step 1         Configure VLAN interface.

admin@LSR3# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 20 admin@LSR3# set l3-interface vlan-interface vlan20 address 20.20.20.22 prefix-length 24 admin@LSR3# set vlans vlan-id 20 l3-interface vlan20   admin@LSR3# set l3-interface loopback lo3 address 3.3.3.3 prefix-length 32 

Step 2         Configure the OSPF protocol to advertise the network segments connected to each node's interfaces and the LSR's host routes.

admin@LSR3# set protocols ospf router-id 3.3.3.3 admin@LSR3# set protocols ospf network 20.20.20.0/24 area 0 admin@LSR3# set protocols ospf network 3.3.3.3/32 area 0

Step 3         Enable MPLS on the L3 interface.

admin@LSR3# set protocols mpls interface vlan20

Step 4         Enable MPLS on the L3 interface. Usually, both the incoming and outgoing interfaces of the packets need to enable MPLS. By default, MPLS is disabled on the L3 interface.

admin@LSR3# set protocols mpls ldp ipv4-family interface vlan20

Step 5         Configure MPLS router ID.

admin@LSR3# set protocols mpls ldp router-id 3.3.3.3

Step 6         Configure MPLS LDP transmission address under IPv4 address family.

admin@LSR3# set protocols mpls ldp ipv4-family discovery transport-address 3.3.3.3

Step 7         Configure LDP ordered label distribution control.

admin@LSR3# set protocols mpls ldp ordered-control

Step 8         Enable IP routing.

admin@LSR3# set ip routing enable true

Step 9          Commit the configuration.  

admin@LSR3# commit

Verify the Configuration

  • After the configuration is complete, run command run show mpls ldp neighbor on each LSR. From the show result, we can see that MPLS LDP state is “OPERATIONAL“, indicating successful establishment of LDP session. Take LSR 2 as an example:

admin@LSR2# run show mpls ldp neighbor AF ID State Remote Address Uptime ipv4 1.1.1.1 OPERATIONAL 1.1.1.1 00:00:39 ipv4 3.3.3.3 OPERATIONAL 3.3.3.3 00:01:14
  • After the configuration is complete, run command run show mpls ldp binding to verify label bindings.

admin@LSR2# run show mpls ldp binding AF Destination Nexthop Local Label Remote Label In Use ipv4 1.1.1.1/32 1.1.1.1 17 imp-null yes ipv4 2.2.2.2/32 0.0.0.0 imp-null - no ipv4 3.3.3.3/32 3.3.3.3 16 imp-null yes ipv4 10.36.15.0/24 1.1.1.1 imp-null imp-null no ipv4 10.36.15.0/24 3.3.3.3 imp-null imp-null no ipv4 20.20.20.0/24 3.3.3.3 imp-null imp-null no ipv4 172.10.10.0/24 1.1.1.1 imp-null imp-null no

In the show result, the parameter “In Use” indicates whether the label binding entry is effective or not.

  • yes: indicates the label binding entry is effective.

  • no: indicates the label binding entry is ineffective.

Related content

Copyright © 2025 Pica8 Inc. All Rights Reserved.