はじめに
このドキュメントでは、ISISでのFlexible Algorithm(Flex-Algo)の動作について説明し、検証とトラブルシューティングに関連するコマンドを提供します。
前提条件
要件
- ISISセグメントルーティングトラフィックエンジニアリングに関する基本的な知識があることが推奨されます。
使用するコンポーネント
- このドキュメントの情報は、Device: Aggregation Services Router(ASR)9000(ASR9K)に基づいています。
- このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメント内で使用されているデバイスはすべて、クリアな設定(デフォルト)から作業を始めています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
Flex-Algoの概要
- Flexible Algorithm(Flex-Algo)は、0 ~ 255の範囲の数値によって識別されます。0 ~ 127の値は予約され、128 ~ 255はユーザ定義です。
- Flex-Algoは、メトリックタイプ(Interior Gateway Protocol(IGP)メトリック、遅延メトリック、またはTEメトリック)と、一連の制約(リンクアフィニティ、共有リスクリンクグループ(SRLG)など)によって定義されます。
- Flex-Algoを活用することで、ネットワークはネットワーク分割、つまりネットワークの論理的なセグメント化を実装できます。パスの計算は、定義された制約を満たすトポロジに制限されます。

図1:プレフィックスSIDサブTLV形式(アルゴリズムフィールドあり)

図2:Flex-Algo Definition(FAD)TLV形式
Network Topology

図3:ネットワークトポロジ図
Network
- アルゴリズム128 →遅延が最適化されたスライスを定義します。
- アルゴリズム129 → TE最適化スライスを定義します。
- ABR1とABR2は、IS-ISリンクステートプロトコルデータユニット(LSP)でFlex-Algo定義(FAD TLV)をアドバタイズします。
- 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
注:
- インデックス11:Flex-Algo 0(デフォルトのShortest Path First(SPF))にバインドされたプレフィックスSID。
- index 811:Flex-Algo 128にバインドされるプレフィックスSID。
- Flex-Algo Prefix-SIDは、ネットワークスライシング(NSS)を有効にします。特定のプレフィクス(Loopback100など)に対して、複数のプレフィクスSIDをアドバタイズでき、それぞれが特定のFlex-Algoに結び付けられます。
- 最初のプレフィックス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間のパフォーマンス測定インターフェイスHundredGigE0/1/0/1 >>リンクの遅延測定advertise-delay 100 >>遅延が静的に設定されています。これにより、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でのTopology-Independent Loop-Free Alternate(TI-LFA)およびMicroloop Avoidance(MLA)

図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パスも、Flex Algo 129の論理ネットワークスライスによって制限されます
ABR-1で、ABR 1と2の間のリンクがシャットダウンされると、MLAトンネルがトリガーされます。
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(MLA)の両方で、Flex-Algo 129は独自の制約付きSPFを実行し、FLEX-ALGO 129ラベルのみを使用して、Algo 129の制約を考慮した高速再ルーティングトンネルを事前計算します。
リンク関係マップの制約
- アフィニティは、オペレータによって管理上割り当てられる、IGPリンクに関連付けられた32ビットの属性です。
- 各ビット位置は、演算子によって定義された意味的な意味に対応します。
- これらのアフィニティビットは、リンクのTE属性の一部としてIGP(OSPF/IS-IS)でアドバタイズされます。
Flex-Algoが最短パスツリー(SPF)を計算すると、パス選択時にアフィニティ制約が適用されます。
- Include-Any (IA):計算されたパスは、指定されたアフィニティビットのいずれかが設定されたリンクを少なくとも1つ通過する必要があります。
- Include-All(IAll):計算されたパスは、指定されたアフィニティビットをすべて含むリンクのみを通過する必要があります。
- Exclude-Any (EA):計算されたパスは、指定されたアフィニティビットのいずれかを含むすべてのリンクを回避する必要があります。
コンフィギュレーション
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へのtraceroute
アフィニティマップの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で「include any」および「include all」を使用すると、ヘッドエンドからテールエンドに向かうパス計算に影響を与えることができます。
結論
このドキュメントでは、フレキシブルアルゴリズム(Flex-Algo)を使用して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