SlideShare a Scribd company logo
1
Label Distribution Protocol
1. Terminology
Such the goal of LDP is label distribution, so LDP does not attempt to perform any routing
functions and relies on an IGP for all routing-related decisions. LDP establishes MPLS LSPs
along the best-path to a destination as determined by IP forwarding. Therefore, LDP is used to
provide LSP throughout the complete network domain covered by an IGP. The fact that LDP relies
on the IGP for the routing function has several implications and relationship between together, as
belows;
▪ Established LSPs always follow the IGP shortest/best path
▪ Established LSPs limited to the scope of the IGP. Thus, LSPs cannot traverse AS
boundaries
▪ If traffic blackholed or looped, we can loss of synchronization between IGP and
LDP can result in traffic loss. Also, there is a potential for the race condition
situation
We can list its specific features as below;
▪ Automatic discovery of peers and reliable transport (we can explain in next page)
▪ It does not support Traffic Engineering
▪ A LDP router advertises one label for each FEC
▪ Labels are originated only hop-by-hop based
▪ It distributes the labels throughout the MPLS core via IGP reachability, and when
transport labels uses two different operation
❖ Transport
✓ The label distributing are used for transport label in the MPLS core
✓ It can change on a per hop basis and points a remote end of the LSPs
path PE IP address
❖ Vpn
✓ Allocated from BGP when a PE learns routes from a CE
▪ By default, Junos OS using the following subsequence features when enables the
MPLS process;
❖ Downstream Allocation
❖ Ordered Control
❖ Unsolicited Distribution
❖ Liberal Label Retention
For each egress router, LDP creates an LSP tree from every ingress router. The label
information is exchanged in a hop-by-hop based, and by default every LSR in the LDP domain
will become an ingress router to all other routers. Once this process is repeated for each router,
there will be a “Full Mesh” of LSPs from every LDP router to every LDP router. Also, labels are
automatically distributed from the egress node using the “Downstream Unsolicited” mode, as
shown below:
2
In this mode, each LSR advertises a label for each FEC to the other LDP neighbors without
them requesting it. Basically, each LSR just tells everyone about every label it created. So R3
says to R1 and R2, “I have a route to 1.1.1.1, use label 100 to reach it”. The same process happens
on R1 and R2.
LDP operation is driven by message exchanges between peers. Potential peers, that are
directly connected to each other are automatically discovered via “Hello Message” multicast
(224.0.0.2) to a well-known UDP port (646). Also, LDP allows for discovery of remote peers using
targeted “Hello Message”. After that, once the potential peer is discovered, LDP uses the TCP port
to forms an adjacency the peer. Once the LDP session is establishment, label is advertised for FEC.
2. Example
Considering the network topology below, we will perform LDP configuration on the MPLS
network. Here, the following topology was performed by creating different “Logical System” on
a single physical MX104 router. So the explanations of some terms are given below before
verification our configurations;
▪ P – Provider Router
▪ PE – Provider Edge Router
▪ CE – Customer Edge Router
▪ LS – Logical System
▪ Also we can representation numbers starting 1 to18 are determined a logical tunnel
interface with associated a virtual router
Logical Systems enable you to partition a single router into multiple logical devices that
perform independent routing tasks. Offer routing and management separation. Each logical system
has its own routing tables. This is the feature that allows us to use our existing structure on a single
physical device, because instead of performing our operations under a single master instance, we
break this structure into pieces as follows;
3
Since our purpose in this documentation is to analyze the working logic of LDP, we will
not be concerned with the configurations of the CE routers and PE routers on the customer-facing
interfaces. In addition, OSPF was used as an IGP protocol on the MPLS network. Below is a table
with configurations of one of the PE and P routers for an example;
## Configuration of P1 Router ##
root@ATAKAN_TEST:LS1-P1> show configuration | display set | no-more
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 description LS1->LS2
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 encapsulation ethernet
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 peer-unit 2
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 family inet address 10.10.12.1/30
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 family mpls
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 description LS1->LS3
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 encapsulation ethernet
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 peer-unit 4
4
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 family inet address 10.10.34.1/30
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 family mpls
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 description LS1->LS11
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 encapsulation ethernet
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 peer-unit 8
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 family inet address 10.10.78.1/30
set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 family mpls
set logical-systems LS1-P1 interfaces lo0 unit 1 description LS1->Lo0
set logical-systems LS1-P1 interfaces lo0 unit 1 family inet address 1.1.1.1/32
set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.1
set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.3
set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.7
set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.1
set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.3
set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lo0.1 passive
set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.7
set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.1
set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.3
set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.7
set logical-systems LS1-P1 routing-options router-id 1.1.1.1
## Configuration of PE-1 Router ##
root@ATAKAN_TEST:LS11-PE1> show configuration | display set | no-more
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 description LS11->LS1
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 encapsulation ethernet
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 peer-unit 7
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 family inet address 10.10.78.2/30
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 family mpls
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 description LS11->LS111
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 encapsulation ethernet
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 peer-unit 16
set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 family inet address 192.168.156.15/24
set logical-systems LS11-PE1 interfaces lo0 unit 11 description LS11-PE1->Lo0
set logical-systems LS11-PE1 interfaces lo0 unit 11 family inet address 11.11.11.11/32
set logical-systems LS11-PE1 protocols mpls traffic-engineering bgp-igp-both-ribs
set logical-systems LS11-PE1 protocols mpls interface lt-0/0/0.8
set logical-systems LS11-PE1 protocols bgp group INTERNAL type internal
set logical-systems LS11-PE1 protocols bgp group INTERNAL local-address 11.11.11.11
set logical-systems LS11-PE1 protocols bgp group INTERNAL family inet-vpn any
set logical-systems LS11-PE1 protocols bgp group INTERNAL neighbor 12.12.12.12
set logical-systems LS11-PE1 protocols bgp group INTERNAL neighbor 13.13.13.13
set logical-systems LS11-PE1 protocols ospf area 0.0.0.0 interface lt-0/0/0.8
set logical-systems LS11-PE1 protocols ospf area 0.0.0.0 interface lo0.11 passive
set logical-systems LS11-PE1 protocols ldp interface lt-0/0/0.8
set logical-systems LS11-PE1 routing-instances VRF-1 instance-type vrf
set logical-systems LS11-PE1 routing-instances VRF-1 interface lt-0/0/0.15
set logical-systems LS11-PE1 routing-instances VRF-1 route-distinguisher 11.11.11.11:1
set logical-systems LS11-PE1 routing-instances VRF-1 vrf-target target:65000:1
set logical-systems LS11-PE1 routing-instances VRF-1 vrf-table-label
set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL type external
set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL peer-as
65100
set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL neighbor
192.168.156.16
set logical-systems LS11-PE1 routing-options router-id 11.11.11.11
set logical-systems LS11-PE1 routing-options autonomous-system 65000
5
After this stage, first confirm that the LDP speaking interfaces work successfully through
the image below:
Routers must first establish a TCP session between each other before they can establish an
LDP session. The TCP session enables the routers to exchange the label advertisements needed
for the LDP session. To establish the TCP session, each router must learn the other router's
transport address. The transport address is an IP address used to identify the TCP session over
which the LDP session will run. We can see also more detail as below:
After LDP discovering its neighbor with UDP, tries to establish a TCP connection in the
next step. This process takes place with standard 3-Way-Handsake, and if it is successfully
completed, the connection type appears as “Open” shown in the image below. In addition, the
connection "Session ID" information is used during label mapping.
6
After, focus output label database. LDP speaker advertises a label for all valid FECs to any
of its LDP neighbors. The session shows 1.1.1.1 – 11.11.11.11, which means this is the LDP
session between P1 and PE-1. PE-1 is advertising a label for the prefix 11.11.11.11/32 with a value
of 3 to upstream neighbor, which is P1.
LDP relies on the IGP in order to determine which labels are valid. P1 has learned six label
values from PE-1. P will check its route table to determine which of those /32 addresses actually
resides in the direction of PE-1:
7
As P1 is learning the label from the correct interface, the label is valid and P1 installs that
route into inet.3 without any label, due to “Implicit null label” advertised by PE-1 label as shown
above. After the verification process, P1 now advertises a new label value for the same FEC to
another upstream neighbor:
Now verify the label path step-by-step to ensure. First, check the route to PE-1’s loopback
from PE-3:
PE-1 has a regular OSPF route as well as the labeled next-hop in inet.3. The route in inet.3
shows that when PE-1 sends a labeled packet to PE-3, it imposes the label 299808 onto the packet,
and sends out lt-0/0/0.8 towards P1. Remember that P1 previously sent a label value of 299808 to
P3 to get to PE-3.
8
The same step as the previous step above will be repeated on P3 router. The last router,
which is P3, advertising a connected network will send a special reserved label to the neighboring
LSRs, with value 3 (implicit null). This will tells these routers to pop the label and just forward
these packets using IP or if there is another label with that label. Only one label is poped. The P3
router is now the penultimate router. This means it should “POP” the preceding transport label and
send it towards PE-3. Let’s verify:
3. References
While creating this document, I took the articles and books below as a reference:
▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/security-logical-
systems-for-routers-and-switches.html#id-logical-systems-applications
▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/logical-systems-
overview.html
▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ldp-overview.html
▪ https://www.inetzero.com/no-more-doubt-about-ldp/
▪ https://blog.ine.com/2010/02/26/the-mpls-control-plane-ldp
▪ https://ccieblog.co.uk/mpls/downstream-on-demand-vs-unsolicited-downstream-label-
distribution
▪ https://tools.ietf.org/html/rfc5036
▪ https://tools.ietf.org/html/rfc5443
▪ Day One: MPLS for Enterprise Engineers – Juniper Networks
▪ Day One: Routing the Internet Protocol – Juniper Networks
▪ IPexpert's Multiprotocol Label Switching (MPLS) Operation and Troubleshooting – Terry
Vinson
▪ MPLS-Enabled Applications: Emerging Developments And New Technologies – Ina
Minei, Julian Lucek
▪ Advanced MPLS Design and Implementation – Vivek Alwayn

