Segment routing policy path selection and tie-breaking

About this task

Segment Routing policies (static and BGP) for which the local router is head-end are processed by the local segment routing database. For each (color, endpoint) combination, the database must validate each candidate path and choose one to be the active path. The steps of this process are described in the Segment Routing policy validation and selection process.

Procedure

  1. Is the path missing a binding SID in the form of an MPLS label?
    • Yes: this path is invalid and cannot be used.
    • No: go to the next step.
  2. Does the path have any segment-list containing a segment type not equal to 1 (an MPLS label)?
    • Yes: this path is invalid and cannot be used.
    • No: go to the next step.
  3. Are all segment-lists of the path invalid?
    A segment-list is invalid if it is empty, if the first SID cannot be resolved to a set of one or more next-hops, or if the weight is 0.
    • Yes: this path is invalid and cannot be used.
    • No: go to the next step.
    At this step the router attempts to resolve the first segment of each segment-list to a set of one or more next-hops and outgoing labels. It does so by looking for a matching SID in the segment routing module, which must correspond to one of the following:
    • SR-ISIS or SR-OSPF node SID
    • SR-IS or SR-OSPF adjacency SID
    • SR-IS or SR-OSPF adjacency-set SID (parallel or non-parallel set)
    Note: The label value in the first segment of the segment-list is matched against ILM label values that the local router has assigned to node-SIDs, adjacency-SIDs, and adjacency-set SIDs. The matched ILM entry may not program a swap to the same label value encoded in the segment routing policy - for example, in the case of an adjacency SID, or a node-SID reachable through a next hop using a different SRGB base.
  4. Is the binding-SID an available label in the reserved-label-block range?
    • Yes: go to the next step.
    • No: this path is invalid and cannot be used.
  5. Is there another path that has reached this step that has a higher preference value?
    • Yes: this path loses the tie-break and cannot be used.
    • No: go to the next step.
  6. Is there a static path?
    • Yes: select the static path as the active path because the protocol-origin value associated with static paths (30) is higher than the protocol-origin value associated with BGP learned paths (20).
    • No: go to the next step.
  7. Is there a BGP path with a lower originator value?
    The originator is a 160-bit numerical value formed by the concatenation of a 32-bit ASN and a 128-bit peer address (with IPv4 addresses encoded in the lowest 32 bits.)
    • Yes: this path loses the tie-break and cannot be used.
  8. Is there another BGP path with a higher distinguisher value?
    • Yes: select the BGP path with the highest distinguisher value.