段路由

Flex-Algo in OcNOS: Optimizing Network Paths Using TE-Metric

In Part 1, we covered Flex-Algo fundamentals and how multiple algorithms coexist in a single IS-IS domain. This article focuses specifically on the TE-metric optimization type — the most common Flex-Algo deployment for separating high-bandwidth bulk traffic from latency-sensitive services.

What is TE-Metric and Why Does it Matter?

Every IS-IS link has two metrics: the IGP metric (used by standard SPF) and the TE metric (used by Traffic Engineering extensions, RFC 3630/5305). These are configured independently, allowing operators to define a completely separate cost structure for TE-based path computation.

A typical deployment assigns:

  • IGP metric based on distance or administrative preference (for default routing)
  • TE metric based on available bandwidth or congestion cost (for capacity-optimized routing)

When Flex-Algo 129 uses metric-type te-metric, IS-IS runs a separate SPF using TE metrics as link costs. Links with low TE metric (high available capacity) become preferred — even if their IGP metric is higher. This means bulk transfer jobs and video streaming traffic follow high-bandwidth paths, while VoIP and 5G control plane traffic continues on the default IGP shortest path.

TE-Metric Topology Example

R1 SID 101 R2 SID 102 R3 SID 103 R5 SID 105 R4 SID 104 IGP:10 | TE:50 IGP:20 | TE:5 IGP:10 | TE:50 IGP:20 | TE:5 IGP:15 | TE:5 IGP SPF path (Algo 0) — total IGP cost: 20 TE-metric path (Algo 129) — total TE cost: 15
IGP SPF and TE-metric Flex-Algo diverge on the same network. The IGP path (R1→R2→R4) has the lowest IGP cost (20). The TE-metric path (R1→R3→R5→R4) has the lowest TE cost (15) because the southern links are 100G with low TE metrics. Bulk traffic follows the southern path automatically via Algo 129.

Configuration: Flex-Algo 129 with TE-Metric

! OcNOS -- Flex-Algo 129: TE-metric path optimization (all routers)
!
router isis CORE
  flex-algo 129
    metric-type te-metric            ! Run SPF using TE metrics as link costs
    advertise-definition
    priority 128
  !
  address-family ipv4 unicast
    segment-routing mpls
  exit-address-family
!
! Assign Algo 129 SID (separate from default Algo 0 SID)
interface lo
  ip address 10.0.0.1/32
  ip router isis CORE
  isis segment-routing prefix-sid index 1               ! Algo 0 SID
  isis segment-routing prefix-sid algorithm 129 index 2001  ! Algo 129 SID
!
! Configure TE metrics per link (sets capacity preference)
interface eth-0-1                ! 10G link (north) -- less preferred
  ip router isis CORE
  isis metric 10                 ! IGP metric
  isis metric te-metric 50       ! High TE cost = avoid for bulk traffic
!
interface eth-0-2                ! 100G link (south) -- preferred for bulk
  ip router isis CORE
  isis metric 20                 ! Higher IGP cost (longer path)
  isis metric te-metric 5        ! Low TE cost = preferred for bulk traffic

Traffic Steering: SR Policy with Algo 129

! OcNOS -- Steer bulk traffic onto Algo 129 TE-optimized path
!
! Option A: SR-TE policy using Algo 129 dynamic computation
segment-routing
  traffic-eng
    policy BULK-TRANSFER
      color 129 end-point 10.0.0.4          ! Toward R4
      candidate-paths
        preference 100
          dynamic
            metric type te                   ! Use TE metric for computation
          !
        !
      !
    !
  !
!
! Option B: Explicit segment list using Algo 129 SIDs
segment-routing
  traffic-eng
    policy BULK-EXPLICIT
      color 130 end-point 10.0.0.4
      candidate-paths
        preference 100
          explicit segment-list TE-PATH
            index 10 mpls label 18003        ! Algo 129 SID for R3
            index 20 mpls label 18005        ! Algo 129 SID for R5
            index 30 mpls label 18004        ! Algo 129 SID for R4
          !
        !
      !
    !
  !
!
! Verify Algo 129 path computation:
show isis flex-algo 129 detail
show isis route 10.0.0.4 flex-algo 129
show mpls forwarding-table | include 18004

IP Infusion Engineering Team

分享