How MPLS Path is Selected?
When a LSP is configured on ingress router the LSP path is establish as the primary path. If for some reason primary path went down the ingress LSR will try to find and establish the new primary path. Once new primary path establishes successfully the ingress router will start forwarding traffic to that new path. However, transit traffic will lose during the transaction of LSP from old primary path to new primary path or it is also possible that all the transit traffic will lost if ingress router fails to find new primary path and as LSP will remains down in this case. Let's understand this with couple of scenarios.Before we discuss the traffic lost scenarios let's see the network topology that will use in these scenarios.
![]() |
| Figure-1 |
The IBGP session is also establish between the loopbacks of PE routers. An EBGP is establish between PE and CE routers. A CE router share its loopback route to local PE router via the EBGP session, then the local PE share this route to remote PE router via IBGP session and then remote PE share this same route with remote CE via the EBGP session.
Local PE router using the next-hop self before advertising the BGP routes to remote PE router. Once we successfully establish the LSP, BGP start using the LSP to resolve next hop of BGP route.
Check that local PE router installs the loopback of remote PE in its routing table via OSPF.
![]() |
| Figure-2 |
![]() |
| Figure-3 |
![]() |
| Figure-4 |
Scenario-1
We establish the LSP without any traffic engineering (bandwidth or priority) constraints.PE1
root@PE1# show protocols mpls
label-switched-path pe1-to-pe2 {
from 192.168.100.1;
to 192.168.200.1;
}
PE2
root@PE2# show protocols mpls
label-switched-path pe2-to-pe1 {
from 192.168.200.1;
to 192.168.100.1;
}By default, if no traffic parameters are configured for LSP the ingress router establish the primary path by using the lowest CSPF metric value. In Figure-5 the primary path for LSP pe1-to-pe2 is establish as PE1-P1-P4-P5-P6-PE2 since this path has the lowest CSPF metric (metric value 5) as compare to the metric value of other paths. (Note: if we do not configure the CSPF metric, LSP try to use the IGP metrics. It means that if OSPF metric towards the destination is 5, all LSPs towards that destination automatically inherits the metric value 5).
![]() |
| Figure-5 |
![]() |
| Figure-6 |
![]() |
| Figure-7 |
The following figure explains this scenario.
![]() |
| Figure-8 |
![]() |
| Figure-9 |
The problem is that during the time when link went down to the time when ingress router successfully establishes
the new primary path for LSP the transit traffic will lost. The following figure confirm that traffic lost.
![]() |
| Figure-10 |
Scenario-2
As we already discuss that when the primary path for LSP went down the ingress LSR tries to find out the new primary path for that LSP. However, it is possible that ingress LSR could not find the new primary path due to the traffic parameters configure for LSP (like bandwidth). There might be other paths available, obviously less attractive and not full fill the defined traffic constraints for that LSP. In that case we can use those paths as backup or secondary path for that LSP. To use the backup path for LSP we need to configure the secondary path for the LSP.Let's first configure a LSP from pe1-to-pe2 with bandwidth requirement for LSP is 300 mbps
PE1
root@PE1# show protocols mpls
label-switched-path pe1-to-pe2 {
from
192.168.100.1;
to
192.168.200.1;
bandwidth 300m;
}
The CSPF finds the best primary path containing the link that has 300mbps or more bandwidth available. Any link that has less than 300mbps bandwidth available will not be part of CSPF best path calculation. In figure-1 network diagram only possible path with 300mbps bandwidth available is PE1-P1-P2-P3-P6-PE2 and this is the path that establish as primary path for LSP
Following figure show the primary LSP path with 300mbps bandwidth requirement.
![]() |
| Figure-11 |
Verify the primary path for LSP
![]() |
| Figure-12 |
Now if for any reason link between P2 and P3 went down the ingress LSR
try to find new primary path for LSP and as no path full fill the LSP bandwidth
requirement the ingress router fails to establish the new LSP primary path and LSP remains
down status until the link between router P2 and P3 restored.
This problem can be solved by defining the Secondary path.
~~~~~ THE END ~~~~~











