← Interview Prep

SR-TE — Theory

Segment Routing Traffic Engineering: steering traffic along an engineered path expressed as a segment list, with no per-flow state in the core.

SR-TE is traffic engineering built on Segment Routing. Instead of signalling a path hop-by-hop and holding per-LSP state on every router (RSVP-TE), the headend encodes the entire engineered path as an ordered segment list pushed onto the packet. The core just forwards on the top segment — it holds no per-path state. This is the single idea every SR-TE question circles back to, so anchor on it:

In SR-TE the state lives in the packet header (the segment/label stack imposed by the headend), not in the network. Transit routers forward by segment and have no knowledge of the end-to-end policy. That is what makes SR-TE scale and what makes it fundamentally different from RSVP-TE.

This page assumes you already know SR fundamentals — Prefix-SID, Adjacency-SID, the MPLS vs SRv6 dataplanes, and how the IGP floods SIDs. If not, start with Segment Routing — Theory.

The core idea: a path as a segment list

An engineered path is expressed as a stack of segments the headend imposes. Each segment is either a node/prefix segment (go to router X via IGP shortest path — ECMP-friendly) or an adjacency segment (traverse this exact link — pins a hop). Mixing the two lets you say "shortest path to the far side of the network, but cross this specific link on the way."

Engineer traffic from R1 to R6 via the "north" link R3-R4, avoiding R5

   R1 ── R2 ── R3 ═══ R4 ── R6      Segment list pushed at R1 (headend):
    │           ║  (north)   │        ┌─────────────┐
    │           ║            │        │  16003  Node-SID(R3)  │  → go to R3 (ECMP)
    └── R7 ──── R5 ───────── R6       │  24034  Adj-SID(R3→R4)│  → cross north link
                (south)               │  16006  Node-SID(R6)  │  → go to R6 (ECMP)
                                      └─────────────┘
  Core routers R2/R3/R4 keep NO per-path state — they forward on the top label only.

The SR Policy model

SR-TE is structured around the SR Policy — the modern, controller-friendly object model (RFC 9256). An SR Policy is uniquely identified by a tuple and contains a hierarchy of paths:

LevelWhat it is
SR PolicyIdentified by (headend, color, endpoint). Color is a numeric intent/SLA tag (e.g. "low-latency"); endpoint is the destination node.
Candidate PathOne policy has one or more candidate paths, each with a preference. The valid path with the highest preference becomes the active path; the others are backups.
Segment ListA candidate path is one or more segment lists. Multiple lists in one path carry weights for weighted ECMP (unequal load-balancing across engineered paths).
SR Policy  (headend=R1, color=100 "low-latency", endpoint=R6)
 ├─ Candidate Path  pref 200   (from PCE)          ◀── ACTIVE (highest valid pref)
 │   ├─ Segment List A  weight 3  [16003, 24034, 16006]
 │   └─ Segment List B  weight 1  [16007, 16005, 16006]   ← weighted ECMP 3:1
 └─ Candidate Path  pref 100   (explicit, local)   ◀── standby / fallback

Binding SID (BSID)

A Binding SID is a single label that represents an entire SR Policy. Traffic arrives with the BSID on top; the headend of that policy swaps the BSID for the policy's full segment list and forwards. It is the key primitive for scale and abstraction.

Ingress imposes just:  [ BSID_R4 , ... ]        ← one label hides a whole policy
                              │
                     at R4 (policy headend): POP BSID  →  PUSH [16007, 24078, 16009]
                              │
                     packet continues on the expanded segment list

Path computation: explicit, dynamic, delegated

Where does the segment list come from? Three models, often combined per candidate path:

ModelWho computesNotes
ExplicitOperatorThe segment list (or a list of hops/SIDs) is configured by hand. Deterministic; no computation. Good for surgical, static paths.
Dynamic (local)HeadendHeadend runs CSPF over its SR-TE database (IGP topology + TE attributes distributed by IGP or BGP-LS) to compute a path meeting the metric/constraints.
Delegated (PCE)Controller / PCEHeadend delegates to a stateful PCE via PCEP. The PCE has the whole multi-domain topology (via BGP-LS) and can do disjointness/global optimization the headend can't.

Objectives and constraints

Both dynamic and delegated computation optimize a metric subject to constraints:

Metric (minimize)Constraints
IGP metric — mirror normal routing costAffinity (include/exclude links by admin colour / bit)
TE metric — a separate engineered costDisjointness — path-, link-, or node-disjoint from another policy (e.g. for a dual-plane / working+protect pair)
Latency / min-delay — measured link delay (RFC 8570 delay metrics)SRLG — avoid links sharing a Shared Risk Link Group (same conduit/fibre)
 Hop count, bandwidth, max SID depth (MSD)

