SR-TE LSP Path Computation Using Local CSPF

This chapter describes the SR-TE LSP path computation using local CSPF.

Topics in this chapter include:

Applicability

This chapter was initially written for SR OS Release 19.10.R1, but the MD-CLI in the current edition corresponds to SR OS Release 21.2.R1. Local CSPF can be used in IPv4 SR-TE LSP primary and secondary path computation in SR OS Release 19.7.R1, and later.

Overview

Segment Routing with Traffic Engineering Label Switched Paths (SR-TE LSPs) can be computed using:

  • hop-to-label (IP-to-label) translation (default; path-computation-method not specified)

  • Path Computation Element (PCE) path computation (path-computation-method pce)

  • local Constrained Shortest Path First (CSPF) (path-computation-method local-cspf)

Hop-to-label path computation

SR-TE LSP path computation uses hop-to-label translation as the default computation method. The PCC interrogates the TE database, and translates any hop configured in the applied path statement to a Node SID (N-SID) or Adjacency SID (A-SID), to produce a list of segment IDs. Strict hops are mapped to adjacency SIDs; loose hops are mapped to node SIDs. The destination address in the LSP configuration implies a final loose hop.

PCE path computation

SR-TE LSP path computation can also be performed using an external PCE controller. In this case, the PCC maintains a Path Computation Element Protocol (PCEP) session with the PCE and the path computation is done as follows:

  • the PCC sends a PCReq requesting a path

  • the PCE replies with a PCReply including a path (if available). This path contains a segment list.

  • Optionally, the PCC sends a path status report (PCRpt) to the PCE. However, the PCC may also delegate the control of the path to the PCE.

PCE path computation is supported for SR-TE LSPs, but not for SR-TE LSP templates. You cannot have PCE path computation for SR-TE LSPs that use LSP templates one-hop-p2p-srte or mesh-p2p-srte auto-LSPs. PCE path computation is not further treated in this chapter.

Local CSPF path computation

SR-TE LSP path computation using local CSPF can be used in single-area OSPFv2 or single-level IS-IS IGP instances. More complex LSP path computations, or when the network is expanded into multiple IGP areas or instances, require an external PCE.

One of the major changes to the SR-TE algorithm from RSVP-TE CSPF is that SR-TE does not require each router to be TE enabled: the links do not have to be TE links. Provided that the routers at each end of the link are SR enabled, local CSPF will calculate an end-to-end path.

Full CSPF path computation on the head-end router (PCC) results in a full explicit path to the destination. The PCC calculates an end-to-end path and the following applies:

  • The computed path is a full explicit TE path.

  • Each link is represented by an adjacency SID or adjacency set SID.

  • CSPF returns a label stack list of adjacency SIDs or adjacency set SIDs.

Like RSVP-TE LSPs, an SR-TE LSP can be resignaled when a timer expires or when an operator issues a tools command.

Paths computed by local CSPF contain an adjacency SID for each link in the path and the stack may contain numerous labels. If the max-sr-labels value may be exceeded or the maximum segment depth of a downstream router may be less than the calculated LSP label stack size, the label stack can be reduced. The label reduction capability can replace a series of adjacency SIDs with a node SID. For loose-hop path computation, node SIDs can be used or a combination of node and adjacency SIDs.

Local CSPF is supported on both primary and secondary standby paths of an SR-TE LSP. Local CSPF path calculation can be used for RSVP-TE LSP as well as for SR-TE LSP templates.

Local CSPF path computation and SR protected interfaces

When SR is enabled and IGP adjacency is established over a link, the router advertises an adjacency SID in the adjacency SID sub-TLV. When Loop-Free Alternate (LFA), Remote LFA (RLFA), or Topology-Independent LFA (TI-LFA) is enabled, protected adjacencies have the backup flag (B-flag) set in the adjacency SID sub-TLV. Each adjacency is available for SID protection when LFA, RLFA, or TI-LFA is enabled. It is possible to remove this on a specific link (sid-protection false).

Adjacency sets are specified in an adjacency-set sub-TLV as a single object. Adjacency sets never have the B-flag set and are always unprotected. However, each individual link in the adjacency set is protected. For more information about adjacency sets, see the Parallel Adjacency Sets in Segment Routing chapter.

Local CSPF path calculation can set up a path that:

  • only includes protected adjacencies (local-sr-protection mandatory)

  • only includes unprotected adjacencies (local-sr-protection none)

  • can include both protected and unprotected adjacencies (local-sr-protection preferred (default))

Configuration

Example topology shows the example topology.

Figure 1. Example topology

The initial configuration on each of the nodes includes:

  • Cards, MDAs, ports

  • Router interfaces

  • IS-IS enabled on all router interfaces (alternatively, OSPFv2 can be used as IGP)

    • The interfaces in the core (between P-3, P-4, P-5, P-6, P-7, P-8, P-9, and P-10) have metric 10.

    • The access interfaces to and from PE-1, PE-2, and PE-11 have metric 100.

    • TE is enabled on the head-end routers.

  • MPLS is enabled on the head-end routers.

For an in-depth description of the configuration of SR-ISIS, see the Segment Routing with IS-IS Control Plane chapter. On PE-2, the IS-IS configuration is as follows:

