Wednesday, 24 January 2018

MPLS Traffic Protection (Part 1)

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
In this network diagram the OSPF protocol is configured on both the PE routers and all the P routers. Using the OSPF both PE routers share their loopback addresses with each other. PE routers are using the RSVP/CSPF to find the best path and establish the LSP between PE1 and PE2 routers loopback addresses.

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
Check the IBGP and EBGP sessions are successfully establish on local PE router.
Figure-3
Verify that BGP routes install in local PE router's routing table. Here the BGP next-hop is resolved by OSPF since PE1 learns the loopback IP of remote PE via the OSPF protocol.
Figure-4
Now Let's consider the first scenario

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
In Figure-6 we verify the LSP status

Figure-6
Figure-7 verify the LSP primary path
Figure-7
What happen if any intermediate link or node of primary path wend down. If any such failure occur the downstream router will generate the ResvTear message and send that message to ingress router. Ingress router has no knowledge of failure and thus continue to sending traffic on primary path until it received the ResvTesr message. Once ingress router receives ResvTear message from downstream router it signals LSP DOWN and clear the LSP primary path. Then ingress router tries to find the new primary path according to the traffic parameters define in LSP. If ingress router successfully finds the new primary path it establishes that path as primary path of LSP and signal LSP UP.

The following figure explains this scenario.
Figure-8
In Figure-5 a LSP named pe1-to-pe2 is establish from PE1 to PE2 routers, the primary path for this LSP is PE1-P1-P4-P5-P6-PE2.  Suppose the link between P4 and P5 wend down. P4 detect its link failure and it generates the ResvTear message and send this message towards the upstream routers on LSP path. P4 send the ResvTear message to P2 and then P2 forward this message to PE1 the ingress LSR. Upon receiving the ResvTear message ingress LSR torn down the LSP primary path and try to establish new primary path for LSP. Again, as we do not configure any traffic parameters for LSP the ingress router tries to find primary path according to the CSPF path metric value. In this example the next best path with respect to the CSPF metric is PE1-P1-P2-P3-P6-PE2. The CSPF metric value for new path is 17. As ingress router successfully finds the new primary path it signals the LSP UP and use the new path as primary path for pe1-to-pe2 LSP.    

Verify the new LSP path.
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
This traffic lost can be minimize by using traffic protection techniques like fast reroute or link-protection.

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 ~~~~~

No comments:

Post a Comment