More Related Content

PDF
Resource reservation protocol
PDF
Spaning Tree Protocol
PDF
Open Shortest Path First
PPTX
OPEN SHORTEST PATH FIRST (OSPF)
PPTX
Dynamic Routing Protocol OSPF
PPTX
Label Distribution Protocol
PPTX
OSPF Fundamental
PPTX
Layer3protocols
Resource reservation protocol
Spaning Tree Protocol
Open Shortest Path First
OPEN SHORTEST PATH FIRST (OSPF)
Dynamic Routing Protocol OSPF
Label Distribution Protocol
OSPF Fundamental
Layer3protocols

What's hot (20)

PPT
Layer 3
PPT
Rip ospf and bgp
PPT
PDF
Juniper MPLS Tutorial by Soricelli
PPT
Juniper mpls best practice part 1
PPTX
PPTX
Open shortest path first (ospf)
PPTX
Ppt of routing protocols
PDF
MPLS (Multiprotocol Label Switching)
PPT
ospf routing protocol
PPT
Mpls-Multi Protocol label Switching
PPT
Chapter 06 - Routing
PPTX
Routing protocols
PPTX
BASICS OF ROUTING IN NETWORKS
PPTX
Link state routing protocol
PPTX
Olsr protocol ppt
PPTX
Network Layer
PPT
PPTX
Network layer
Layer 3
Rip ospf and bgp
Juniper MPLS Tutorial by Soricelli
Juniper mpls best practice part 1
Open shortest path first (ospf)
Ppt of routing protocols
MPLS (Multiprotocol Label Switching)
ospf routing protocol
Mpls-Multi Protocol label Switching
Chapter 06 - Routing
Routing protocols
BASICS OF ROUTING IN NETWORKS
Link state routing protocol
Olsr protocol ppt
Network Layer
Network layer
Ad

