소개
이 문서에서는 ISIS에서 Flex-Algo(Flexible Algorithm)를 작동하는 방법에 대해 설명하고, 검증 및 문제 해결을 위한 관련 명령을 제공합니다.
사전 요구 사항
요구 사항
- Cisco에서는 ISIS 세그먼트 라우팅 트래픽 엔지니어링에 대한 기본 지식을 갖춘 것을 권장합니다.
사용되는 구성 요소
- 이 문서의 정보는 장치를 기반으로 합니다. 어그리게이션 서비스 라우터 9000(ASR9K).
- 이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
Flex-Algo 개요
- Flexible Algorithm(Flex-Algo)은 0~255 범위의 수치로 식별됩니다. 값 0~127은 예약되지만 128~255는 사용자 정의입니다.
- Flex-Algo는 메트릭 유형(IGP(Interior Gateway Protocol) 메트릭, 지연 메트릭 또는 TE 메트릭) 및 제약 조건 집합(예: 링크 선호도, SRLG(Shared Risk Link Group))에 의해 정의됩니다.
- Flex-Algo를 활용하여 네트워크는 네트워크 슬라이싱, 즉 네트워크의 논리적 세그멘테이션을 구현할 수 있습니다. 여기서 경로 계산은 정의된 제약 조건을 충족하는 토폴로지로 제한됩니다.

그림 1: Prefix-SID Sub-TLV 형식(알고리즘 필드 포함)

그림 2: FAD(Flex-Algo Definition) TLV 형식
네트워크 토폴로지

