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
Atakan ATAK
 
PDF
Spaning Tree Protocol
Atakan ATAK
 
PDF
Open Shortest Path First
Atakan ATAK
 
PPTX
OPEN SHORTEST PATH FIRST (OSPF)
Ann Joseph
 
PPTX
Dynamic Routing Protocol OSPF
Atakan ATAK
 
PPTX
Label Distribution Protocol
Kashif Latif
 
PPTX
OSPF Fundamental
Reza Farahani
 
PPTX
Layer3protocols
assinha
 
Resource reservation protocol
Atakan ATAK
 
Spaning Tree Protocol
Atakan ATAK
 
Open Shortest Path First
Atakan ATAK
 
OPEN SHORTEST PATH FIRST (OSPF)
Ann Joseph
 
Dynamic Routing Protocol OSPF
Atakan ATAK
 
Label Distribution Protocol
Kashif Latif
 
OSPF Fundamental
Reza Farahani
 
Layer3protocols
assinha
 

What's hot (20)

PPT
Layer 3
aaa10425
 
PPT
Rip ospf and bgp
Abhishek Kesharwani
 
PPT
Ospf
Sasi Reddy
 
PDF
Juniper MPLS Tutorial by Soricelli
Febrian ‎
 
PPT
Juniper mpls best practice part 1
Febrian ‎
 
PPTX
Ospf
ankit_saluja
 
PPTX
Open shortest path first (ospf)
Respa Peter
 
PPTX
Ppt of routing protocols
Bhagyashri Dhoke
 
PDF
MPLS (Multiprotocol Label Switching)
Netwax Lab
 
PPT
ospf routing protocol
Ameer Agel
 
PPT
Mpls-Multi Protocol label Switching
Sumit Pathak
 
PPT
Chapter 06 - Routing
phanleson
 
PPTX
Routing protocols
Sourabh Goyal
 
PPTX
BASICS OF ROUTING IN NETWORKS
KABILESH RAMAR
 
PPTX
Link state routing protocol
Aung Thu Rha Hein
 
PPTX
Olsr protocol ppt
sharat sajjan
 
PPTX
Network Layer
Dr Shashikant Athawale
 
PPT
Ospf
DeeN Mohammad
 
PPTX
Network layer
Hasib Shaikh
 
Layer 3
aaa10425
 
Rip ospf and bgp
Abhishek Kesharwani
 
Juniper MPLS Tutorial by Soricelli
Febrian ‎
 
Juniper mpls best practice part 1
Febrian ‎
 
Open shortest path first (ospf)
Respa Peter
 
Ppt of routing protocols
Bhagyashri Dhoke
 
MPLS (Multiprotocol Label Switching)
Netwax Lab
 
ospf routing protocol
Ameer Agel
 
Mpls-Multi Protocol label Switching
Sumit Pathak
 
Chapter 06 - Routing
phanleson
 
Routing protocols
Sourabh Goyal
 
BASICS OF ROUTING IN NETWORKS
KABILESH RAMAR
 
Link state routing protocol
Aung Thu Rha Hein
 
Olsr protocol ppt
sharat sajjan
 
Network Layer
Dr Shashikant Athawale
 
Network layer
Hasib Shaikh
 
Ad

Similar to Label distribution protocol (20)

PDF
MPLS Tutorial2
kennedy Ochieng Ndire
 
PDF
MPLS Tutorial
kennedy Ochieng Ndire
 
PDF
mpls-02
kj teoh
 
PPTX
MPLS-RFC3031-Summary.pptx
ManickavasagamDeivan
 
PPT
Mpls Services
Kristof De Brouwer
 
PDF
MPLS Lecture1(H)-102020.pdf
MulugetaTsehay1
 
PPT
yun-MPLS.ppt
ssuserd0c720
 
PPT
MPLS-extra.ppt
SidharthSharma546629
 
PPT
Multi protocol label switching basics tutorial for beginners.ppt
samuela24
 
PDF
23100136 mpls
amirulalam
 
PPSX
MPLS
Saif Ullah Khan
 
PPTX
An introduction to MPLS networks and applications
Shawn Zandi
 
PPT
yun-MPLSDASDFETGREGRTRRETRETRERTDFGDFG.ppt
ajaiesg
 
PDF
Frame mode mpls
Mohamed Gamel
 
PDF
Frame mode mpls
Swapnil Kapate
 
PPT
Broadband Network Presentation
Muhammad Faisal
 
PPT
MPLS_TEFGREGERGDFSGERTGERGRFGERGERGRG.ppt
ajaiesg
 
PPT
Pot for getting to learn the basics of mpls
amit347423
 
PPT
Mpls te
Ahmad Hailan
 
PDF
mpls.pdf
Huynh MVT
 
MPLS Tutorial2
kennedy Ochieng Ndire
 
MPLS Tutorial
kennedy Ochieng Ndire
 
mpls-02
kj teoh
 
MPLS-RFC3031-Summary.pptx
ManickavasagamDeivan
 
Mpls Services
Kristof De Brouwer
 
MPLS Lecture1(H)-102020.pdf
MulugetaTsehay1
 
yun-MPLS.ppt
ssuserd0c720
 
MPLS-extra.ppt
SidharthSharma546629
 
Multi protocol label switching basics tutorial for beginners.ppt
samuela24
 
23100136 mpls
amirulalam
 
An introduction to MPLS networks and applications
Shawn Zandi
 
yun-MPLSDASDFETGREGRTRRETRETRERTDFGDFG.ppt
ajaiesg
 
Frame mode mpls
Mohamed Gamel
 
Frame mode mpls
Swapnil Kapate
 
Broadband Network Presentation
Muhammad Faisal
 
MPLS_TEFGREGERGDFSGERTGERGRFGERGERGRG.ppt
ajaiesg
 
Pot for getting to learn the basics of mpls
amit347423
 
Mpls te
Ahmad Hailan
 
mpls.pdf
Huynh MVT
 
Ad

Recently uploaded (20)

PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
PPTX
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PDF
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
PPT
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
PDF
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PPTX
Parallel & Concurrent ...
yashpavasiya892
 
PPTX
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
PPTX
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
PPTX
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
PDF
DNSSEC Made Easy, presented at PHNOG 2025
APNIC
 
PPTX
Unlocking Hope : How Crypto Recovery Services Can Reclaim Your Lost Funds
lionsgate network
 
PDF
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
PDF
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
LESSON-2-Roles-of-ICT-in-Teaching-for-learning_123922 (1).pptx
renavieramopiquero
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
Crypto Recovery California Services.pptx
lionsgate network
 
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
KIPER4D situs Exclusive Game dari server Star Gaming Asia
hokimamad0
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
Parallel & Concurrent ...
yashpavasiya892
 
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
DNSSEC Made Easy, presented at PHNOG 2025
APNIC
 
Unlocking Hope : How Crypto Recovery Services Can Reclaim Your Lost Funds
lionsgate network
 
PDF document: World Game (s) Great Redesign.pdf
Steven McGee
 
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 

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