Similar to Label distribution protocol (20)

PDF
MPLS Tutorial2
PDF
MPLS Tutorial
PDF
mpls-02
PPTX
MPLS-RFC3031-Summary.pptx
PPT
Mpls Services
PDF
MPLS Lecture1(H)-102020.pdf
PPT
yun-MPLS.ppt
PPT
MPLS-extra.ppt
PPT
Multi protocol label switching basics tutorial for beginners.ppt
PDF
23100136 mpls
PPSX
PPTX
An introduction to MPLS networks and applications
PPT
yun-MPLSDASDFETGREGRTRRETRETRERTDFGDFG.ppt
PDF
Frame mode mpls
PDF
Frame mode mpls
PPT
Broadband Network Presentation
PPT
MPLS_TEFGREGERGDFSGERTGERGRFGERGERGRG.ppt
PPT
Pot for getting to learn the basics of mpls
PPT
Mpls te
PDF
mpls.pdf
MPLS Tutorial2
MPLS Tutorial
mpls-02
MPLS-RFC3031-Summary.pptx
Mpls Services
MPLS Lecture1(H)-102020.pdf
yun-MPLS.ppt
MPLS-extra.ppt
Multi protocol label switching basics tutorial for beginners.ppt
23100136 mpls
An introduction to MPLS networks and applications
yun-MPLSDASDFETGREGRTRRETRETRERTDFGDFG.ppt
Frame mode mpls
Frame mode mpls
Broadband Network Presentation
MPLS_TEFGREGERGDFSGERTGERGRFGERGERGRG.ppt
Pot for getting to learn the basics of mpls
Mpls te
mpls.pdf
Ad

