Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Dynamic Paths

Want to summarize with AI?

Log in

Explains how headends compute and recompute dynamic SRv6-TE paths using hop-count, IGP, TE, or delay objectives together with affinity, disjointness, and protection constraints.


A dynamic path is a type of SRv6-TE path that

  • is based on an optimization objective and a set of constraints

  • is computed by the head-end to generate a SID-list, and

  • automatically recomputes when the network topology changes.

Optimization objectives for dynamic path computation

An optimization objective defines the primary goal for computing a dynamic path. This objective guides the path computation process to find the most suitable path based on criteria such as minimizing latency, maximizing bandwidth, or finding the shortest path.

Optimization objectives allow the head-end router to compute a uSID-list that expresses the shortest dynamic path according to the selected metric type:

  • Hopcount: Computes the path with the least number of hops.

  • IGP metric: Computes the path based on the Interior Gateway Protocol (IGP) metric. For more information, refer to the Implementing IS-IS and Implementing OSPF chapters in the Routing Configuration Guide for Cisco 8000 Series Routers

  • TE metric: Computes the path based on the Traffic Engineering (TE) metric. See the section for information about configuring TE metrics. See the Configure Interface TE Metrics task.

  • Delay (latency): Computes the path based on link latency. See the chapter for information about measuring delay for links or SRv6 policies.

See How Optimization Objectives Determine Dynamic Paths.

Constraints for dynamic path computation

Constraints are rules or conditions applied during the path computation process that restrict the possible routes a dynamic path can take. These allow the head-end router to compute a path that adheres to specific network policies or requirements.

  • Affinity: You can apply a color or name to links or interfaces by assigning affinity bit-maps to them. You can then specify an affinity (or relationship) between an SRv6 policy path and link colors. SRv6-TE computes a path that includes or excludes links that have specific colors or combinations of colors. For more information, see the Named Interface Link Admin Groups and SRv6-TE Affinity Maps section.

    Note

    When performing path computation on a PCE, configuring both affinity and disjoint-path constraints simultaneously is not supported.

  • Disjoint: SRv6-TE computes a path that is disjoint from another path in the same disjoint-group. Disjoint paths do not share network resources. Path disjointness may be required for paths between the same pair of nodes, between different pairs of nodes, or a combination (only same head-end or only same end-point).

  • Segment Protection-Type Behavior: You can control whether protected or unprotected segments are used when encoding the SID-list of an SRv6 policy candidate path. The types of segments that could be used when building a SID-list include uSIDs and adjacency SIDs (uA SID). For details and usage guidelines, see the Segment Protection-Type Constraint section.


Guidelines of SRv6 policy with dynamic path

  • An SRv6-TE policy combines a dynamic path with specific optimization objectives and constraints.

  • If you do not specify a customized per-policy locator and Binding SID (BSID) behavior, the policy uses the global locator and BSID behavior. Similarly, if you do not specify a customized per-policy source address, the policy uses the local IPv6 source address.

  • Disjoint-path and affinity constraints are mutually exclusive and cannot be configured simultaneously.


Configure SRv6 policy with dynamic path

Use this procedure to configure an SRv6-TE policy that uses a dynamic path, including optimization objectives and affinity constraints.