Stateful PCE — why it matters

Steering traffic into a policy: color + endpoint, ODN, Automated Steering

Computing a policy is useless unless traffic actually enters it. SR-TE steering is built on the color + endpoint matching model rather than on static route-to-tunnel maps.

PE2 advertises  VPN prefix 10.1.1.0/24 , next-hop = PE2 , color = 100
        │
   PE1 receives route → needs (endpoint=PE2, color=100)
        │
   ODN: no such policy? → build one from template (min-delay, PCE-delegated)
        │
   Automated Steering: install VPN route over the policy's BSID
        │
   Traffic for 10.1.1.0/24  ──▶  low-latency engineered path to PE2

The payoff: intent-driven TE. The service simply asks for a colour; policies are created, steered, and removed automatically, scaling to thousands of PE pairs without per-tunnel configuration.

Flex-Algo integration

Flexible Algorithm (Flex-Algo, RFC 9350) lets the IGP itself compute shortest paths on a custom metric (e.g. delay) with constraints (exclude certain affinities), and assigns each participating prefix a Prefix-SID per algorithm. It solves a different slice of the problem than explicit SR-TE:

Flex-AlgoExplicit / dynamic SR-TE
Where the path is computedDistributed — every router runs SPF on the algo metricAt the headend or PCE
State in the packetUsually a single Prefix-SID for the algoA segment list (can be deep)
GranularityNetwork-wide "plane" (all traffic to that SID follows the algo)Per-policy, per-flow, arbitrary hops
Best forBroad intent: a low-latency or disjoint "topology" for many destinationsSurgical, per-service paths and multi-domain steering

They compose: a common design uses Flex-Algo to build a network-wide low-latency plane (algo 128 = min-delay), then an SR-TE segment list uses the Flex-Algo Prefix-SIDs as its segments — getting a low-latency engineered path with a shallow stack (one SID per algo hop) instead of a long adjacency-SID list. ODN templates can request a colour that maps straight to a Flex-Algo instance.

SR-TE vs RSVP-TE

SR-TERSVP-TE
Core stateNone — path is in the packet's segment listPer-LSP soft state on every transit router
SignallingNo path signalling; SIDs flooded by IGP once. Headend just imposes labelsRSVP Path/Resv messages set up & refresh each LSP hop-by-hop
ScaleScales with edge nodes/policies; core is oblivious → very large N²Limited by core state & refresh load (the classic "N² mesh" pain)
ECMPNative — node-SIDs ride IGP ECMP; weighted ECMP via multiple segment listsPoor — an LSP is a single pinned path; ECMP needs many parallel LSPs
Controller-drivenFirst-class: SR Policy + PCEP/BGP-LS + ODN/Automated SteeringBolted on; PCE support exists but the model is LSP-centric
ProtectionTI-LFA — sub-50ms, 100% coverage, precomputed backup segment listFRR (facility/one-to-one) with bypass/detour LSPs — more state
Bandwidth admissionNo per-hop reservation in the dataplane; done in the controller/PCE modelExplicit per-hop bandwidth reservation & admission control
Failure reconvergenceIGP reconverges; node-SIDs auto-follow new shortest pathsHead-end must resignal/reroute the LSP

The honest nuance: RSVP-TE's one advantage is hard per-hop bandwidth admission control in the dataplane. SR-TE moves that responsibility to a controller/PCE with a global view — which is generally a better place to solve it, and buys enormous state and operational savings everywhere else.

What it looks like on the box

# IOS-XR — an explicit + dynamic SR Policy with a BSID
segment-routing traffic-eng
 policy LOWLAT_TO_R6
  color 100 end-point ipv4 192.0.2.6
  binding-sid mpls 15006
  candidate-paths
   preference 200                       ! preferred: dynamic, min-delay
    dynamic
     metric type delay
    constraints affinity exclude-any name RED
   preference 100                       ! fallback: explicit hops
    explicit segment-list NORTH_PATH
!
segment-routing traffic-eng
 segment-list NORTH_PATH
  index 10 mpls label 16003             ! Node-SID R3
  index 20 mpls label 24034             ! Adj-SID R3->R4
  index 30 mpls label 16006             ! Node-SID R6

# Verify
show segment-routing traffic-eng policy color 100
show segment-routing traffic-eng policy name LOWLAT_TO_R6 detail
 Active path : preference 200 (dynamic, PCE) , BSID 15006
 SID list    : {16003, 24034, 16006}   Metric (delay): 34

Likely follow-up questions

Related: Segment Routing — Theory · Life of a Packet.