Recently uploaded (20)

PPTX
Funds Management Learning Material for Beg
PPTX
SAP Ariba Sourcing PPT for learning material
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
DOCX
Unit-3 cyber security network security of internet system
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
Introduction to the IoT system, how the IoT system works
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
Funds Management Learning Material for Beg
SAP Ariba Sourcing PPT for learning material
The Internet -By the Numbers, Sri Lanka Edition
Tenda Login Guide: Access Your Router in 5 Easy Steps
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Job_Card_System_Styled_lorem_ipsum_.pptx
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Sims 4 Historia para lo sims 4 para jugar
international classification of diseases ICD-10 review PPT.pptx
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Power Point - Lesson 3_2.pptx grad school presentation
Unit-3 cyber security network security of internet system
introduction about ICD -10 & ICD-11 ppt.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Introduction to the IoT system, how the IoT system works
Paper PDF World Game (s) Great Redesign.pdf
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Design_with_Watersergyerge45hrbgre4top (1).ppt

Label distribution protocol

  • 1. 1 Label Distribution Protocol 1. Terminology Such the goal of LDP is label distribution, so LDP does not attempt to perform any routing functions and relies on an IGP for all routing-related decisions. LDP establishes MPLS LSPs along the best-path to a destination as determined by IP forwarding. Therefore, LDP is used to provide LSP throughout the complete network domain covered by an IGP. The fact that LDP relies on the IGP for the routing function has several implications and relationship between together, as belows; ▪ Established LSPs always follow the IGP shortest/best path ▪ Established LSPs limited to the scope of the IGP. Thus, LSPs cannot traverse AS boundaries ▪ If traffic blackholed or looped, we can loss of synchronization between IGP and LDP can result in traffic loss. Also, there is a potential for the race condition situation We can list its specific features as below; ▪ Automatic discovery of peers and reliable transport (we can explain in next page) ▪ It does not support Traffic Engineering ▪ A LDP router advertises one label for each FEC ▪ Labels are originated only hop-by-hop based ▪ It distributes the labels throughout the MPLS core via IGP reachability, and when transport labels uses two different operation ❖ Transport ✓ The label distributing are used for transport label in the MPLS core ✓ It can change on a per hop basis and points a remote end of the LSPs path PE IP address ❖ Vpn ✓ Allocated from BGP when a PE learns routes from a CE ▪ By default, Junos OS using the following subsequence features when enables the MPLS process; ❖ Downstream Allocation ❖ Ordered Control ❖ Unsolicited Distribution ❖ Liberal Label Retention For each egress router, LDP creates an LSP tree from every ingress router. The label information is exchanged in a hop-by-hop based, and by default every LSR in the LDP domain will become an ingress router to all other routers. Once this process is repeated for each router, there will be a “Full Mesh” of LSPs from every LDP router to every LDP router. Also, labels are automatically distributed from the egress node using the “Downstream Unsolicited” mode, as shown below:
  • 2. 2 In this mode, each LSR advertises a label for each FEC to the other LDP neighbors without them requesting it. Basically, each LSR just tells everyone about every label it created. So R3 says to R1 and R2, “I have a route to 1.1.1.1, use label 100 to reach it”. The same process happens on R1 and R2. LDP operation is driven by message exchanges between peers. Potential peers, that are directly connected to each other are automatically discovered via “Hello Message” multicast (224.0.0.2) to a well-known UDP port (646). Also, LDP allows for discovery of remote peers using targeted “Hello Message”. After that, once the potential peer is discovered, LDP uses the TCP port to forms an adjacency the peer. Once the LDP session is establishment, label is advertised for FEC. 2. Example Considering the network topology below, we will perform LDP configuration on the MPLS network. Here, the following topology was performed by creating different “Logical System” on a single physical MX104 router. So the explanations of some terms are given below before verification our configurations; ▪ P – Provider Router ▪ PE – Provider Edge Router ▪ CE – Customer Edge Router ▪ LS – Logical System ▪ Also we can representation numbers starting 1 to18 are determined a logical tunnel interface with associated a virtual router Logical Systems enable you to partition a single router into multiple logical devices that perform independent routing tasks. Offer routing and management separation. Each logical system has its own routing tables. This is the feature that allows us to use our existing structure on a single physical device, because instead of performing our operations under a single master instance, we break this structure into pieces as follows;
  • 3. 3 Since our purpose in this documentation is to analyze the working logic of LDP, we will not be concerned with the configurations of the CE routers and PE routers on the customer-facing interfaces. In addition, OSPF was used as an IGP protocol on the MPLS network. Below is a table with configurations of one of the PE and P routers for an example; ## Configuration of P1 Router ## root@ATAKAN_TEST:LS1-P1> show configuration | display set | no-more set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 description LS1->LS2 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 encapsulation ethernet set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 peer-unit 2 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 family inet address 10.10.12.1/30 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 1 family mpls set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 description LS1->LS3 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 encapsulation ethernet set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 peer-unit 4
  • 4. 4 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 family inet address 10.10.34.1/30 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 3 family mpls set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 description LS1->LS11 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 encapsulation ethernet set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 peer-unit 8 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 family inet address 10.10.78.1/30 set logical-systems LS1-P1 interfaces lt-0/0/0 unit 7 family mpls set logical-systems LS1-P1 interfaces lo0 unit 1 description LS1->Lo0 set logical-systems LS1-P1 interfaces lo0 unit 1 family inet address 1.1.1.1/32 set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.1 set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.3 set logical-systems LS1-P1 protocols mpls interface lt-0/0/0.7 set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.1 set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.3 set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lo0.1 passive set logical-systems LS1-P1 protocols ospf area 0.0.0.0 interface lt-0/0/0.7 set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.1 set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.3 set logical-systems LS1-P1 protocols ldp interface lt-0/0/0.7 set logical-systems LS1-P1 routing-options router-id 1.1.1.1 ## Configuration of PE-1 Router ## root@ATAKAN_TEST:LS11-PE1> show configuration | display set | no-more set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 description LS11->LS1 set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 encapsulation ethernet set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 peer-unit 7 set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 family inet address 10.10.78.2/30 set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 8 family mpls set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 description LS11->LS111 set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 encapsulation ethernet set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 peer-unit 16 set logical-systems LS11-PE1 interfaces lt-0/0/0 unit 15 family inet address 192.168.156.15/24 set logical-systems LS11-PE1 interfaces lo0 unit 11 description LS11-PE1->Lo0 set logical-systems LS11-PE1 interfaces lo0 unit 11 family inet address 11.11.11.11/32 set logical-systems LS11-PE1 protocols mpls traffic-engineering bgp-igp-both-ribs set logical-systems LS11-PE1 protocols mpls interface lt-0/0/0.8 set logical-systems LS11-PE1 protocols bgp group INTERNAL type internal set logical-systems LS11-PE1 protocols bgp group INTERNAL local-address 11.11.11.11 set logical-systems LS11-PE1 protocols bgp group INTERNAL family inet-vpn any set logical-systems LS11-PE1 protocols bgp group INTERNAL neighbor 12.12.12.12 set logical-systems LS11-PE1 protocols bgp group INTERNAL neighbor 13.13.13.13 set logical-systems LS11-PE1 protocols ospf area 0.0.0.0 interface lt-0/0/0.8 set logical-systems LS11-PE1 protocols ospf area 0.0.0.0 interface lo0.11 passive set logical-systems LS11-PE1 protocols ldp interface lt-0/0/0.8 set logical-systems LS11-PE1 routing-instances VRF-1 instance-type vrf set logical-systems LS11-PE1 routing-instances VRF-1 interface lt-0/0/0.15 set logical-systems LS11-PE1 routing-instances VRF-1 route-distinguisher 11.11.11.11:1 set logical-systems LS11-PE1 routing-instances VRF-1 vrf-target target:65000:1 set logical-systems LS11-PE1 routing-instances VRF-1 vrf-table-label set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL type external set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL peer-as 65100 set logical-systems LS11-PE1 routing-instances VRF-1 protocols bgp group EXTERNAL neighbor 192.168.156.16 set logical-systems LS11-PE1 routing-options router-id 11.11.11.11 set logical-systems LS11-PE1 routing-options autonomous-system 65000
  • 5. 5 After this stage, first confirm that the LDP speaking interfaces work successfully through the image below: Routers must first establish a TCP session between each other before they can establish an LDP session. The TCP session enables the routers to exchange the label advertisements needed for the LDP session. To establish the TCP session, each router must learn the other router's transport address. The transport address is an IP address used to identify the TCP session over which the LDP session will run. We can see also more detail as below: After LDP discovering its neighbor with UDP, tries to establish a TCP connection in the next step. This process takes place with standard 3-Way-Handsake, and if it is successfully completed, the connection type appears as “Open” shown in the image below. In addition, the connection "Session ID" information is used during label mapping.
  • 6. 6 After, focus output label database. LDP speaker advertises a label for all valid FECs to any of its LDP neighbors. The session shows 1.1.1.1 – 11.11.11.11, which means this is the LDP session between P1 and PE-1. PE-1 is advertising a label for the prefix 11.11.11.11/32 with a value of 3 to upstream neighbor, which is P1. LDP relies on the IGP in order to determine which labels are valid. P1 has learned six label values from PE-1. P will check its route table to determine which of those /32 addresses actually resides in the direction of PE-1:
  • 7. 7 As P1 is learning the label from the correct interface, the label is valid and P1 installs that route into inet.3 without any label, due to “Implicit null label” advertised by PE-1 label as shown above. After the verification process, P1 now advertises a new label value for the same FEC to another upstream neighbor: Now verify the label path step-by-step to ensure. First, check the route to PE-1’s loopback from PE-3: PE-1 has a regular OSPF route as well as the labeled next-hop in inet.3. The route in inet.3 shows that when PE-1 sends a labeled packet to PE-3, it imposes the label 299808 onto the packet, and sends out lt-0/0/0.8 towards P1. Remember that P1 previously sent a label value of 299808 to P3 to get to PE-3.
  • 8. 8 The same step as the previous step above will be repeated on P3 router. The last router, which is P3, advertising a connected network will send a special reserved label to the neighboring LSRs, with value 3 (implicit null). This will tells these routers to pop the label and just forward these packets using IP or if there is another label with that label. Only one label is poped. The P3 router is now the penultimate router. This means it should “POP” the preceding transport label and send it towards PE-3. Let’s verify: 3. References While creating this document, I took the articles and books below as a reference: ▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/security-logical- systems-for-routers-and-switches.html#id-logical-systems-applications ▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/logical-systems- overview.html ▪ https://www.juniper.net/documentation/en_US/junos/topics/topic-map/ldp-overview.html ▪ https://www.inetzero.com/no-more-doubt-about-ldp/ ▪ https://blog.ine.com/2010/02/26/the-mpls-control-plane-ldp ▪ https://ccieblog.co.uk/mpls/downstream-on-demand-vs-unsolicited-downstream-label- distribution ▪ https://tools.ietf.org/html/rfc5036 ▪ https://tools.ietf.org/html/rfc5443 ▪ Day One: MPLS for Enterprise Engineers – Juniper Networks ▪ Day One: Routing the Internet Protocol – Juniper Networks ▪ IPexpert's Multiprotocol Label Switching (MPLS) Operation and Troubleshooting – Terry Vinson ▪ MPLS-Enabled Applications: Emerging Developments And New Technologies – Ina Minei, Julian Lucek ▪ Advanced MPLS Design and Implementation – Vivek Alwayn