그림 3: 네트워크 토폴로지 다이어그램
네트워크
- 알고리즘(128→은 레이턴시 최적화 슬라이스를 정의한다.
- 알고리즘(129)→ TE-최적화된 슬라이스를 정의한다.
- ABR1 및 ABR2는 IS-IS LSP(Link-State Protocol Data Unit)에서 FAD TLV(Flex-Algo Definitions)를 알립니다.
- FAD 발신자는 IS-IS 도메인의 모든 라우터가 될 수 있습니다. 라우터는 정의를 알리기 위해 각 Flex-Algo에 참여할 필요가 없습니다.
Flex-Algo 컨피그레이션
router isis core
flex-algo 128
interface Loopback100
passive
address-family ipv4 unicast
prefix-sid index 11 explicit-null
prefix-sid algorithm 128 index 811 explicit-null
참고:
- index 11 - Flex-Algo 0에 바인딩된 Prefix-SID(기본 SPF(shortest path first)).
- index 811 - Prefix-SID가 Flex-Algo 128에 바인딩되었습니다.
- Flex-Algo 접두사 SID는 네트워크 슬라이싱을 활성화합니다. 지정된 접두사(예: Loopback100)의 경우 여러 접두사 SID를 알릴 수 있으며, 각 접두사는 특정 Flex-Algo에 연결됩니다.
- 첫 번째 Prefix-SID(인덱스 11)는 Flex-Algo 0(기본 IGP 최단 경로 알고리즘)과 자동으로 연결됩니다.
- 제2 프리픽스-SID(인덱스(811))는 사용자 정의 알고리즘인 Flex-Algo(128)와 명시적으로 연관된다.
메트릭스 유형 TE에 의해 정의되는 Flex-Algo 129
설정
ABR2의 경우:
router isis core
flex-algo 129
priority 50
metric-type te
advertise-definition
interface Loopback100
address-family ipv4 unicast
prefix-sid algorithm 129 index 92 explicit-null >> Prefix-SID bound to Flex-Algo 129
interface HundredGigE0/1/0/2
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
te-metric flex-algo 20 level 2 >> 20 is the TE metric value for this link , need to be enabled on the links only between those routers participating in Flex-Algo 129
확인
PE3#show isis flex-algo 129
IS-IS core Flex-Algo Database
Flex-Algo 129:
Level-2:
Definition Priority: 100
Definition Source: ASR9906-2-ABR-1.00
Definition Equal to Local: No
Definition Metric Type: TE
Definition Flex-Algo Prefix Metric: No
<snip>
FRR Disabled: No
Microloop Avoidance Disabled: No
UCMP Disabled: No
Data Plane Segment Routing: Yes
Data Plane IP: Yes
PE3#show isis database 55A1-2-PE4.00-00 verbose internal
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL Len Received From On Reason
55A1-2-PE4.00-00 0x00000149 0xfe2f 995 /1200 0/0/0 282 09:21:39 ASR9910-4-ABR-2 Hu0/1/0/0 Flooded
<snip>
TLV code:242 length:28
Router Cap: 10.10.44.44 D:0 S:0
SubTLV code:2 length:9
Segment Routing: I:1 V:0, SRGB Base: 16000 Range: 8000
SubTLV code:23 length:2
Node Maximum SID Depth:
Label Imposition: 12
SubTLV code:19 length:3
SR Algorithm:
Algorithm: 0
Algorithm: 1
Algorithm: 129
SubTLV code:29 length:1
IP Algorithm:
Algorithm: 129
TLV code:22 length:117
Metric: 10 IS-Extended ASR9910-4-ABR-2.00
SubTLV code:4 length:8
Local Interface ID: 32, Remote Interface ID: 38
SubTLV code:6 length:4
Interface IP Address: 10.10.244.44
SubTLV code:8 length:4
Neighbor IP Address: 10.10.244.2
SubTLV code:9 length:4
Physical BW: 10000000 kbits/sec
SubTLV code:16 length:9
Application Specific Link Attributes:
L flag: 0, SA-Length: 1, UDA-Length: 1
Standard Applications: 0x10 FLEX-ALGO
User Defined Applications: 0x10
SubTLV code:18 length:3
Admin. Weight: 20 >>>>>>>>>> configured TE metric
PE3#show isis topology flex-algo 129
IS-IS core paths to IPv4 Unicast (Level-2) routers
System Id Metric Next-Hop Interface SNPA
ASR9910-4-ABR-2 20 ASR9910-4-ABR-2 Hu0/1/0/0 *PtoP* >> 1 hop away from PE3
55A1-2-PE4 40 ASR9910-4-ABR-2 Hu0/1/0/0 *PtoP* >> 2 hops away from PE3
PE3#show isis database 55A1-2-01EEA29-PE4.00-00 verbose internal
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL Len Received From On Reason
55A1-2-01EEA29-PE4.00-00 0x00000149 0xfe2f 995 /1200 0/0/0 282 09:21:39 ASR9910-4-01F8486-ABR-2 Hu0/1/0/0 Flooded
TLV code:242 length:28
Router Cap: 10.10.44.44 D:0 S:0
SubTLV code:2 length:9
Segment Routing: I:1 V:0, SRGB Base: 16000 Range: 8000
SubTLV code:23 length:2
Node Maximum SID Depth:
Label Imposition: 12
SubTLV code:19 length:3
SR Algorithm:
Algorithm: 0
Algorithm: 1
Algorithm: 129
SubTLV code:29 length:1
IP Algorithm:
Algorithm: 129
TLV code:22 length:117
Metric: 10 IS-Extended ASR9910-4-01F8486-ABR-2.00
SubTLV code:4 length:8
Local Interface ID: 32, Remote Interface ID: 38
SubTLV code:6 length:4
Interface IP Address: 10.10.244.44
SubTLV code:8 length:4
Neighbor IP Address: 10.10.244.2
SubTLV code:9 length:4
Physical BW: 10000000 kbits/sec
SubTLV code:16 length:9
Application Specific Link Attributes:
L flag: 0, SA-Length: 1, UDA-Length: 1
Standard Applications: 0x10 FLEX-ALGO
User Defined Applications: 0x10
SubTLV code:18 length:3
Admin. Weight: 20 >>>>>>>>>> configured TE metric
메트릭 유형 지연으로 정의되는 Flex-Algo 128
설정
router isis core
flex-algo 128
priority 100
metric-type delay
advertise-definition
performance-measurement
interface HundredGigE0/1/0/0
delay-measurement >>> this CLI needs to be enabled only on those interfaces between those routers participating in Flex-Algo 128
!
!
interface HundredGigE0/1/0/3
delay-measurement
확인
PE1#show isis flex-algo 128
IS-IS core Flex-Algo Database
Flex-Algo 128:
Level-2:
Definition Priority: 100
Definition Source: ASR9906-2-ABR-1.00
Definition Equal to Local: No
Definition Metric Type: Delay
Definition Flex-Algo Prefix Metric: No
참고: PE2에서는 PE2와 ABR 1 지연 측정 advertise-delay 100 >> delay 사이의 성능 측정 인터페이스 HundredGigE0/1/0/1 >> 링크가 정적으로 구성됩니다. 이렇게 하면 PE2에서 PE1을 향하는 방향으로 지연 메트릭이 +100만큼 증가하므로 PE2에서 ABR 1에 도달하는 지연은 100입니다.
PE1#show isis database ASR-9904-5-PE2.00-00 verbose internal
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL LSP Length
ASR-9904-5-PE2.00-00 0x00000231 0x6084 1131 /1200 0/0/0 310
<snip>
TLV code:242 length:25
<snip>
SubTLV code:19 length:3
SR Algorithm:
Algorithm: 0
Algorithm: 1
Algorithm: 128
TLV code:22 length:144
Metric: 10 IS-Extended ASR9906-2-ABR-1.00
SubTLV code:4 length:8
Local Interface ID: 17, Remote Interface ID: 22
SubTLV code:6 length:4
Interface IP Address: 10.10.221.22
SubTLV code:8 length:4
Neighbor IP Address: 10.10.221.1
SubTLV code:9 length:4
Physical BW: 99999998 kbits/sec
SubTLV code:33 length:4
Link Average Delay: 100 us
SubTLV code:34 length:8
Link Min/Max Delay: 100/100 us
SubTLV code:35 length:4
Link Delay Variation: 0 us
SubTLV code:16 length:14
Application Specific Link Attributes:
L flag: 0, SA-Length: 1, UDA-Length: 1
Standard Applications: 0x10 FLEX-ALGO
User Defined Applications: 0x10
SubTLV code:34 length:8
Link Min/Max Delay: 100/100 us >>> delay calculated on this link due to the confoguration
PE2#show isis topology flex-algo 128
IS-IS core paths to IPv4 Unicast (Level-2) routers
System Id Metric Next-Hop Interface SNPA
ASR9906-2-ABR-1 100 ASR9906-2-ABR-1 Hu0/1/0/1 *PtoP*
ASR9906-1-PE1 112 ASR9906-2-ABR-1 Hu0/1/0/1 *PtoP*
인터페이스에 수동 advertise-delay가 구성되어 있지 않고 인터페이스에서 활성화된 기본 지연 측정 프로파일을 사용하면 링크에서 프로브가 전송되어 인터페이스의 지연을 측정합니다.
ABR-1#show performance-measurement sessions
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/1/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Transport type : Interface
Measurement type : Delay Measurement
Interface name : HundredGigE0/1/0/0
Nexthop : Unknown
Delay Measurement session:
Session ID : 4097
Profile Keys:
Profile name : default
Profile type. : Interface Delay Measurement
Last advertisement:
Advertised at: Sep 26 2025 14:00:36.179 (247623.282 seconds ago)
Advertised reason: Periodic timer, min delay threshold crossed
Advertised delays (uSec): avg: 12, min: 12, max: 13, variance: 0
A flag set: False
Next advertisement:
Threshold check scheduled in 2 more probes (roughly every 120 seconds)
Aggregated delays (uSec): avg: 12, min: 11, max: 12, variance: 1
Rolling average (uSec): 11
Current computation:
Started at: Sep 29 2025 10:47:17.373 (22.88 seconds ago)
Packets Sent: 8, received: 8
Measured delays (uSec): avg: 12, min: 11, max: 12, variance: 1 >>>>>>>>>>>> the delay measured using probes on this interface
Next probe scheduled at: Sep 29 2025 10:47:47.369 (in 7.908 seconds)
Next packet will be sent in 1.908 seconds
Packet sent every 3.0 seconds
Responder IP : 10.10.111.11
Number of Hops : 1
ABR-1#show isis database ASR9906-1-PE1.00-00 verbose internal
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL LSP Length
ASR9906-1-PE1.00-00 0x00000777 0x13ef 497 /1200 0/0/0 370
<snip>
TLV code:22 length:197
Metric: 10 IS-Extended ASR9906-2-ABR-1.00
SubTLV code:4 length:8
Local Interface ID: 40, Remote Interface ID: 21
SubTLV code:6 length:4
Interface IP Address: 10.10.111.11
SubTLV code:8 length:4
Neighbor IP Address: 10.10.111.1
SubTLV code:9 length:4
Physical BW: 99999998 kbits/sec
SubTLV code:33 length:4
Link Average Delay: 12 us >>>>>>>>>>>>>> the calculated delay is propagated via ISIS which is used by the Headend router to calculate the path with minimum delay
SubTLV code:34 length:8
Link Min/Max Delay: 12/13 us
SubTLV code:35 length:4
Link Delay Variation: 0 us
SubTLV code:16 length:14
Application Specific Link Attributes:
L flag: 0, SA-Length: 1, UDA-Length: 1
Standard Applications: 0x10 FLEX-ALGO
User Defined Applications: 0x10
SubTLV code:34 length:8
Link Min/Max Delay: 12/13 us
PE1#show isis topology flex-algo 128
IS-IS core paths to IPv4 Unicast (Level-2) routers
System Id Metric Next-Hop Interface SNPA
ASR9906-2-ABR-1 12 ASR9906-2-ABR-1 Hu0/1/0/0 *PtoP*
ASR-9904-5-PE2 24 ASR9906-2-ABR-1 Hu0/1/0/0 *PtoP*
참고:
- PE1에서 ABR 1에 도달하는 데에는 12개의 us 지연만 있습니다.
- PE1에서 PE2에 도달하는 데에는 24개의 us 지연이 있습니다.
FLEX-ALGO 129의 TI-LFA(Topology-independent Loop-Free Alternate) 및 MLA(Microloop Avoidance)

그림 4: Flex-Algo 129용 TI-LFA 및 MLA를 시연하는 데 사용된 네트워크 토폴로지 다이어그램
ABR-1#show isis fast-reroute flex-algo 129 10.10.2.2/32 detail
L2 10.10.2.2/32 [20/115] Label: 16092, medium priority
Installed Sep 17 10:40:08.503 for 00:16:25
via 10.10.12.2, HundredGigE0/1/0/1, Label: Exp-Null-v4, ASR9910-4-ABR-2, SRGB Base: 16000, Weight: 0
Backup path: TI-LFA (link), via 10.10.221.22, HundredGigE0/1/0/3 ASR-9904-5-PE2, SRGB Base: 16000, Weight: 0, Metric: 60
P node: ASR9910-3-PE3.00 [10.10.33.33], Label: 16933 >>>>>>>>>> TI-LFA precomputed path for FRR
Prefix label: 16092
Backup-src: ASR9910-4-ABR-2.00
P: No, TM: 60, LC: No, NP: No, D: No, SRLG: Yes
src ASR9910-4-ABR-2.00-00, 10.10.2.2, prefix-SID index 92, R:0 N:1 P:1 E:1 V:0 L:0, Alg:129
참고:
- 16933 PE3 Flex-Algo 129 레이블
- 16092 ABR -2 Flex-Algo 129 레이블
- TI-LFA 경로는 또한 플렉스 로고 (129) 의 논리적 네트워크 슬라이스로 제한된다
ABR 1과 2 간 링크가 종료된 ABR-1에서 MLA-tunnel이 트리거됩니다.
ABR-1 #show isis microloop avoidance 10.10.2.2/32 flex-algo 129 detail
10.10.2.2/32 participated in 1 of 6 microloop avoidance events
number start spf duration cleanup duration pins: ipv4 ipv6
--- --- --- --- --- --- --- ---
5 restart 10:59:16.440 0 ms 10:59:16.643 3 0
trigger: Link down, near node: ASR9906-2-ABR-1.00, far node: ASR9910-4-ABR-2.00
via 10.10.221.22, Hu0/1/0/3, Labels: 16933
TI-LFA 및 MLA 모두에서 Flex-Algo 129는 자체 제한 SPF를 실행하며 FLEX-ALGO 129 레이블만 사용하여 Algo 129 제약 조건을 따르는 빠른 경로 재지정 터널을 미리 계산합니다.
링크 선호도-맵 제약 조건
- 선호도는 IGP 링크와 연결된 32비트 특성으로, 운영자가 관리적으로 할당합니다.
- 각 비트 위치는 연산자에 의해 정의된 의미론적 의미에 대응한다.
- 이 선호도 비트는 링크의 TE 특성의 일부로서 IGP(OSPF/IS-IS)에서 광고됩니다.
Flex-Algo는 SPF(최단 경로 트리)를 계산할 때 경로 선택 중에 선호도 제약 조건을 적용합니다.
- 모두 포함(IA): 계산된 경로는 지정된 선호도 비트 집합이 있는 하나 이상의 링크를 통과해야 합니다.
- 모두 포함(IAll): 계산된 경로는 지정된 친화도 비트를 모두 포함하는 링크만 통과해야 합니다.
- EA(Exclude-Any): 계산된 경로는 지정된 선호도 비트를 전달하는 모든 링크를 방지해야 합니다.
설정
ABR 1과 2의 경우:
On ABR 1and 2
router isis core
affinity-map ALGO-129 bit-position 6
flex-algo 129
priority 100
metric-type te
advertise-definition
affinity exclude-any ALGO-129
이 구성을 FAD에 게시합니다.
확인
PE4#show isis database ASR9906-2-ABR-1.00-00 verbose internal
IS-IS core (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL Len Received From On Reason
ASR9906-2-ABR-1.00-00 0x0000023f 0xa89f 871 /1200 0/0/0 453 11:12:43 ASR9906-1-PE1 Hu0/0/0/5 Flooded
TLV code:242 length:44
Router Cap: 10.10.1.1 D:0 S:0
<snip>
SubTLV code:19 length:4
SR Algorithm:
Algorithm: 0
Algorithm: 1
Algorithm: 128
Algorithm: 129
SubTLV code:26 length:4
Flex-Algo Definition:
Algorithm: 129 Metric-Type: 2 Alg-type: 0 Priority: 100
SubTLV code:1 length:4
Flex-Algo Exclude-Any Ext Admin Group: >>> FAD to exclude any link with this bit position set
0x00000040
PE4#show isis flex-algo 129
IS-IS core Flex-Algo Database
Flex-Algo 129:
Level-2:
Definition Priority: 100
Definition Source: ASR9906-2-ABR-1.00
Definition Equal to Local: No
Definition Metric Type: TE
Definition Flex-Algo Prefix Metric: No
Exclude Any Affinity Bit Positions: 6
링크에 링크 선호도 맵이 구성되지 않은 경우 PE4에서 PE3으로 이동한 경로:
PE4#traceroute sr-mpls labels 16933 lsp-end-point 10.10.33.33
Type escape sequence to abort.
0 10.10.244.44 MRU 1500 [Labels: 16933/explicit-null Exp: 0/0] >>>>>>>>>>>>>>>>>>>> PE4
L 1 10.10.244.2 MRU 1500 [Labels: explicit-null/explicit-null Exp: 0/0] 5 ms >>>>>>>>ABR2
! 2 10.10.32.33 4 ms >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>PE3

그림 5: 친화도 맵이 정의되지 않은 PE4와 PE3 간의 경로 추적
선호도 맵의 ABR-2에 대한 컨피그레이션
router isis core
affinity-map ALGO-129 bit-position 6 >> define the bit position and associate it with a name
router isis core
interface HundredGigE0/1/0/2 >>> link between ABR-2 to PE3
affinity flex-algo ALGO-129 >>>>> link affinity map
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
te-metric flex-algo 20 level 2
확인
PE4#show isis database ASR9910-4-ABR-2.00-00 verbose internal
<snip>
TLV code:22 length:193
<snip>
SubTLV code:6 length:4
Interface IP Address: 10.10.32.2
SubTLV code:8 length:4
Neighbor IP Address: 10.10.32.33
SubTLV code:9 length:4
Physical BW: 99999998 kbits/sec, 12499999744 bytes/sec
SubTLV code:16 length:21
Application Specific Link Attributes:
L flag: 0, SA-Length: 1, UDA-Length: 1
Standard Applications: 0x10 FLEX-ALGO
User Defined Applications: 0x10
SubTLV code:14 length:4
Ext Admin Group:
0x00000040 >>>>>> link affinity flooded via IGP
SubTLV code:3 length:4
Affinity: 0x00000040
SubTLV code:18 length:3
Admin. Weight: 20
PE4에서 PE3으로 향하는 Flex Algo 129에 대한 FAD에 따라, 친화도 맵 비트 위치 6을 갖는 임의의 링크를 배제할 필요가 있다.
PE4#traceroute sr-mpls labels 16933 lsp-end-point 10.10.33.33
0 10.10.244.44 MRU 1500 [Labels: 16933/explicit-null Exp: 0/0]
L 1 10.10.244.2 MRU 1500 [Labels: 16933/explicit-null Exp: 0/0] 5 ms >>>>>>>>>>>>> ABR2
L 2 10.10.12.1 MRU 1500 [Labels: 16933/explicit-null Exp: 0/0] 4 ms >>>>>>>>>>>>>> ABR1
L 3 10.10.221.22 MRU 1500 [Labels: explicit-null/explicit-null Exp: 0/0] 15 ms >>> PE2
! 4 10.10.233.33 4 ms >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PE3

그림 6: 선호도 맵을 구성한 후 PE4에서 PE3으로 이동한 경로
참고: 마찬가지로, 플렉스 슬라이드의 FAD에서 "any 포함" 및 "all 포함"을 사용하면 헤드 끝에서 테일 끝을 향하는 경로 계산에 영향을 줄 수 있습니다.
결론
이 문서에서는 Flex-Algo(Flexible Algorithm)를 사용하여 IS-IS 도메인을 여러 네트워크 슬라이스로 논리적으로 분할하는 방법에 대해 설명합니다. 각 슬라이스는 고유한 경로 계산 규칙 및 제약 조건을 정의할 수 있으므로 SLA 요구 사항 또는 트래픽 민감도에 따라 트래픽 스트림을 차별적으로 처리할 수 있습니다.
명령
show isis flex-algo <>
show isis flex-algo 129 neighbors
show isis topology flex-algo
show isis database <> verbose detail
show isis route <> flex-algo <> detail
show mpls forwarding labels <> detail
show isis microloop avoidance <> flex-algo <> detail
show isis fast-reroute flex-algo <> <prefix> detail