세그먼트 라우팅

Flex-Algo in OcNOS: Optimizing Network Paths Using Link Delay

Part of IP Infusion's guide to 세그먼트 라우팅.

In Part 2, we used TE-metric to optimize paths for bandwidth capacity. Part 3 takes this further: instead of a statically configured cost, we use measured link delay, the actual microsecond latency of each link as measured by TWAMP (Two-Way Active Measurement Protocol), as the Flex-Algo optimization metric. When a link becomes congested and delay increases, IS-IS re-advertises the new delay value, and Flex-Algo SPF automatically reroutes latency-sensitive traffic to the lower-delay path.

Link Delay vs. TE-Metric: Key Difference

Metric Source Dynamic? Best For
IGP metric Static config No Default routing
TE metric Static config No Capacity-based steering
Link delay TWAMP measurement Yes, updates dynamically Latency-sensitive apps (5G, VoIP, gaming)

How Delay-Based Flex-Algo Works

OcNOS IS-IS Flex-Algo delay-based reroute: TWAMP-measured link delay shifts traffic to a lower-latency path when congestion raises delay
Flex-Algo delay-based path selection in OcNOS. Under normal conditions the solid navy upper path (PE1 to P-N to PE2) carries traffic at 3ms total delay. When a congestion event drives the P-N link delay from 1ms to 15ms, TWAMP link-delay measurement feeds IS-IS Flex-Algo, which reroutes onto the dashed lower path (PE1 to P-S to PE2) at 7ms, now the lower-latency route.

Step 1: Configure TWAMP for Delay Measurement

! OcNOS - TWAMP-light for dynamic link-delay measurement
!
configure terminal
!
! On R1: enable the TWAMP-light reflector and register neighbor reflectors
twamp-light reflector
 reflector-admin-state enable
  reflector-name R12 reflector-ip ipv4 10.66.12.1 reflector-port 1121
  reflector-name R13 reflector-ip ipv4 10.66.13.1 reflector-port 1131
  reflector-name R14 reflector-ip ipv4 10.66.14.1 reflector-port 1141
!
! Enable the TWAMP-light control (sender) function
twamp-light control
 control-admin-state enable
!
! Bind a delay-measurement session on each measured interface
interface ce0
 delay-measurement dynamic twamp reflector-ip 10.66.12.2 reflector-port 1112
!
interface ce1
 delay-measurement dynamic twamp reflector-ip 10.66.13.3 reflector-port 1113
!
interface xe25
 delay-measurement dynamic twamp reflector-ip 10.66.14.4 reflector-port 1114
!
commit
!
! On R4: a single reflector plus one sender session toward R1
twamp-light reflector
 reflector-admin-state enable
  reflector-name R41 reflector-ip ipv4 10.66.14.4 reflector-port 1114
!
twamp-light control
 control-admin-state enable
!
interface xe25
 delay-measurement dynamic twamp reflector-ip 10.66.14.1 reflector-port 1141
!
commit
!
! Verify the TWAMP configuration:
! show running-config twamp

Step 2: Advertise Measured Delay via IS-IS

! OcNOS - carry per-link delay into IS-IS on each interface
!
configure terminal
!
! TWAMP-measured (dynamic) link: R4 interface xe25 toward R1
interface xe25
 description To-R1-xe25
 load-interval 30
 ip address 10.66.14.4/24
 mtu 9216
 label-switching
 isis network point-to-point
 isis circuit-type level-2-only
 ip router isis OCNOS
 no isis hello padding
 delay-measurement dynamic twamp reflector-ip 10.66.14.1 reflector-port 1141
!
! Static-delay link: R4 interface cd0 toward R2 (minimum 30, maximum 40)
interface cd0
 description To-R2-cd0
 load-interval 30
 ip address 10.66.24.4/24
 mtu 9216
 label-switching
 isis network point-to-point
 isis circuit-type level-2-only
 ip router isis OCNOS
 no isis hello padding
 isis te-minimum-delay flex-algo 30
 isis te-maximum-delay flex-algo 40
!
commit
!
! Verify advertised/measured delay per interface (from R4):
! show isis interface | include line|Delay
!   cd0 : Level-2 Minimum Delay : 30 / Level-2 Maximum Delay : 40  (static)
!   xe25: Measured Minimum-Delay : 4                               (TWAMP)

Step 3: Flex-Algo 132 with Link-Delay Metric

! OcNOS - define the link-delay Flex-Algos under IS-IS (all routers)
!
configure terminal
!
router isis OCNOS
 is-type level-2-only
 capability flex-algo routing
 flex-algo 132
  metric-type link-delay
  ti-lfa
 exit-flex-algo
 !
 flex-algo 133
  metric-type link-delay
  ti-lfa
 exit-flex-algo
 !
 flex-algo 134
  metric-type link-delay
  ti-lfa
 exit-flex-algo
 !
 metric-style wide
 mpls traffic-eng router-id 10.10.100.4
 mpls traffic-eng level-2
 capability cspf
 dynamic-hostname
 fast-reroute ti-lfa level-2 proto ipv4
 bfd all-interfaces
 net 49.0001.0000.0000.0004.00
 segment-routing mpls
!
! Assign the base and per-algorithm prefix-SIDs on the loopback (per router)
interface loopback1
 ip address 10.10.100.4/32
 prefix-sid index 104
 prefix-sid algorithm-num 132 index 2804
 prefix-sid algorithm-num 133 absolute 18904
 prefix-sid algorithm-num 134 absolute 18954
 ip router isis OCNOS
!
commit
! OcNOS - optional definition tuning (example from R7)
! Raise the Flex-Algo definition priority so this node wins the election,
! and prune links whose maximum delay exceeds a threshold.
!
configure terminal
!
router isis OCNOS
 flex-algo 132
  metric-type link-delay
  priority 101
  ti-lfa
 exit-flex-algo
 !
 flex-algo 134
  metric-type link-delay
  priority 101
  ti-lfa
  exclude-maximum-delay 25
 exit-flex-algo
!
commit

Step 4: Steer 5G/Latency-Sensitive Traffic

! OcNOS - latency-sensitive traffic follows a Flex-Algo by resolving that
! algorithm's prefix-SID; the base case needs no SR-TE policy.
!
! Confirm each router elected the link-delay algorithm definitions:
show isis flex-algo all status winner summary
!
! Confirm the delay-optimized topology and routes for algorithm 132:
show isis topology algorithm 132
show ip isis route algorithm 132
!
! Confirm the MPLS forwarding entries for the algorithm:
show mpls forwarding-table algorithm 132
!
! Validate the data-plane path to a remote loopback over algorithm 132:
ping mpls isis-sr ipv4 10.10.100.5/32 algorithm 132 detail
trace mpls isis-sr ipv4 10.10.100.5/32 detail

IP Infusion Engineering Team

공유