Skip to content

Segment Routing for AI Fabrics · Part 7 of 8

Act 7 — IS-IS Flex-Algo for SR: Two Fabrics in One

IS-IS Flex-Algo (RFC 9350) is a mechanism that runs multiple independent forwarding topologies within a single IS-IS domain. Each Flex-Algo defines its own:

  • Metric type: IGP metric, TE delay metric, or hop count
  • Link inclusion/exclusion rules: only traverse links with specific TE attributes
  • SID space: dedicated SIDs for each algorithm

For AI fabrics, Flex-Algo creates two logical overlays on the same physical infrastructure:

Algorithm 0 (default):  Shortest-path by IGP metric → NCCL collective traffic
Algorithm 128:          Minimum latency (TE delay metric) → latency-sensitive flows
Algorithm 129:          Maximum bandwidth links only → checkpoint/storage flows

All three run simultaneously on the same physical switches. No separate hardware needed.

INTERACTIVE
IS-IS Flex-Algo: Multiple Topology Overlays on One Fabric
Same physical fabric — three algorithms compute independent SPF trees. Red links: high latency · Green links: low BW
Flow:
0.8µs · 400G4.2µs · 400G0.9µs · 400G0.9µs · 400G1µs · 400G0.8µs · 200G0.5µs · 800G0.5µs · 400G0.5µs · 400G3.8µs · 400G0.8µs · 400G0.9µs · 400G0.8µs · 400G1µs · 400G0.9µs · 200G0.8µs · 400GLeaf-01leafLeaf-02leafLeaf-03leafLeaf-04leafLeaf-05leafLeaf-06leafSpine-01spineSpine-02spineSpine-03spineSpine-04spine
Algorithm metric
Hop count / IGP metric
Exclusion rule
Nothing excluded
Chosen path for L1 → L5
L1 → S1 → S3 → L5
Total latency: 2.2µsMin BW: 400G
Key insight: All three algorithms run simultaneously on every switch. No additional hardware is required. The IS-IS SPF runs three independent computations. Each generates a separate forwarding table. Traffic is steered to the correct table via the Flex-Algo SID assigned to each algorithm.

Flex-Algo configuration

# Define Flex-Algo 128 (minimum latency) in IS-IS:
vtysh
router isis FABRIC
  flex-algo 128
   advertise-definition
   metric-type delay                  # Use TE delay metric (requires RTTM)
   !
  !
!

# Define Flex-Algo 129 (maximum bandwidth):
router isis FABRIC
  flex-algo 129
   advertise-definition
   metric-type te-default
   exclude-any link-attribute admin-group 128  # Exclude links marked as "slow"
   !
  !
!

# Assign SIDs to Flex-Algo:
segment-routing
 srv6
  locators
   locator LEAF01-ALGO128            # Separate locator for Algo 128
    prefix 2001:db8:128:leaf01::/64
    algorithm 128
   !
   locator LEAF01-ALGO129            # Separate locator for Algo 129
    prefix 2001:db8:129:leaf01::/64
    algorithm 129
   !
  !
 !
!
# Verify Flex-Algo participation:
vtysh -c "show isis flex-algo"
# Expected:
# Algorithm  Definition Owner  Metric-Type  Prefix-Metric
# 0          Local      Self   igp          No
# 128        Local      Self   delay        No
# 129        Local      Self   te-default   No

# Verify algorithm-specific routes exist in the table:
vtysh -c "show isis route algorithm 128"
# Shows routes computed by Algo 128 topology (latency-minimised)

vtysh -c "show isis route algorithm 129"
# Shows routes computed by Algo 129 topology (bandwidth-prioritised)

Assigning traffic to Flex-Algo paths

SR-TE policies use algorithm-specific SIDs to steer traffic:

# SR-TE policy for latency-sensitive NCCL traffic (Flex-Algo 128):
segment-routing
 traffic-eng
  policy NCCL-LATENCY
   color 128 endpoint 2001:db8:0:leaf08::1
   candidate-path preference 100 explicit segment-list NCCL-ALGO128-PATH
   !
  !
  segment-list NCCL-ALGO128-PATH
   # Use Algo-128 SIDs (latency-minimised path):
   index 10 ipv6 2001:db8:128:spine01::1   # spine-01 Algo-128 End SID
   index 20 ipv6 2001:db8:128:leaf08::100  # leaf-08 Algo-128 End.DT4
  !
 !
!

The operational value: zero-overhead topology slicing

The most important property of Flex-Algo is that it costs nothing in terms of hardware resources. You are not deploying separate physical fabrics or reserving dedicated bandwidth. The Flex-Algo IS-IS computation runs independently for each algorithm; each produces a separate SPF tree; each SID set maps to that tree. The physical links are shared but the logical forwarding decisions are separated.

For an AI fabric operator, this means:

  • During training jobs: Flex-Algo 128 (latency) routes collective traffic over the lowest-latency paths (typically the paths with fewest active flows)
  • During checkpoint/storage phases: Flex-Algo 129 (bandwidth) routes bulk storage traffic over the highest-bandwidth links, avoiding the latency-sensitive paths
  • During maintenance: a link can be temporarily excluded from Algo 128 by setting its TE delay attribute to infinity, without removing it from the default topology