Procedure

  1. Configure an SRv6-TE policy that uses a dynamic path.

    Example:

    This example shows a configuration of an SRv6 policy at an SRv6-TE head-end router using the global locator and source address. The policy has a dynamic path with optimization objectives and affinity constraints computed by the SR-PCE.

    Node1(config)# segment-routing
    Node1(config-sr)# traffic-eng
    Node1(config-sr-te)# srv6
    
    /* Specify customized locator and source address */
    Node1(config-sr-te-srv6)# locator Node1 binding-sid dynamic behavior ub6-encaps-reduced
    Node1(config-sr-te-srv6)# exit
    Node1(config-sr-te)# candidate-paths
    Node1(config-sr-te-candidate-path)# all
    
    /* Specify the customized IPv6 source address for candidate paths */
    Node1(config-sr-te-candidate-path-type)# source-address ipv6 cafe:0:1::1
    Node1(config-sr-te-candidate-path-type)# exit
    Node1(config-sr-te-candidate-path)# exit
    
    /* Create the SRv6-TE policy */
    Node1(config-sr-te)# policy pol_node1_node4_te
    Node1(config-sr-te-policy)# color 20 end-point ipv6 cafe:0:4::4
    
    /* Enable dynamic path computed by the SR-PCE */
    Node1(config-sr-te-policy)# candidate-paths
    Node1(config-sr-te-policy-path)# preference 100
    Node1(config-sr-te-policy-path-pref)# dynamic
    Node1(config-sr-te-pp-info)# pcep
    Node1(config-sr-te-path-pcep)# exit
    
    /* Configure dynamic Path optimization objectives */
    Node1(config-sr-te-pp-info)# metric type te
    Node1(config-sr-te-pp-info)# exit
    
    /* Configure dynamic path constraints*/
    Node1(config-sr-te-policy-path-pref)# constraints
    Node1(config-sr-te-path-pref-const)# affinity
    Node1(config-sr-te-path-pref-const-aff)# exclude-any
    Node1(config-sr-te-path-pref-const-aff-rule)# name brown
    
    

    The following example shows a configuration of a manual SRv6 policy at an SRv6-TE head-end router with customized locator and source address. The policy has a dynamic path with optimization objectives and affinity constraints computed by the SR-PCE.

    Node1(config)# segment-routing
    Node1(config-sr)# traffic-eng
    Node1(config-sr-te)# policy pol_node1_node4_te
    Node1(config-sr-te-policy)# source-address ipv6 cafe:0:1::1
    Node1(config-sr-te-policy)# srv6
    Node1(config-sr-te-policy-srv6)# locator Node1 binding-sid dynamic behavior ub6-encaps-reduced
    Node1(config-sr-te-policy-srv6)# exit
    Node1(config-sr-te-policy)# color 20 end-point ipv6 cafe:0:4::4
    Node1(config-sr-te-policy)# candidate-paths
    Node1(config-sr-te-policy-path)# preference 100
    Node1(config-sr-te-policy-path-pref)# dynamic
    Node1(config-sr-te-pp-info)# pcep
    Node1(config-sr-te-path-pcep)# exit
    Node1(config-sr-te-pp-info)# metric type te
    Node1(config-sr-te-pp-info)# exit
    Node1(config-sr-te-policy-path-pref)# constraints
    Node1(config-sr-te-path-pref-const)# affinity
    Node1(config-sr-te-path-pref-const-aff)# exclude-any
    Node1(config-sr-te-path-pref-const-aff-rule)# name brown
    
    
  2. View the running configuration of SRv6 policy with dynamic path.

    Example:

    The following example shows a configuration of an SRv6 policy at an SRv6-TE head-end router using the global locator and source address. The policy has a dynamic path with optimization objectives and affinity constraints computed by the SR-PCE.

    segment-routing
     traffic-eng
      srv6
       locator Node1 binding-sid dynamic behavior ub6-encaps-reduced
      !
      candidate-paths
       all
        source-address ipv6 cafe:0:1::1
       !
      !
      policy pol_node1_node4_te
       color 20 end-point ipv6 cafe:0:4::4
       candidate-paths
        preference 100
         dynamic
          pcep
          !
          metric
           type te
          !
         !
         constraints
          affinity
           exclude-any
            name brown
           !
          !
         !
        !
       !
      !
     !
    !
    

    This example shows a configuration of a manual SRv6 policy at an SRv6-TE head-end router with customized locator and source address. The policy has a dynamic path with optimization objectives and affinity constraints computed by the SR-PCE.

    segment-routing
     traffic-eng
      policy pol_node1_node4_te
       srv6
        locator Node1 binding-sid dynamic behavior ub6-encaps-reduced
       !
       source-address ipv6 cafe:0:1::1
       color 20 end-point ipv6 cafe:0:4::4
       candidate-paths
        preference 100
         dynamic
          pcep
          !
          metric
           type te
          !
         !
         constraints
          affinity
           exclude-any
            name brown
           !
          !
         !
        !
       !
      !
     !
    !
    
    
  3. Verify the SRv6 policy with dynamic path.

    Example:

    Node1# show segment-routing traffic-eng policy color 20
    
    SR-TE policy database
    ---------------------
    Color: 20, End-point: cafe:0:4::4
      Name: srte_c_20_ep_cafe:0:4::4
      Status:
        Admin: up  Operational: down for 00:00:09 (since Nov  5 20:10:26.158)
      Candidate-paths:
        Preference: 100 (configuration)
          Name: pol_node1_node4_te
          Requested BSID: dynamic
          PCC info:
            Symbolic name: cfg_pol_node1_node4_te_discr_100
            PLSP-ID: 1
            Protection Type: unprotected-preferred
            Maximum SID Depth: 13
          Dynamic (pce cafe:0:2::2) (valid)
            Metric Type: NONE,   Path Accumulated Metric: 0
          SRv6 Information:
            Locator: Node1
            Binding SID requested: Dynamic
            Binding SID behavior: End.B6.encaps.Red 
      Attributes:
        Forward Class: 0
        Steering labeled-services disabled: no
        Steering BGP disabled: no
        IPv6 caps enable: yes
        Invalidation drop enabled: no
    
    

Configure interface TE metrics

Use this procedure to assign a Traffic Engineering (TE) metric to specific interfaces, which influences dynamic path computation in SRv6-TE policies.

Procedure

  1. Use the metric value command to configure the TE metric for the interface.

    The value range is from 0 to 2147483647.

    Example:

    Router# configure
    Router(config)# segment-routing
    Router(config-sr)# traffic-eng
    Router(config-sr-te)# interface type interface-path-id
    Router(config-sr-te-if)# metric 100
    
  2. Verify the configured TE metrics for the interfaces.

    Example:

    segment-routing
     traffic-eng
      interface TenGigE0/0/0/0
       metric 100
      !
      interface TenGigE0/0/0/1
       metric 1000
      !
      interface TenGigE0/0/2/0
       metric 50
      !
     !
    end