# on PE-2:
configure {
    router "Base" {
        mpls-labels {
            sr-labels {
                start 32000
                end 32999
            }
        }
        isis 0 {
            admin-state enable
            advertise-router-capability area
            traffic-engineering true
            area-address [49.0001]
            segment-routing {
                admin-state enable
                prefix-sid-range {
                    global
                }
            }
            interface "int-PE-2-P-4" {
                interface-type point-to-point
                level 1 {
                    metric 100
                }
                level 2 {
                    metric 100
                }
            }
            interface "int-PE-2-P-6" {
                interface-type point-to-point
                level 1 {
                    metric 100
                }
                level 2 {
                    metric 100
                }
            }
            interface "system" {
                ipv4-node-sid {
                    index 2
                }
            }
            level 1 {
                wide-metrics-only true
            }
            level 2 {
                wide-metrics-only true
            }
        }

With this configuration, the node SID on PE-2 is 32000 + index 2 = 32002. The configuration is similar on the other nodes.

On PE-2, the following SR-TE LSPs are configured toward PE-11:

  • SR-TE LSP with empty path and:

    • hop-to-label path computation

    • local CSPF path computation without label stack reduction

    • local CSPF path computation with label stack reduction

  • SR-TE LSP with path with two strict hops—P-4 and P-3—and:

    • hop-to-label path computation

    • local CSPF path computation without label stack reduction

    • local CSPF path computation with label stack reduction

  • SR-TE LSP with path with two loose hops—P-3 and P-9—and:

    • hop-to-label path computation

    • local CSPF path computation without label stack reduction

    • local CSPF path computation with label stack reduction

SR-TE LSPs using empty path

The configuration of SR-TE LSPs is described in chapter Segment Routing – Traffic Engineered Tunnels chapter. On PE-2, the following SR-TE LSPs toward PE-11 are configured with an empty path. The path computation method is hop-to-label for the first SR-TE LSP and local CSPF for the second SR-TE LSP.

# on PE-2:
configure {
    router "Base" {
        mpls {
            admin-state enable
            path "empty_path" {
                admin-state enable
            }
            lsp "LSP-PE-2-PE-11_empty_path_hop-to-label" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }
            lsp "LSP-PE-2-PE-11_empty_path_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }

With hop-to-label path computation, the destination 192.0.2.11 is an implied loose hop that will be mapped to the node SID 32011 of the destination PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_hop-to-label" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_hop-to-label
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_hop-to-label
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_hop-to-label
Path LSP ID      : 24576                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : none                    OperPathCompMethod: none
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : N/A
LabelStackRed    : Disabled                Oper LabelStackRed: N/A

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

PCE Updt ID      : 0                       PCE Updt State    : None
PCE Upd Fail Code: noError

PCE Report       : Disabled+               Oper PCE Report   : Disabled
PCE Control      : Disabled                Oper PCE Control  : Disabled

Include Groups   :                         Oper IncludeGroups: 
None                                           None
Exclude Groups   :                         Oper ExcludeGroups: 
None                                           None
Last Resignal    : n/a                     

IGP/TE Metric    : 16777215                Oper Metric       : 16777215
Oper MTU         : 8978                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

BFD Configuration and State
Template         : None                    Ping Interval     : N/A
Enable           : False                   State             : notApplicable
WaitForUpTimer   : 4 sec                   OperWaitForUpTimer: 0 sec
WaitForUpTmLeft  : 0                       
StartFail Rsn    : N/A


===============================================================================

With local CSPF path computation, the SR-TE path contains contiguous strict hops with A-SIDs. Several ECMP paths are available and, in this case, the path goes from PE-2 via P-6, P-10, and P-7 to the destination PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_local-cspf
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_local-cspf
Path LSP ID      : 16384                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Disabled                Oper LabelStackRed: Disabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 220                     Oper Metric       : 220
Oper MTU         : 8966                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    192.168.26.2(192.0.2.6)(A-SID)               Record Label        : 524286
 -> 192.168.106.2(192.0.2.10)(A-SID)             Record Label        : 524284
 -> 192.168.107.1(192.0.2.7)(A-SID)              Record Label        : 524284
 -> 192.168.117.2(192.0.2.11)(A-SID)             Record Label        : 524283

---snip---

===============================================================================

The path goes from PE-2 via P-6, P-10, and P-7 to the destination PE-11, as shown in Empty path from PE-2 to PE-11.

Figure 2. Empty path from PE-2 to PE-11

The label stack of Adjacency SIDs (A-SIDs) can be reduced to a smaller number of Node SIDs (N-SIDs), or a combination of N-SIDs and A-SIDs, by enabling label-stack-reduction, as follows:

# on PE-2:
configure {
    router "Base" {
        mpls {
            lsp "LSP-PE-2-PE-11_empty_path_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                label-stack-reduction true
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }

Label stack reduction reduces the label stack to one or more node SIDs in segments, with each segment delimited by configured path hops. The path computed to the node SID must satisfy any required path constraints. In this example, the label stack is reduced to the N-SID of the destination PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_local-cspf
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_local-cspf
Path LSP ID      : 16384                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:02:09             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Enabled                 Oper LabelStackRed: Enabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 220                     Oper Metric       : 220
Oper MTU         : 8978                    Path Trans        : 3
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

---snip---

===============================================================================

SR-TE LSPs using path with strict hops

In the following example, the SR-TE LSP path includes strict hops—that must be contiguous hops from the head-end router—and an implicit loose hop to the destination 192.0.2.11. The SR-TE LSPs on PE-2 are configured as follows:

# on PE-2:
configure {
    router "Base" {
        mpls {
            path "path_via-P-4-P-3_S" {
                admin-state enable
                hop 10 {
                    ip-address 192.0.2.4
                    type strict
                }
                hop 20 {
                    ip-address 192.0.2.3
                    type strict
                }
            }
            lsp "LSP-PE-2-PE-11_strict-hops_hop-to-label" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-4-P-3_S" {
                }
            }
            lsp "LSP-PE-2-PE-11_strict-hops_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-4-P-3_S" {
                }
            }

With hop-to-label path computation, strict hops are translated into adjacency SIDs, whereas loose hops are translated into node SIDs. In this example, the path has an A-SID to P-4 and an A-SID to P-3 followed by an N-SID to the destination PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_strict-hops_hop-to-label" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_strict-hops_hop-to-label
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_strict-hops_hop-to-label
Path  path_via-P-4-P-3_S
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_strict-hops_hop-to-label
Path LSP ID      : 26624                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-4-P-3_S
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : none                    OperPathCompMethod: none
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : N/A
LabelStackRed    : Disabled                Oper LabelStackRed: N/A

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 16777215                Oper Metric       : 16777215
Oper MTU         : 8970                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.4(S)
               -> 192.0.2.3(S)
Actual Hops      :                         
    192.168.24.2(192.0.2.4)(A-SID)               Record Label        : 524287
 -> 192.168.34.1(192.0.2.3)(A-SID)               Record Label        : 524286
 -> 192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

---snip---

===============================================================================

With local CSPF path computation, the path is a sequence of A-SIDs, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_strict-hops_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_strict-hops_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_strict-hops_local-cspf
Path  path_via-P-4-P-3_S
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_strict-hops_local-cspf
Path LSP ID      : 52224                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-4-P-3_S
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Disabled                Oper LabelStackRed: Disabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 220                     Oper Metric       : 220
Oper MTU         : 8966                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.4(S)
               -> 192.0.2.3(S)
Actual Hops      :                         
    192.168.24.2(192.0.2.4)(A-SID)               Record Label        : 524287
 -> 192.168.34.1(192.0.2.3)(A-SID)               Record Label        : 524286
 -> 192.168.37.2(192.0.2.7)(A-SID)               Record Label        : 524284
 -> 192.168.117.2(192.0.2.11)(A-SID)             Record Label        : 524283

---snip---

===============================================================================

The path from PE-2 to PE-11 must go via P-4 and P-3. The loose hop from P-3 to the destination PE-11 is translated into an A-SID to P-7 followed by an A-SID to PE-11, as shown in Path from PE-2 to PE-11 via strict hops P-4 and P-3.

Figure 3. Path from PE-2 to PE-11 via strict hops P-4 and P-3

With label stack reduction, the configuration of the SR-TE LSP is as follows:

# on PE-2:
configure {
    router "Base" {
        mpls {
            lsp "LSP-PE-2-PE-11_strict-hops_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                label-stack-reduction true
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-4-P-3_S" {
                }
            }

Label stack reduction will reduce the label stack to one or more node SIDs in segments, with each segment delimited by configured path hops. The computed path to the node SID must satisfy any required path constraints. The calculated path from PE-2 to PE-11 via the strict hops P-4 and P-3 shows a series of N-SIDs, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_strict-hops_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_strict-hops_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_strict-hops_local-cspf
Path  path_via-P-4-P-3_S
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_strict-hops_local-cspf
Path LSP ID      : 52224                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-4-P-3_S
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:02:09             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Enabled                 Oper LabelStackRed: Enabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 220                     Oper Metric       : 220
Oper MTU         : 8970                    Path Trans        : 3
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.4(S)
               -> 192.0.2.3(S)
Actual Hops      :                         
    192.0.2.4(192.0.2.4)(N-SID)                  Record Label        : 32004
 -> 192.0.2.3(192.0.2.3)(N-SID)                  Record Label        : 32003
 -> 192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

---snip---

===============================================================================

SR-TE LSPs using path with loose hops

The following SR-TE LSPs on PE-2 toward PE-11 use a path with loose hops P-3 and P-9:

# on PE-2:
configure {
    router "Base" {
        mpls {
            path "path_via-P-3-P-9_L" {
                admin-state enable
                hop 10 {
                    ip-address 192.0.2.3
                    type loose
                }
                hop 20 {
                    ip-address 192.0.2.9
                    type loose
                }
            }
            lsp "LSP-PE-2-PE-11_loose-hops_hop-to-label" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-3-P-9_L" {
                }
            }
            lsp "LSP-PE-2-PE-11_loose-hops_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-3-P-9_L" {
                }
            }

With hop-to-label path calculation, loose hops are translated into N-SIDs. In this example, the actual hops are the N-SIDs of P-3, P-9, and PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_loose-hops_hop-to-label" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_loose-hops_hop-to-label
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_loose-hops_hop-to-label
Path  path_via-P-3-P-9_L
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_loose-hops_hop-to-label
Path LSP ID      : 41472                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-3-P-9_L
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : none                    OperPathCompMethod: none
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : N/A
LabelStackRed    : Disabled                Oper LabelStackRed: N/A

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 16777215                Oper Metric       : 16777215
Oper MTU         : 8970                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.3(L)
               -> 192.0.2.9(L)
Actual Hops      :                         
    192.0.2.3(192.0.2.3)(N-SID)                  Record Label        : 32003
 -> 192.0.2.9(192.0.2.9)(N-SID)                  Record Label        : 32009
 -> 192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

---snip---

===============================================================================

With local CSPF path calculation, the actual hops are the A-SIDs toward P-4, P-3, P-7, P-9, and PE-11, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_loose-hops_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_loose-hops_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_loose-hops_local-cspf
Path  path_via-P-3-P-9_L
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_loose-hops_local-cspf
Path LSP ID      : 59392                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-3-P-9_L
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:03:36             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Disabled                Oper LabelStackRed: Disabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 230                     Oper Metric       : 230
Oper MTU         : 8962                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.3(L)
               -> 192.0.2.9(L)
Actual Hops      :                         
    192.168.24.2(192.0.2.4)(A-SID)               Record Label        : 524287
 -> 192.168.34.1(192.0.2.3)(A-SID)               Record Label        : 524286
 -> 192.168.37.2(192.0.2.7)(A-SID)               Record Label        : 524284
 -> 192.168.79.2(192.0.2.9)(A-SID)               Record Label        : 524285
 -> 192.168.119.2(192.0.2.11)(A-SID)             Record Label        : 524283

---snip---

===============================================================================

Path from PE-2 to PE-11 via loose hops P-3 and P-9 shows the path from PE-2 to PE-11 via loose hops P-3 and P-9.

Figure 4. Path from PE-2 to PE-11 via loose hops P-3 and P-9

Label stack reduction is configured as follows:

# on PE-2:
configure {
    router "Base" {
        mpls {
            lsp "LSP-PE-2-PE-11_loose-hops_local-cspf" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                label-stack-reduction true
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "path_via-P-3-P-9_L" {
                }
            }

With label stack reduction, the actual hops in the path are the following:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_loose-hops_local-cspf" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_loose-hops_local-cspf
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_loose-hops_local-cspf
Path  path_via-P-3-P-9_L
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_loose-hops_local-cspf
Path LSP ID      : 59392                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : path_via-P-3-P-9_L
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:02:09             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Enabled                 Oper LabelStackRed: Enabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 230                     Oper Metric       : 230
Oper MTU         : 8970                    Path Trans        : 3
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
                  192.0.2.3(L)
               -> 192.0.2.9(L)
Actual Hops      :                         
    192.0.2.3(192.0.2.3)(N-SID)                  Record Label        : 32003
 -> 192.0.2.9(192.0.2.9)(N-SID)                  Record Label        : 32009
 -> 192.0.2.11(192.0.2.11)(N-SID)                Record Label        : 32011

---snip---

===============================================================================

Tunnel tables

The following command on PE-2 lists the SR-TE tunnels. By default, SR-TE tunnels have preference 8. The first three SR-TE LSP tunnels used local CSPF path computation without label stack reduction, while the latter three used hop-to-label path computation. For all SR-TE LSPs with next-hop 192.0.168.24.2, the first hop is mapped to an adjacency SID. All paths computed with local CSPF without label stack reduction only have adjacency SIDs or adjacency set SIDs. For hop-to-label path computation, only the strict hops are translated into adjacency SIDs.

[/]
A:admin@PE-2# show router tunnel-table protocol sr-te

===============================================================================
IPv4 Tunnel Table (Router: Base)
===============================================================================
Destination           Owner     Encap TunnelId  Pref   Nexthop        Metric
   Color                                                              
-------------------------------------------------------------------------------
192.0.2.11/32         sr-te     MPLS  655363    8      192.168.26.2   220
192.0.2.11/32         sr-te     MPLS  655367    8      192.168.24.2   220
192.0.2.11/32         sr-te     MPLS  655365    8      192.168.24.2   230
192.0.2.11/32         sr-te     MPLS  655362    8      192.0.2.11     16777215
192.0.2.11/32         sr-te     MPLS  655364    8      192.0.2.3      16777215
192.0.2.11/32         sr-te     MPLS  655366    8      192.168.24.2   16777215
-------------------------------------------------------------------------------
Flags: B = BGP or MPLS backup hop available
       L = Loop-Free Alternate (LFA) hop available
       E = Inactive best-external BGP route
       k = RIB-API or Forwarding Policy backup hop
===============================================================================

For the hop-to-label computed paths, the value of the metric is set to 16777215 (infinity – 1), because CSPF is not used and the head-end router is unaware of the full topology between head- and tail-end router. For the paths computed with local CSPF, the IGP metrics are added; for example, for the first tunnel: 100 (PE-2 to P-6) + 10 (P-6 to P-10) + 10 (P-10 to P-7) + 100 (P-7 to PE-11) = 220.

When label stack reduction is configured, the next hops may be slightly different when the first hop—after label stack reduction—is mapped to a node SID, as follows:

[/]
A:admin@PE-2# show router tunnel-table protocol sr-te

===============================================================================
IPv4 Tunnel Table (Router: Base)
===============================================================================
Destination           Owner     Encap TunnelId  Pref   Nexthop        Metric
   Color                                                              
-------------------------------------------------------------------------------
192.0.2.11/32         sr-te     MPLS  655363    8      192.0.2.11     220
192.0.2.11/32         sr-te     MPLS  655367    8      192.0.2.4      220
192.0.2.11/32         sr-te     MPLS  655365    8      192.0.2.3      230
192.0.2.11/32         sr-te     MPLS  655362    8      192.0.2.11     16777215
192.0.2.11/32         sr-te     MPLS  655364    8      192.0.2.3      16777215
192.0.2.11/32         sr-te     MPLS  655366    8      192.168.24.2   16777215
-------------------------------------------------------------------------------
Flags: B = BGP or MPLS backup hop available
       L = Loop-Free Alternate (LFA) hop available
       E = Inactive best-external BGP route
       k = RIB-API or Forwarding Policy backup hop
===============================================================================

The following command on PE-2 shows the FP tunnel table for SR-TE LSP tunnels without label stack reduction. The first three SR-TE LSP tunnels (with tunnel IDs 655362, 655363, and 655364) have hop-to-label path computation and the latter three have local CSPF path computation. For hop-to-label path computation, A-SIDs are used for strict hops and N-SIDs are used for loose hops. For local CSPF path computation without label stack reduction, only A-SIDs and adjacency set SIDs are used.

[/]
A:admin@PE-2# show router fp-tunnel-table 1

===============================================================================
IPv4 Tunnel Table Display

Legend: 
label stack is ordered from bottom-most to top-most
B - FRR Backup
===============================================================================
Destination                                  Protocol            Tunnel-ID
  Lbl                                                             
    NextHop                                                      Intf/Tunnel
  Lbl     (backup)                                               
    NextHop   (backup)                                           
-------------------------------------------------------------------------------
192.0.2.1/32                                 SR-ISIS-0            524290
  32001
    192.168.24.2                                                  1/1/1:1000
192.0.2.3/32                                 SR-ISIS-0            524291
  32003
    192.168.24.2                                                  1/1/1:1000
192.0.2.4/32                                 SR-ISIS-0            524292
  32004
    192.168.24.2                                                  1/1/1:1000
192.0.2.5/32                                 SR-ISIS-0            524293
  32005
    192.168.26.2                                                  1/1/2:1000
192.0.2.6/32                                 SR-ISIS-0            524295
  32006
    192.168.26.2                                                  1/1/2:1000
192.0.2.7/32                                 SR-ISIS-0            524296
  32007
    192.168.24.2                                                  1/1/1:1000
192.0.2.8/32                                 SR-ISIS-0            524297
  32008
    192.168.24.2                                                  1/1/1:1000
192.0.2.9/32                                 SR-ISIS-0            524298
  32009
    192.168.24.2                                                  1/1/1:1000
192.0.2.10/32                                SR-ISIS-0            524299
  32010
    192.168.26.2                                                  1/1/2:1000
192.0.2.11/32                                SR-ISIS-0            524300
  32011
    192.168.24.2                                                  1/1/1:1000
192.0.2.11/32                                SR-TE                655362
  3
    192.0.2.11                                                    SR
192.0.2.11/32                                SR-TE                655363
  524283/524284/524284
    192.168.26.2                                                  SR
192.0.2.11/32                                SR-TE                655364
  32011/32009
    192.0.2.3                                                     SR
192.0.2.11/32                                SR-TE                655365
  524283/524285/524284/524286
    192.168.24.2                                                  SR
192.0.2.11/32                                SR-TE                655366
  32011/524286
    192.168.24.2                                                  SR
192.0.2.11/32                                SR-TE                655367
  524283/524284/524286
    192.168.24.2                                                  SR
192.0.2.12/32                                SR-ISIS-0            524301
  32012
    192.168.24.2                                                  1/1/1:1000
192.168.24.2/32                              SR                   524289
  3
    192.168.24.2                                                  1/1/1:1000
192.168.26.2/32                              SR                   524294
  3
    192.168.26.2                                                  1/1/2:1000
-------------------------------------------------------------------------------
Total Entries : 19
-------------------------------------------------------------------------------
===============================================================================

The following command on PE-2 shows only the FP tunnel table for local CSPF path computed SR-TE LSP tunnels with label stack reduction, where N-SIDs replace sequences of A-SIDs.

[/]

A:admin@PE-2# show router fp-tunnel-table 1

===============================================================================
IPv4 Tunnel Table Display

Legend: 
label stack is ordered from bottom-most to top-most
B - FRR Backup
===============================================================================
Destination                                  Protocol            Tunnel-ID
  Lbl                                                             
    NextHop                                                      Intf/Tunnel
  Lbl     (backup)                                               
    NextHop   (backup)                                           
-------------------------------------------------------------------------------
---snip---
192.0.2.11/32                                SR-ISIS-0            524300
  32011
    192.168.24.2                                                  1/1/1:1000
192.0.2.11/32                                SR-TE                655362
  3
    192.0.2.11                                                    SR
192.0.2.11/32                                SR-TE                655363
  3
    192.0.2.11                                                    SR
192.0.2.11/32                                SR-TE                655364
  32011/32009
    192.0.2.3                                                     SR
192.0.2.11/32                                SR-TE                655365
  32011/32009
    192.0.2.3                                                     SR
192.0.2.11/32                                SR-TE                655366
  32011/524286
    192.168.24.2                                                  SR
192.0.2.11/32                                SR-TE                655367
  32011/32003
    192.0.2.4                                                     SR
---snip---
-------------------------------------------------------------------------------
Total Entries : 19
-------------------------------------------------------------------------------
===============================================================================

Resignaling an SR-TE LSP

Point-to-point SR-TE LSPs have a resignal timer to match that of RSVP. It must be set to allow manual and automatic resignaling for optimization of SR-TE LSPs. The following command can be used to set a resignal timer in minutes for all originating SR-TE LSPs:

[ex:/configure router "Base" mpls sr-te-resignal]
A:admin@PE-2# resignal-timer ?
 
 resignal-timer <number>
 <number>  - <30..10080>  - minutes
 
    Resignal timer for SR-TE LSPs

The following tools command can be launched for manually-triggered re-optimization of LSPs:

[/]
A:admin@PE-2# tools perform router mpls resignal 
 
 resignal p2mp-lsp <string> p2mp-instance <string>
 resignal p2mp-delay <number>
 resignal lsp <string> path <string>
 resignal delay <number>
 resignal sr-te-lsp <string> path <string>
 resignal sr-te-delay <number>
 
 delay                 - <number> - <0..30>
 lsp                   - string '<1..64 characters>'
 p2mp-delay            - <number> - <0..60>
 p2mp-instance         - [Max 32 chars]
 p2mp-lsp              - string '<1..64 characters>'
 path                  - string '<0..255 characters>'
 sr-te-delay           - <number> - <0..30>
 sr-te-lsp             - string '<1..64 characters>'

A manual re-optimization for a specific path in a specific SR-TE LSP can be forced, as follows:

[/]
A:admin@PE-2# tools perform router mpls resignal sr-te-lsp "LSP-PE-2-PE-11_loose-hops_local-cspf" path "path_via-P-3-P-9_L"

The sr-te-delay parameter overrides the global resignal timer value for all SR-TE LSPs. When this timer expires, the procedures of the timer-based resignal are applied to all SR-TE LSPs and the SR-TE resignal time is then reset to its configured value in the MPLS configuration.

The following command forces a re-optimization of the SR-TE LSPs after an sr-te-delay of 3 minutes, but this CLI delay will only be in effect when the sr-te-resignal-timer is configured in the mpls context. If not, the following error is raised:

[/]
A:admin@PE-2# tools perform router mpls resignal sr-te-delay 3
WARNING: CLI #2006: Warning while processing command - WARNING: CLI Delay will not be in effect, configure resignal-timer under config>router>mpls>sr-te-resignal.

The SR-TE resignal timer is configured in the mpls context with a value of 60 minutes, as follows:

# on PE-2:
configure {
    router "Base" {
        mpls {
            sr-te-resignal {
                resignal-timer 60
            }

With the SR-TE resignal timer configured, the tools command can be launched to override this SR-TE resignal timer to a value of 3 minutes, as follows:

[/]
A:admin@PE-2# tools perform router mpls resignal sr-te-delay 3

Local CSPF and SR protected adjacencies

The following command enables TI-LFA with link protection on all nodes:

# on all nodes:
configure {
    router "Base" {
        isis 0 {
            loopfree-alternate {
                ti-lfa {
                }
            }

As a result of this, each adjacency is available for SID protection. For example, on P-4, all adjacency SID sub-TLVs have the B-flag set, as follows:

[/]
A:admin@P-4# show router isis database P-4 detail level 2 | match "Adj-SID" pre-lines 1
    Nbr IP    : 192.168.24.1
    Adj-SID: Flags:v4BVL Weight:0 Label:524287
    Nbr IP    : 192.168.34.1
    Adj-SID: Flags:v4BVL Weight:0 Label:524286
    Nbr IP    : 192.168.46.2
    Adj-SID: Flags:v4BVL Weight:0 Label:524285
    Nbr IP    : 192.168.48.2
    Adj-SID: Flags:v4BVL Weight:0 Label:524284
                   E = Entropy Label Capability (ELC) Flag
Adj-SID Flags    : v4/v6 = IPv4 or IPv6 Address-Family
                   B = Backup Flag
                   V = Adj-SID carries a value

The following command removes SID protection from the interface toward P-8:

# on P-4:
configure {
    router "Base" {
        isis 0 {
            interface "int-P-4-P-8" {
                sid-protection false
            }

The adjacency SID sub-TLV for this link does not have the B-flag set, as follows:

[/]
A:admin@P-4# show router isis database P-4 detail level 2 

===============================================================================
Rtr Base ISIS Instance 0 Database (detail)
===============================================================================

Displaying Level 2 database
-------------------------------------------------------------------------------
LSP ID    : P-4.00-00                                   Level     : L2 
Sequence  : 0x19                   Checksum  : 0x559a   Lifetime  : 1188
Version   : 1                      Pkt Type  : 20       Pkt Ver   : 1
Attributes: L1L2                   Max Area  : 3        Alloc Len : 1492
SYS ID    : 1920.0000.2004         SysID Len : 6        Used Len  : 645

TLVs : 
  Area Addresses:
    Area Address : (3) 49.0001
  Supp Protocols:
    Protocols     : IPv4
  IS-Hostname   : P-4
  Router ID   :
    Router ID   : 192.0.2.4
  Router Cap : 192.0.2.4, D:0, S:0
    TE Node Cap : B E M  P
    SR Cap: IPv4 MPLS-IPv6
       SRGB Base:32000, Range:1000
    SR Alg: metric based SPF
    Node MSD Cap: BMI : 12 ERLD : 15
  I/F Addresses :
    I/F Address   : 192.168.46.1
    I/F Address   : 192.168.48.1
    I/F Address   : 192.168.24.2
    I/F Address   : 192.168.34.2
    I/F Address   : 192.0.2.4
---snip---
  TE IS Nbrs   :
    Nbr   : P-8.00                              
    Default Metric  : 10
    Sub TLV Len     : 19
    IF Addr   : 192.168.48.1
    Nbr IP    : 192.168.48.2
    Adj-SID: Flags:v4VL Weight:0 Label:524284
  ---snip---

Level (2) LSP Count : 1
-------------------------------------------------------------------------------
---snip---
Adj-SID Flags    : v4/v6 = IPv4 or IPv6 Address-Family
                   B = Backup Flag
                   V = Adj-SID carries a value
                   L = value/index has local significance
                   S = Set of Adjacencies
                   P = Persistently allocated
---snip---
===============================================================================

Local CSPF will, by default, compute an end-to-end path by selecting protected adjacencies, which have the B-flag set, as previously described. If no such path is available, the local CSPF may select an unprotected adjacency with the assumption that all other path constraints are met.

The following tools command calculates the path from P-4 to P-8 without establishing it. With the preferred option, protected adjacencies are preferred over unprotected adjacency when both exist for a TE link. In this example, the shortest path contains the direct link to P-8, which does not have a backup:

[/]
A:admin@P-4# tools perform router mpls sr-te-cspf to 192.0.2.8 path-computation-method local-cspf local-sr-protection preferred
Req CSPF TE path
    From: this node To: 192.0.2.8
CSPF TE Path
 To: 192.0.2.8 
 [1] Source Add 192.0.2.4    Cost 10
   Hop  1 -> Label 524284 NH 192.168.48.1 --> 192.168.48.2 (192.0.2.8) Cost 10 Color 0x0

The following tools command calculates the path from P-4 to P-8 with the restriction that each link in the path is unprotected. The shortest path is the unprotected link to P-8:

[/]
A:admin@P-4# tools perform router mpls sr-te-cspf to 192.0.2.8 path-computation-method local-cspf local-sr-protection none
Req CSPF TE path
    From: this node To: 192.0.2.8
CSPF TE Path
 To: 192.0.2.8 
 [1] Source Add 192.0.2.4    Cost 10
   Hop  1 -> Label 524284 NH 192.168.48.1 --> 192.168.48.2 (192.0.2.8) Cost 10 Color 0x0

The following tools command calculates the path from P-4 to P-8 but all adjacencies must be protected, so the unprotected direct link to P-8 is excluded and the path goes via P-6 and P-10 to P-8:

[/]
A:admin@P-4# tools perform router mpls sr-te-cspf to 192.0.2.8 path-computation-method local-cspf local-sr-protection mandatory
Req CSPF TE path
    From: this node To: 192.0.2.8
CSPF TE Path
 To: 192.0.2.8 
 [1] Source Add 192.0.2.4    Cost 30
   Hop  1 -> Label 524285 NH 192.168.46.1 --> 192.168.46.2 (192.0.2.6) Cost 10 Color 0x0
   Hop  2 -> Label 524284 NH 192.168.106.1 --> 192.168.106.2 (192.0.2.10) Cost 10 Color 0x0
   Hop  3 -> Label 524287 NH 192.168.108.2 --> 192.168.108.1 (192.0.2.8) Cost 10 Color 0x0

On PE-2, the following SR-TE LSPs with local CSPF path computation using a loose path are configured toward PE-11:

  • an SR-TE LSP with local SR protection preferred (= default setting)

  • an SR-TE LSP with mandatory local SR protection, where all adjacencies must have a backup

  • an SR-TE LSP without local SR protection (none), where all adjacencies are unprotected

# on PE-2:
configure {
    router "Base" {
        mpls {
            lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                local-sr-protection preferred       # default
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }
            lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                local-sr-protection mandatory     # all links in E2E path protected
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }
            lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-none" {
                admin-state enable
                type p2p-sr-te
                to 192.0.2.11
                path-computation-method local-cspf
                local-sr-protection none        # all links in E2E path unprotected
                max-sr-labels {
                    additional-frr-labels 2
                }
                primary "empty_path" {
                }
            }

For test purposes, the metric on the unprotected interface between P-4 and P-8 is lowered to 5, so the shortest path to PE-11 will include the unprotected interface when allowed:

# on P-4:
configure {
     router "Base" {
        isis 0 {
            interface "int-P-4-P-8" {
                interface-type point-to-point
                sid-protection false
                level 1 {
                    metric 5
                }
                level 2 {
                    metric 5
                }
            }

For SR-TE LSP "LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred", a path can be established from PE-2 via P-4, P-8, and P-7 to PE-11, but for the same metric, P-7 can be replaced by P-9. The direct link between P-4 and P-8 is unprotected, while all other adjacencies in the path have a backup.

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_local-cspf_protection-preferred
Path LSP ID      : 37888                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:02:21             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : preferred               Oper LocalSrProt  : preferred
LabelStackRed    : Disabled                Oper LabelStackRed: Disabled

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 215                     Oper Metric       : 215
Oper MTU         : 8958                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    192.168.24.2(192.0.2.4)(A-SID)               Record Label        : 524287
 -> 192.168.48.2(192.0.2.8)(A-SID)               Record Label        : 524284
 -> 192.168.78.1(192.0.2.7)(A-SID)               Record Label        : 524287
 -> 192.168.117.2(192.0.2.11)(A-SID)             Record Label        : 524283

---snip---

===============================================================================

Loose path from PE-2 to PE-11 including unprotected link shows the established path from PE-2 to PE-11, which uses protected and unprotected links.

Figure 5. Loose path from PE-2 to PE-11 including unprotected link

For SR-TE LSP "LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory", the path must exclude the unprotected link from P-4 to P-8. The path goes from PE-2 via P-6, P-10, and P-9 to PE-11, but for the same metric, other paths are possible.

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_local-cspf_protection-mandatory
Path LSP ID      : 4096                    
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Up
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Up
Path Up Time     : 0d 00:02:21             Path Down Time    : 0d 00:00:00
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 0                       Next Retry In     : 0 sec

PathCompMethod   : local-cspf              OperPathCompMethod: local-cspf
MetricType       : igp                     Oper MetricType   : igp
LocalSrProt      : mandatory               Oper LocalSrProt  : mandatory
LabelStackRed    : Disabled                Oper LabelStackRed: N/A

Bandwidth        : No Reservation          Oper Bandwidth    : 0 Mbps
Hop Limit        : 255                     Oper HopLimit     : 255
Setup Priority   : 7                       Oper SetupPriority: 7
Hold Priority    : 0                       Oper HoldPriority : 0
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : 220                     Oper Metric       : 220
Oper MTU         : 8958                    Path Trans        : 1
Failure Code     : noError
Failure Node     : n/a
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    192.168.26.2(192.0.2.6)(A-SID)               Record Label        : 524286
 -> 192.168.106.2(192.0.2.10)(A-SID)             Record Label        : 524284
 -> 192.168.109.1(192.0.2.9)(A-SID)              Record Label        : 524285
 -> 192.168.119.2(192.0.2.11)(A-SID)             Record Label        : 524283

---snip---

===============================================================================

Loose path from PE-2 to PE-11 including only protected links shows the loose path that excludes the unprotected link between P-4 and P-8.

Figure 6. Loose path from PE-2 to PE-11 including only protected links

For SR-TE LSP "LSP-PE-2-PE-11_empty_path_local-cspf_protection-none", the path should only use unprotected links, but only the adjacency between P-4 and P-8 is unprotected, so CSPF cannot find an end-to-end path. The path and the LSP remain operationally down with failure code noCspfRouteToDestination, as follows:

[/]
A:admin@PE-2# show router mpls sr-te-lsp "LSP-PE-2-PE-11_empty_path_local-cspf_protection-none" path detail

===============================================================================
MPLS SR-TE LSP LSP-PE-2-PE-11_empty_path_local-cspf_protection-none
Path  (Detail)
===============================================================================
Legend : 
    S      - Strict                      L      - Loose
    A-SID  - Adjacency SID               N-SID  - Node SID 
    +      - Inherited 
===============================================================================
-------------------------------------------------------------------------------
LSP SR-TE LSP-PE-2-PE-11_empty_path_local-cspf_protection-none
Path  empty_path
-------------------------------------------------------------------------------
LSP Name    : LSP-PE-2-PE-11_empty_path_local-cspf_protection-none
Path LSP ID      : 50176                   
From             : 192.0.2.2               
To               : 192.0.2.11              
Admin State      : Up                      Oper State        : Down
Path Name   : empty_path
Path Type        : Primary                 
Path Admin       : Up                      Path Oper         : Down
Path Up Time     : 0d 00:00:00             Path Down Time    : 0d 00:02:21
Retry Limit      : 0                       Retry Timer       : 30 sec
Retry Attempt    : 5                       Next Retry In     : 19 sec

PathCompMethod   : local-cspf              OperPathCompMethod: N/A
MetricType       : igp                     Oper MetricType   : N/A
LocalSrProt      : none                    Oper LocalSrProt  : N/A
LabelStackRed    : Disabled                Oper LabelStackRed: N/A

Bandwidth        : No Reservation          Oper Bandwidth    : N/A
Hop Limit        : 255                     Oper HopLimit     : N/A
Setup Priority   : 7                       Oper SetupPriority: N/A
Hold Priority    : 0                       Oper HoldPriority : N/A
Inter-area       : N/A                     

---snip---                     

IGP/TE Metric    : N/A                     Oper Metric       : N/A
Oper MTU         : N/A                     Path Trans        : 0
Failure Code     : noCspfRouteToDestination
Failure Node     : 192.0.2.2
Explicit Hops    :                         
    No Hops Specified
Actual Hops      :                         
    No Hops Specified

---snip---

===============================================================================

Conclusion

Within a single-level IS-IS network or a single-area OSPF network, SR-TE LSP path calculation using local CSPF on the head-end router results in an end-to-end path using IPv4 adjacencies. The local CSPF path computation method can also be used for RSVP-TE LSPs.