Single-Domain SR-TE その1(Explicit Path)

SR-TE & Explicit Path が理解できたので自分のメモ用にアウトプットします。

1. SR-TE & explicit path

トラフィックの経路を明示的に定義するSR-TE

2. Topology

3. Config

h_N1(Head-End)

hostname h_N1
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!         
interface MgmtEth0/RP0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.2.1 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.1.3.1 255.255.255.0
!
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0001.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 1
  !
 !
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
   fast-reroute per-prefix
   fast-reroute per-prefix ti-lfa
  !
 !
 interface GigabitEthernet0/0/0/2
  address-family ipv4 unicast
   fast-reroute per-prefix
   fast-reroute per-prefix ti-lfa
  !
 !
!
mpls oam
!
segment-routing
 traffic-eng
  segment-list EXPLICIT_LIST
   index 10 mpls label 16003
   index 20 mpls label 16002
   index 30 mpls label 24365
   index 40 mpls label 16005
   index 50 mpls label 16006
  !
  segment-list PREF_75_EXPLICIT_LIST
   index 10 mpls label 16003
   index 20 mpls label 16005
   index 30 mpls label 16006
  !
  policy EXPLICIT_PATH_POLICY
   binding-sid mpls 24365
   color 6 end-point ipv4 6.6.6.6
   autoroute
    include ipv4 6.6.6.6/32
   !
   candidate-paths
    preference 75
     explicit segment-list PREF_75_EXPLICIT_LIST
     !    
    !
    preference 100
     explicit segment-list EXPLICIT_LIST
     !
    !
   !
  !
 !
!
end


h_N2

hostname h_N2
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255
!         
interface MgmtEth0/RP0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.2.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.2.3.2 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.2.4.2 255.255.255.0
!
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0002.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 2
  !
 !
 interface GigabitEthernet0/0/0/0
 !
 interface GigabitEthernet0/0/0/1
 !
  interface GigabitEthernet0/0/0/2
  address-family ipv4 unicast
   metric 1000
   adjacency-sid index 365 protected
   adjacency-sid index 366
  !
 !
!
mpls oam
!
segment-routing
 local-block 24000 25000
!
end

h_N3

hostname h_N3
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 3.3.3.3 255.255.255.255
!         
interface MgmtEth0/RP0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.3.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.2.3.3 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.3.5.3 255.255.255.0
!
interface GigabitEthernet0/0/0/3
 ipv4 address 10.3.4.3 255.255.255.0
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0003.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 3
  !
 !
 interface GigabitEthernet0/0/0/0
 !
 interface GigabitEthernet0/0/0/1
 !
 interface GigabitEthernet0/0/0/2
  address-family ipv4 unicast
   metric 1000
  !
 !
 interface GigabitEthernet0/0/0/3
 !
!
mpls oam
!
end

h_N4

hostname h_N4
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.2.4.4 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.4.5.4 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.4.6.4 255.255.255.0
!
interface GigabitEthernet0/0/0/3
 ipv4 address 10.3.4.4 255.255.255.0
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0004.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 4
  !
 !
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
   metric 1000
  !
 !
 interface GigabitEthernet0/0/0/1
 !
 interface GigabitEthernet0/0/0/2
  address-family ipv4 unicast
   metric 1000
  !
 !
 interface GigabitEthernet0/0/0/3
 !
!
mpls oam
!
end

h_N5

hostname h_N5
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.3.5.5 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.4.5.5 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.5.6.5 255.255.255.0
!
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0005.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 5
  !
 !
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
   metric 1000
  !
 ! 
 interface GigabitEthernet0/0/0/1
 !
 interface GigabitEthernet0/0/0/2
 !
!
mpls oam
!
end

h_N6

hostname h_N6
group CCIE-ISIS
 router isis '.*'
  is-type level-2-only
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface 'Gi.*'
   point-to-point
   address-family ipv4 unicast
   !
  !
  interface 'Loopback .*'
   address-family ipv4 unicast
   !
  !
 !
end-group
!
interface Loopback0
 ipv4 address 6.6.6.6 255.255.255.255
!         
interface GigabitEthernet0/0/0/0
 ipv4 address 10.4.6.6 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.5.6.6 255.255.255.0
!
router isis 1
 apply-group CCIE-ISIS
 net 49.0001.0000.0000.0006.00
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 6
  !
 !
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
   metric 1000
  !
 !
 interface GigabitEthernet0/0/0/2
 !
!
mpls oam
!
end

4.実装

実装の流れは、①全ノードでSegment Routing を有効にしてから ②Head-End で explicit Path を定義し、 ③SR-TEのポリシーを定義します。④最後に経路の候補(Candidate-paths)を②で指定した path list から選択します。

4.1 全ノード共通

IGPでSegment Routing を有効にします。 segment-routing mpls (忘れずに Loopback0 で prefix-sid index X を有効化します)

 router isis '.*'
  net 49.0001.0000.0000.000X.00
  address-family ipv4 unicast
   metric-style wide
   segment-routing mpls
  !
  interface Loopback 0
   address-family ipv4 unicast
    prefix-sid index X
   !
  !
 !

4.2 SR-TEの実装とは無関係のネタ仕込み

ノード h_N2 でSRLBを定義します。rangeは、24000-25000とします。

RP/0/RP0/CPU0:h_N2(config)#segment-routing 
RP/0/RP0/CPU0:h_N2(config-sr)#local-block 24000 25000
RP/0/RP0/CPU0:h_N2(config-sr)#commit 
Sun Mar 12 14:03:29.916 UTC
RP/0/RP0/CPU0:Mar 12 14:03:32.614 UTC: mpls_lsd[187]: %ROUTING-MPLS_LSD-3-ERR_SRLB_RANGE : SRLB allocation failed: 'SRLB reservation not successfull for [24000,25000]. Use with caution 'clear segment-routing local-block discrepancy all' command to force srlb allocation' 
RP/0/RP0/CPU0:h_N2(config-sr)# 

'clear segment-routing local-block discrepancy all' command を実行せよ!と言われます。

実行しないと...この通り

RP/0/RP0/CPU0:h_N2(config-sr)#do show mpls forwarding
Sun Mar 12 14:03:39.538 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
Label  Label       or ID              Interface                    Switched    
------ ----------- ------------------ ------------ --------------- ------------
16001  Pop         SR Pfx (idx 1)     Gi0/0/0/0    10.1.2.1        23836       
16003  16003       SR Pfx (idx 3)     Gi0/0/0/0    10.1.2.1        0           
16004  16004       SR Pfx (idx 4)     Gi0/0/0/0    10.1.2.1        2328        
16005  16005       SR Pfx (idx 5)     Gi0/0/0/0    10.1.2.1        0           
16006  16006       SR Pfx (idx 6)     Gi0/0/0/0    10.1.2.1        0           
24000  Pop         SR Adj (idx 1)     Gi0/0/0/0    10.1.2.1        0           
24001  Pop         SR Adj (idx 3)     Gi0/0/0/0    10.1.2.1        0           
24004  Pop         SR Adj (idx 1)     Gi0/0/0/2    10.2.4.4        0           
24005  Pop         SR Adj (idx 3)     Gi0/0/0/2    10.2.4.4        0           
RP/0/RP0/CPU0:h_N2(config-sr)#

SRLBを再計算してくれません。言われた通りにコマンドを実行します。

do clear segment-routing local-block discrepancy all

暫くすると指定したSRLBを加味してLSDを再計算します。

  RP/0/RP0/CPU0:h_N2(config-sr)#do show mpls forwarding
  Sun Mar 12 14:04:38.443 UTC
  Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
  Label  Label       or ID              Interface                    Switched    
  ------ ----------- ------------------ ------------ --------------- ------------
  16001  Pop         SR Pfx (idx 1)     Gi0/0/0/0    10.1.2.1        23836       
  16003  16003       SR Pfx (idx 3)     Gi0/0/0/0    10.1.2.1        0           
  16004  16004       SR Pfx (idx 4)     Gi0/0/0/0    10.1.2.1        2328        
  16005  16005       SR Pfx (idx 5)     Gi0/0/0/0    10.1.2.1        0           
  16006  16006       SR Pfx (idx 6)     Gi0/0/0/0    10.1.2.1        0           
★25001  Pop         SR Adj (idx 1)     Gi0/0/0/0    10.1.2.1        0           
★25002  Pop         SR Adj (idx 3)     Gi0/0/0/0    10.1.2.1        0           
★25003  Pop         SR Adj (idx 1)     Gi0/0/0/2    10.2.4.4        0           
★25004  Pop         SR Adj (idx 3)     Gi0/0/0/2    10.2.4.4        0           
  RP/0/RP0/CPU0:h_N2(config-sr)#

★部の値がdefault値から変わったことにお気づきでしょうか。default の Dynamic Label range は24000からなのですが。 今SRLBを24000-25000としたがために Dynamic Label range が 25001~に変更されたのです。 ここで、h_N2 - h_N4 のリンクに明示的にAdj-SIDを定義します。

router isis 1
 interface GigabitEthernet 0/0/0/2
  address-family ipv4 unicast
   adjacency-sid index 365 protected
   adjacency-sid index 366
  !
 !
!

このAdj-SIDは通常のそれとは違い固定で割り当てられます。どういう使い道があるのかは別として複数定義することが可能です。 確認コマンドは以下の通りです。

RP/0/RP0/CPU0:h_N2#show isis segment-routing label adjacency persistent 
Sun Mar 12 14:46:02.607 UTC

IS-IS 1 Manual Adjacency SID Table

24365 AF IPv4
      GigabitEthernet0/0/0/2: IPv4, Protected 1/255/N, Active

24366 AF IPv4
      GigabitEthernet0/0/0/2: IPv4, Not protected 1/255/N, Active
RP/0/RP0/CPU0:h_N2#

SRLB を定義したノード h_N2 の LFIB を見てみましょう。

    RP/0/RP0/CPU0:h_N2#show mpls forwarding 
    Sun Mar 12 14:47:44.792 UTC
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
    Label  Label       or ID              Interface                    Switched    
    ------ ----------- ------------------ ------------ --------------- ------------
    16001  Pop         SR Pfx (idx 1)     Gi0/0/0/0    10.1.2.1        24364       
    16003  Pop         SR Pfx (idx 3)     Gi0/0/0/1    10.2.3.3        0           
    16004  16004       SR Pfx (idx 4)     Gi0/0/0/1    10.2.3.3        0           
    16005  16005       SR Pfx (idx 5)     Gi0/0/0/1    10.2.3.3        0           
    16006  16006       SR Pfx (idx 6)     Gi0/0/0/1    10.2.3.3        0           
★1 24365  Pop         SRLB (idx 365)     Gi0/0/0/2    10.2.4.4        0           
★2 24366  Pop         SRLB (idx 366)     Gi0/0/0/2    10.2.4.4        0           
    25001  Pop         SR Adj (idx 1)     Gi0/0/0/0    10.1.2.1        0           
    25002  Pop         SR Adj (idx 3)     Gi0/0/0/0    10.1.2.1        0           
★3 25003  Pop         SR Adj (idx 1)     Gi0/0/0/2    10.2.4.4        0           
★4 25004  Pop         SR Adj (idx 3)     Gi0/0/0/2    10.2.4.4        0           
    25005  Pop         SR Adj (idx 1)     Gi0/0/0/1    10.2.3.3        0           
    25006  Pop         SR Adj (idx 3)     Gi0/0/0/1    10.2.3.3        0           
    RP/0/RP0/CPU0:h_N2#

★1-2 が persistence Adj-SIDs ※ SRLB が目印となります。
★3-4 がDynamic Adj-SIDs

4.3 Head-End(h_N1)

4.3.1 explicit Path の定義

① Segment Routing を定義します。

RP/0/RP0/CPU0:h_N1(config)#?
  segment-routing            Segment Routing

② Segment Routing で Traffic Engineering を定義します。

RP/0/RP0/CPU0:h_N1(config-sr)#?
  traffic-eng         Segment Routing Traffic Engineering

③ Segment-list configuration でSegment-list名(任意:EXPLICIT_LIST)を定義します。

RP/0/RP0/CPU0:h_N1(config-sr-te)#?
  segment-list        Segment-list configuration
RP/0/RP0/CPU0:h_N1(config-sr-te)#segment-list ?
  name  Segment-list name
  WORD  Identifying name for segment-list
RP/0/RP0/CPU0:h_N1(config-sr-te)#segment-list EXPLICIT_LIST

④ SR-TEで経路を明示的に定義します。

RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#?
  index               Next entry index
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index ?
  <1-65535>  Index number
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 ?
  mpls  MPLS configuration
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls ?
  label      MPLS label configuration
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls label ?
  <0-1048575>  MPLS label value
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls label 16003 ?
  <cr>  

今回は、Node1→3→2→4→5→6 とします。

segment-routing
 traffic-eng
  segment-list EXPLICIT_LIST
   index 10 mpls label 16003
   index 20 mpls label 16002
   index 30 mpls label 24365
   index 40 mpls label 16005
   index 50 mpls label 16006
  !
 !
!

4.3.2 SR-TE Policy の定義

SR-TE Policy を以下のように定義します。
a) ポリシー名 :EXPLICIT_PATH_POLICY
b) B-SID(任意):24365
c) color :6
d) Tail-End :6.6.6.6(h_N6)

SR-TEは、a)ポリシー名とc)カラー、d)Tail-Endの指定が必須です。

① 先ずはポリシー名を定義します。

RP/0/RP0/CPU0:h_N1(config-sr-te)#policy ?
  WORD  Identifying name for policy with max 59 characters
RP/0/RP0/CPU0:h_N1(config-sr-te)#policy EXPLICIT_PATH_POLICY

② B-SID(binding-sid)は任意設定です。
※ SR-TE Policy自体に割り当てられたSIDをB-SID(binding-sid)と呼びます。

RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#?
  binding-sid              Binding Segment Identifier
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid ?
  mpls  MPLS label
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid mpls ?
  <16-1048575>  MPLS label
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid mpls 24365 ?
  <cr>  

③ 次にカラーとTail-Endを指定します。

RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#?
  color                    Specify color for policy
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color ?
  <1-4294967295>  Color value
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6 ?
  end-point  Policy endpoint
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6 end-point ?
  ipv4  IPv4 address
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6 end-point ipv4 ?
  A.B.C.D  IPv4 endpoint address
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6 end-point ipv4 6.6.6.6 ?
  <cr>  

④ SR-TEポリシーで作成したLSP経由でパケットを転送させるため、autorouteを定義します。
端的に言うと、For traffic steering toward h_N6 ってことです。

RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#?
  autoroute                Autoroute configuration
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#autoroute 
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#?
  include             Prefixes for which IGP routes will be installed
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ?
  all   Include all eligible prefixes
  ipv4  IPv4 address family
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ipv4 ?
  A.B.C.D/length  IP prefix route to include
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ipv4 6.6.6.6/32

4.3.3 Candidate-paths の定義

Candidate-paths を以下のように定義します。
a) preference :100(大きい方が優先されます!)
b) explicit path :EXPLICIT_LIST

preference と指定する経路リストをセットで指定します。

RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#?
  candidate-paths          Candidate-paths configuration
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#candidate-paths 
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#?
  preference          Policy path-option preference entry
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#preference ?
  <1-65535>  Path-option preference
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#preference 100 
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#?
  explicit            Preconfigured path
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit ?
  segment-list  Specify Segment-list
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit segment-list ?
  EXPLICIT_LIST  Identifying name for segment-list
  WORD           Identifying name for segment-list
RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit segment-list EXPLICIT_LIST

ここでpreferenceを比較するために、別の segment-list を定義しておきます。
※ ★の箇所です。

   segment-routing
    traffic-eng
     segment-list EXPLICIT_LIST
      index 10 mpls label 16003
      index 20 mpls label 16002
      index 30 mpls label 24365
      index 40 mpls label 16005
      index 50 mpls label 16006
     !
★   segment-list PREF_75_EXPLICIT_LIST
★    index 10 mpls label 16003
★    index 20 mpls label 16005
★    index 30 mpls label 16006
     !
     policy EXPLICIT_PATH_POLICY
      binding-sid mpls 24365
      color 6 end-point ipv4 6.6.6.6
      autoroute
       include ipv4 6.6.6.6/32
      !
      candidate-paths
★     preference 75
★      explicit segment-list PREF_75_EXPLICIT_LIST
        !    
       !
       preference 100
        explicit segment-list EXPLICIT_LIST
        !
       !
      !
     !
    !
   !

5. 検証

SR-TE(explicit path)を実装する前はこうでした。

RP/0/RP0/CPU0:h_N1#show route | begin Gate 
Sun Mar 12 06:26:55.756 UTC
Gateway of last resort is not set

L    1.1.1.1/32 is directly connected, 5w2d, Loopback0
i L2 2.2.2.2/32 [115/20] via 10.1.2.2, 5w2d, GigabitEthernet0/0/0/0
i L2 3.3.3.3/32 [115/20] via 10.1.3.3, 02:00:01, GigabitEthernet0/0/0/2
i L2 4.4.4.4/32 [115/30] via 10.1.3.3, 01:45:48, GigabitEthernet0/0/0/2
i L2 5.5.5.5/32 [115/40] via 10.1.3.3, 01:45:48, GigabitEthernet0/0/0/2
i L2 6.6.6.6/32 [115/50] via 10.1.3.3, 01:45:20, GigabitEthernet0/0/0/2
C    10.1.2.0/24 is directly connected, 5w2d, GigabitEthernet0/0/0/0
L    10.1.2.1/32 is directly connected, 5w2d, GigabitEthernet0/0/0/0
C    10.1.3.0/24 is directly connected, 5w2d, GigabitEthernet0/0/0/2
L    10.1.3.1/32 is directly connected, 5w2d, GigabitEthernet0/0/0/2
i L2 10.2.3.0/24 [115/20] via 10.1.2.2, 01:48:33, GigabitEthernet0/0/0/0
                 [115/20] via 10.1.3.3, 01:48:33, GigabitEthernet0/0/0/2
i L2 10.2.4.0/24 [115/30] via 10.1.3.3, 01:45:48, GigabitEthernet0/0/0/2
i L2 10.3.4.0/24 [115/20] via 10.1.3.3, 02:00:01, GigabitEthernet0/0/0/2
i L2 10.3.5.0/24 [115/40] via 10.1.3.3, 01:45:48, GigabitEthernet0/0/0/2
i L2 10.4.5.0/24 [115/30] via 10.1.3.3, 01:45:48, GigabitEthernet0/0/0/2
i L2 10.4.6.0/24 [115/50] via 10.1.3.3, 01:45:20, GigabitEthernet0/0/0/2
i L2 10.5.6.0/24 [115/40] via 10.1.3.3, 01:45:20, GigabitEthernet0/0/0/2
L    127.0.0.0/8 [0/0] via 0.0.0.0, 5w2d
RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una
Sun Mar 12 06:27:17.857 UTC

Interface                      IP-Address      Status          Protocol Vrf-Name
Loopback0                      1.1.1.1         Up              Up       default 
GigabitEthernet0/0/0/0         10.1.2.1        Up              Up       default 
GigabitEthernet0/0/0/2         10.1.3.1        Up              Up       default 
RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1
Sun Mar 12 06:27:50.065 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.3.3 [MPLS: Label 16006 Exp 0] 21 msec  4 msec  3 msec 
 2  10.3.4.4 [MPLS: Label 16006 Exp 0] 6 msec  3 msec  3 msec 
 3  10.4.5.5 [MPLS: Label 16006 Exp 0] 6 msec  4 msec  3 msec 
 4  10.5.6.6 9 msec  *  6 msec 
RP/0/RP0/CPU0:h_N1#

SR-TEを定義すると新しいインターフェース(SR-TE用のLSP)が出現します。

  RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una
  Sun Mar 12 08:21:57.825 UTC
  
  Interface                      IP-Address      Status          Protocol Vrf-Name
★srte_c_6_ep_6.6.6.6            1.1.1.1         Up              Up       default 
  Loopback0                      1.1.1.1         Up              Up       default 
  GigabitEthernet0/0/0/0         10.1.2.1        Up              Up       default 
  GigabitEthernet0/0/0/2         10.1.3.1        Up              Up       default 
  RP/0/RP0/CPU0:h_N1#

今回定義したSR-TEポリシーは、Head-End:1.1.1.1(h_N1)、color:6、Tail-End:6.6.6.6(h_N6)です。 ルーティングテーブルにその変化が現れています。

  RP/0/RP0/CPU0:h_N1#show route | begin Gate
  Sun Mar 12 08:24:22.206 UTC
  Gateway of last resort is not set
  
  L    1.1.1.1/32 is directly connected, 5w2d, Loopback0
  i L2 2.2.2.2/32 [115/20] via 10.1.2.2, 5w2d, GigabitEthernet0/0/0/0
  i L2 3.3.3.3/32 [115/20] via 10.1.3.3, 03:57:27, GigabitEthernet0/0/0/2
  i L2 4.4.4.4/32 [115/30] via 10.1.3.3, 03:43:15, GigabitEthernet0/0/0/2
  i L2 5.5.5.5/32 [115/40] via 10.1.3.3, 03:43:15, GigabitEthernet0/0/0/2
★i L2 6.6.6.6/32 [115/50] via 6.6.6.6, 00:20:26, srte_c_6_ep_6.6.6.6
  C    10.1.2.0/24 is directly connected, 5w2d, GigabitEthernet0/0/0/0
  L    10.1.2.1/32 is directly connected, 5w2d, GigabitEthernet0/0/0/0
  C    10.1.3.0/24 is directly connected, 5w2d, GigabitEthernet0/0/0/2
  L    10.1.3.1/32 is directly connected, 5w2d, GigabitEthernet0/0/0/2
  i L2 10.2.3.0/24 [115/20] via 10.1.2.2, 03:45:59, GigabitEthernet0/0/0/0
                   [115/20] via 10.1.3.3, 03:45:59, GigabitEthernet0/0/0/2
  i L2 10.2.4.0/24 [115/30] via 10.1.3.3, 03:43:15, GigabitEthernet0/0/0/2
  i L2 10.3.4.0/24 [115/20] via 10.1.3.3, 03:57:27, GigabitEthernet0/0/0/2
  i L2 10.3.5.0/24 [115/40] via 10.1.3.3, 03:43:15, GigabitEthernet0/0/0/2
  i L2 10.4.5.0/24 [115/30] via 10.1.3.3, 03:43:15, GigabitEthernet0/0/0/2
  i L2 10.4.6.0/24 [115/50] via 10.1.3.3, 00:20:26, GigabitEthernet0/0/0/2
  i L2 10.5.6.0/24 [115/40] via 10.1.3.3, 03:42:46, GigabitEthernet0/0/0/2
  L    127.0.0.0/8 [0/0] via 0.0.0.0, 5w2d
  RP/0/RP0/CPU0:h_N1# 

Head-End:1.1.1.1(h_N1)の LFIB を確認すると、 SR-TEの NEXT_HOP やTail-End、B-SID(任意):24365も確認できます。 SR-TE(EXPLICIT_PATH_POLICY)
・Head-End:1.1.1.1(h_N1)
・NEXT_HOP:10.1.3.3(Gi0/0/0/2)
・B-SID :24365

  RP/0/RP0/CPU0:h_N1#show mpls forwarding 
  Sun Mar 12 15:37:01.656 UTC
  Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
  Label  Label       or ID              Interface                    Switched    
  ------ ----------- ------------------ ------------ --------------- ------------
  16002  Pop         SR Pfx (idx 2)     Gi0/0/0/0    10.1.2.2        0           
  16003  Pop         SR Pfx (idx 3)     Gi0/0/0/2    10.1.3.3        0           
  16004  16004       SR Pfx (idx 4)     Gi0/0/0/2    10.1.3.3        0           
  16005  16005       SR Pfx (idx 5)     Gi0/0/0/2    10.1.3.3        0           
  16006  16006       SR Pfx (idx 6)     Gi0/0/0/2    10.1.3.3        0           
  24000  Pop         SR Adj (idx 1)     Gi0/0/0/0    10.1.2.2        0           
  24001  Pop         SR Adj (idx 3)     Gi0/0/0/0    10.1.2.2        0           
  24002  Pop         SR Adj (idx 1)     Gi0/0/0/2    10.1.3.3        0           
  24003  Pop         SR Adj (idx 3)     Gi0/0/0/2    10.1.3.3        0           
  24004  Pop         No ID              Gi0/0/0/2    10.1.3.3        0           
  24005  16002       SR TE: 1 [TE-INT]  Gi0/0/0/2    10.1.3.3        0           
★24006  Pop         6.6.6.6/32         srte_c_6_ep_ 6.6.6.6         0           
★24365  Pop         No ID              srte_c_6_ep_ point2point     0           
  RP/0/RP0/CPU0:h_N1#

CEFを確認するとSR-TEで定義した内容が反映されています。他のLoopbackアドレスと見比べると分かりやすいかと思います。
SR-TEのautorouteが効いています。他のLoopbackアドレスだとNEXT_HOPがインターフェース名ですが、Head-End宛だけがSR-TEになっています。

  RP/0/RP0/CPU0:h_N1#show cef                   
  Sun Mar 12 08:38:47.294 UTC
  
  Prefix              Next Hop            Interface
  ------------------- ------------------- ------------------
  0.0.0.0/0           drop                default handler 
  0.0.0.0/32          broadcast
  1.1.1.1/32          receive             Loopback0
  2.2.2.2/32          10.1.2.2/32         GigabitEthernet0/0/0/0
  3.3.3.3/32          10.1.3.3/32         GigabitEthernet0/0/0/2
  4.4.4.4/32          10.1.3.3/32         GigabitEthernet0/0/0/2
  5.5.5.5/32          10.1.3.3/32         GigabitEthernet0/0/0/2
★6.6.6.6/32          6.6.6.6/32          srte_c_6_ep_6.6.6.6
  10.1.2.0/24         attached            GigabitEthernet0/0/0/0
  10.1.2.0/32         broadcast           GigabitEthernet0/0/0/0
  10.1.2.1/32         receive             GigabitEthernet0/0/0/0
  10.1.2.255/32       broadcast           GigabitEthernet0/0/0/0
  10.1.3.0/24         attached            GigabitEthernet0/0/0/2
  10.1.3.0/32         broadcast           GigabitEthernet0/0/0/2
  10.1.3.1/32         receive             GigabitEthernet0/0/0/2
  10.1.3.255/32       broadcast           GigabitEthernet0/0/0/2
  10.2.3.0/24         10.1.2.2/32         GigabitEthernet0/0/0/0
                      10.1.3.3/32         GigabitEthernet0/0/0/2
  10.2.4.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  10.3.4.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  10.3.5.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  10.4.5.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  10.4.6.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  10.5.6.0/24         10.1.3.3/32         GigabitEthernet0/0/0/2
  127.0.0.0/8         receive
  224.0.0.0/4         0.0.0.0/32          
  224.0.0.0/24        receive
  255.255.255.255/32  broadcast
  RP/0/RP0/CPU0:h_N1#

SR-TE ポリシーの情報はコマンドで確認することができます。

   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy 
   Sun Mar 12 08:48:06.458 UTC
   
   SR-TE policy database
   ---------------------
   
   Color: 6, End-point: 6.6.6.6
★1  Name: srte_c_6_ep_6.6.6.6
     Status:
       Admin: up  Operational: up for 00:09:06 (since Mar 12 15:33:13.248)
     Candidate-paths:
★2    Preference: 100 (configuration) (active)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
★3      Explicit: segment-list EXPLICIT_LIST (valid)
           Weight: 1, Metric Type: TE
             16003 [Prefix-SID, 3.3.3.3]
             16002
             24365
             16005
             16006
       Preference: 75 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
★4      Explicit: segment-list PREF_75_EXPLICIT_LIST (invalid)
           Weight: 1, Metric Type: TE
     Attributes:
★5    Binding SID: 24365
       Forward Class: Not Configured
       Steering labeled-services disabled: no
       Steering BGP disabled: no
       IPv6 caps enable: yes
       Invalidation drop enabled: no
   
   RP/0/RP0/CPU0:h_N1#

★1:Color と End-point(Head-End) が自動的にLSP名に反映されるのが特徴です。
SR-TE LSP名(Name: srte_c_6_ep_6.6.6.6)から、Color: 6, End-point: 6.6.6.6であることが分かります。
★2:Preference は大きい方が優先されます!
★3:有効な segment-list は、EXPLICIT_LIST (valid)です。
★4:Preference: 75 の segment-list である PREF_75_EXPLICIT_LIST (invalid) は無効になっています。
★5:このSR-TEに紐づけられているBinding SIDは、 24365 であることが分かります。

今回指定したBinding SIDを基にforwarding情報を確認すると似た内容を確認することができます。

   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy binding-sid 24365
   Sun Mar 12 09:02:42.966 UTC
   
   SR-TE Policy Forwarding database
   --------------------------------
   
   Color: 6, End-point: 6.6.6.6
★1  Name: srte_c_6_ep_6.6.6.6
★2  Binding SID: 24365
     Active LSP:
★3    Candidate path:
         Preference: 100 (configuration)
         Name: EXPLICIT_PATH_POLICY
       Local label: 24005
       Segment lists:
         SL[0]:
           Name: EXPLICIT_LIST
           Switched Packets/Bytes: 0/0
           Paths:
             Path[0]:
               Outgoing Label: 16002
               Outgoing Interfaces: GigabitEthernet0/0/0/2
★4            Next Hop: 10.1.3.3
               Switched Packets/Bytes: 0/0
               FRR Pure Backup: No
               ECMP/LFA Backup: No
               Internal Recursive Label: Unlabelled (recursive)
★5            Label Stack (Top -> Bottom): { 16002, 24365, 16005, 16006 }
               Path-id: 1, Weight: 64
   
     Policy Packets/Bytes Switched: 0/0
   
   RP/0/RP0/CPU0:h_N1#

★1:Color と End-point(Head-End) が自動的にLSP名に反映されるのが特徴です。
SR-TE LSP名(Name: srte_c_6_ep_6.6.6.6)から、Color: 6, End-point: 6.6.6.6であることが分かります。
★2:このSR-TEに紐づけられているBinding SIDは、 24365 であることが分かります。
★3:今回選ばれた Preference は100で、有効な segment-list は、EXPLICIT_LIST (valid)です。
★4:NEXT_HOP は10.1.3.3(h_N3)です。
★5:segment-list は、EXPLICIT_LIST とおりに Label Stack していることが見て取れます。

疎通確認をすると想定通りの経路をたどっていることが分かります。

RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source loopback 0     
Sun Mar 12 15:48:01.386 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.3.3 [MPLS: Labels 16002/24365/16005/16006 Exp 0] 51 msec  5 msec  3 msec 
 2  10.2.3.2 [MPLS: Labels 24365/16005/16006 Exp 0] 6 msec  5 msec  4 msec 
 3  10.2.4.4 [MPLS: Labels 16005/16006 Exp 0] 14 msec  4 msec  11 msec 
 4  10.4.5.5 [MPLS: Label 16006 Exp 0] 8 msec  3 msec  3 msec 
 5  10.5.6.6 13 msec  *  6 msec 
RP/0/RP0/CPU0:h_N1#

6. SR-TE はいつダウンするのか

Head-End の冗長性を増強するため TI-LFA を設定します。

router isis 1
 interface GigabitEthernet 0/0/0/0
  point-to-point
  address-famili ipv4 unicast
   fast-reroute per-prefix
   fast-reroute per-prefix ti-lfa
  !
 !
 interface GigabitEthernet 0/0/0/2
  point-to-point
  address-famili ipv4 unicast
   fast-reroute per-prefix
   fast-reroute per-prefix ti-lfa
  !
 !

前半は先ほどのコマンドと同じですが、後半に Protected と Pure-Backup があることが分かります。

   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail 
   Sun Mar 12 15:50:42.782 UTC
   
   SR-TE Policy Forwarding database
   --------------------------------
   
   Color: 6, End-point: 6.6.6.6
     Name: srte_c_6_ep_6.6.6.6
     Binding SID: 24365
     Active LSP:
       Candidate path:
         Preference: 100 (configuration)
         Name: EXPLICIT_PATH_POLICY
       Local label: 24005
       Segment lists:
         SL[0]:
           Name: EXPLICIT_LIST
           Switched Packets/Bytes: 15/420
             [MPLS -> MPLS]: 15/420
           Paths:
             Path[0]:
               Outgoing Label: 16002
               Outgoing Interfaces: GigabitEthernet0/0/0/2
               Next Hop: 10.1.3.3
               Switched Packets/Bytes: 15/420
                 [MPLS -> MPLS]: 15/420
               FRR Pure Backup: No
               ECMP/LFA Backup: No
               Internal Recursive Label: Unlabelled (recursive)
               Label Stack (Top -> Bottom): { 16002, 24365, 16005, 16006 }
               Path-id: 1, Weight: 64
     Reoptimized LSP:
       Candidate path:
         Preference: 100 (configuration)
         Name: EXPLICIT_PATH_POLICY
       Local label: 24008
       Segment lists:
         SL[0]:
           Name: EXPLICIT_LIST
           Switched Packets/Bytes: 0/0
           Paths:
             Path[0]:
★1            Outgoing Label: 16003
★2            Outgoing Interfaces: GigabitEthernet0/0/0/0
★3            Next Hop: 10.1.2.2
               Switched Packets/Bytes: 0/0
               FRR Pure Backup: Yes
               ECMP/LFA Backup: Yes
               Internal Recursive Label: Unlabelled (recursive)
★4            Label Stack (Top -> Bottom): { 16003, 16002, 24365, 16005, 16006 }
★5            Path-id: 1 (Pure-Backup), Weight: 64
             Path[1]:
★6            Outgoing Label: 16002
★7            Outgoing Interfaces: GigabitEthernet0/0/0/2
★8            Next Hop: 10.1.3.3
               Switched Packets/Bytes: 0/0
               FRR Pure Backup: No
               ECMP/LFA Backup: No
               Internal Recursive Label: Unlabelled (recursive)
★9            Label Stack (Top -> Bottom): { 16002, 24365, 16005, 16006 }
★10           Path-id: 2 (Protected), Backup-path-id: 1, Weight: 64
   
     Policy Packets/Bytes Switched: 15/420
   
   RP/0/RP0/CPU0:h_N1#

★1-5 Backup経路情報
★1: Outgoing Label: 16003
★2: Outgoing Interfaces: GigabitEthernet0/0/0/0
★3: Next Hop: 10.1.2.2
★4: Label Stack (Top -> Bottom): { 16003, 16002, 24365, 16005, 16006 }
★5: Path-id: 1 (Pure-Backup), Weight: 64

★6-10 SR-TE(Protected)経路情報
★6: Outgoing Label: 16002
★7: Outgoing Interfaces: GigabitEthernet0/0/0/2
★8: Next Hop: 10.1.3.3
★9: Label Stack (Top -> Bottom): { 16002, 24365, 16005, 16006 }
★10: Path-id: 2 (Protected), Backup-path-id: 1, Weight: 64

TI-LFA を実装したことによる効果はグンバツです!

RP/0/RP0/CPU0:h_N1#show isis fast-reroute summary 
Sat Mar 18 21:48:41.838 UTC

IS-IS 1 IPv4 Unicast FRR summary

                          Critical   High       Medium     Low        Total     
                          Priority   Priority   Priority   Priority             
Prefixes reachable in L2
  All paths protected     0          0          4          7          11        
  Some paths protected    0          0          0          0          0         
  Unprotected             0          0          1          0          1         
  Protection coverage     0.00%      0.00%      80.00%     100.00%    91.67%    
RP/0/RP0/CPU0:h_N1#

ここで、h_N2-h_N4間のリンクを切断します。

TI-LFA が有効化されているのに迂回されません。

RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1
Sat Mar 18 04:05:10.898 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1   *  *  * 
 2   *  *  * 
 3   *  *  * 
 4   *  *  * 
 5   *  *  * 
 6   *  *  * 
 7   *  *  * 
 8   *  *  * 
 9   *  *  * 
 10  *  *  * 
 11  *  *  * 
 12  *  *  * 
 13  *  *  * 
 14  *  *  * 
 15  *  *  * 
 16  *  *  * 
 17  *  *  * 
 18  *  *  * 
 19  *  *  * 
 20  *  *  * 
 21  *  *  * 
 22  *  *  * 
 23  *  *  * 
 24  *  *  * 
 25  *  *  * 
 26  *  *  * 
 27  *  *  * 
 28  *  *  * 
 29  *  *  * 
 30  *  *  * 
RP/0/RP0/CPU0:h_N1#


これは、Explicit Path で指定した persistence Adj-SIDs に原因があります。
Explicit Path の一部で persistence Adj-SIDs(SRLBを使ってstaticにAdj-SID)を指定しているため迂回することができなくなります。
∵ persistence Adj-SIDs:24365 を使って h_N2 から h_N4 に到達することは、リンクダウンしているインターフェース以外に存在しないためです。
これは、h_N2、h_N4、h_N5、h_N6 の Loopback0 が shutdown されても同様なことが言えます。
しかし、SR-TE は up/up(Admin: up Operational: up) の状態を維持します。

   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy 
   Sat Mar 18 04:31:59.187 UTC
   
   SR-TE policy database
   ---------------------
   
   Color: 6, End-point: 6.6.6.6
     Name: srte_c_6_ep_6.6.6.6
     Status:
★     Admin: up  Operational: up for 5d12h (since Mar 12 15:33:13.248)
     Candidate-paths:
       Preference: 100 (configuration) (active)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
☆       Explicit: segment-list EXPLICIT_LIST (valid)
           Weight: 1, Metric Type: TE
             16003 [Prefix-SID, 3.3.3.3]
             16002
             24365
             16005
             16006
       Preference: 75 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
         Explicit: segment-list PREF_75_EXPLICIT_LIST (invalid)
           Weight: 1, Metric Type: TE
     Attributes:
       Binding SID: 24365
       Forward Class: Not Configured
       Steering labeled-services disabled: no
       Steering BGP disabled: no
       IPv6 caps enable: yes
       Invalidation drop enabled: no

   RP/0/RP0/CPU0:h_N1#

ここで、h_N2-h_N4間のリンクを元に戻します。
では、どのような時にSR-TEはDownするのでしょうか。 答えは、Explicit Path の最初の SID が Down している時のようです。h_N3 の Loopback0 を shutdown します。

RP/0/RP0/CPU0:h_N3#conf
Sat Mar 18 05:06:21.651 UTC
RP/0/RP0/CPU0:h_N3(config)#interface loopback 0
RP/0/RP0/CPU0:h_N3(config-if)#shutdown 
RP/0/RP0/CPU0:h_N3(config-if)#commit 
Sat Mar 18 05:06:31.329 UTC
RP/0/RP0/CPU0:h_N3(config-if)#

Head-End(h_N1)で SR-TE の状態を確認してみます。

   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy 
   Sat Mar 18 05:08:17.818 UTC
   
   SR-TE policy database
   ---------------------
   
   Color: 6, End-point: 6.6.6.6
     Name: srte_c_6_ep_6.6.6.6
     Status:
★     Admin: up  Operational: down for 00:01:46 (since Mar 18 05:06:31.812)
     Candidate-paths:
       Preference: 100 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
☆      Explicit: segment-list EXPLICIT_LIST (invalid)
         Last error: unresolved first label (16003)
           Weight: 1, Metric Type: TE
       Preference: 75 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
☆      Explicit: segment-list PREF_75_EXPLICIT_LIST (invalid)
         Last error: unresolved first label (16003)
           Weight: 1, Metric Type: TE
     Attributes:
       Forward Class: 0
       Steering labeled-services disabled: no
       Steering BGP disabled: no
       IPv6 caps enable: no
       Invalidation drop enabled: no
   
   RP/0/RP0/CPU0:h_N1#

SR-TE が Operational: down になっているため、ルーティングテーブルにも表示しなくなります。

RP/0/RP0/CPU0:h_N1#show route | b Gate
Sat Mar 18 05:44:34.905 UTC
Gateway of last resort is not set

L    1.1.1.1/32 is directly connected, 00:57:17, Loopback0
i L2 2.2.2.2/32 [115/20] via 10.1.2.2, 5d13h, GigabitEthernet0/0/0/0
                [115/30] via 10.1.3.3, 5d13h, GigabitEthernet0/0/0/2 (!)
i L2 4.4.4.4/32 [115/40] via 10.1.2.2, 5d13h, GigabitEthernet0/0/0/0 (!)
                [115/30] via 10.1.3.3, 5d13h, GigabitEthernet0/0/0/2
i L2 5.5.5.5/32 [115/50] via 10.1.2.2, 00:59:55, GigabitEthernet0/0/0/0 (!)
                [115/40] via 10.1.3.3, 00:59:55, GigabitEthernet0/0/0/2
i L2 6.6.6.6/32 [115/60] via 10.1.2.2, 00:38:02, GigabitEthernet0/0/0/0 (!)
                [115/50] via 10.1.3.3, 00:38:02, GigabitEthernet0/0/0/2
C    10.1.2.0/24 is directly connected, 5d14h, GigabitEthernet0/0/0/0
L    10.1.2.1/32 is directly connected, 5d14h, GigabitEthernet0/0/0/0
C    10.1.3.0/24 is directly connected, 5d14h, GigabitEthernet0/0/0/2
L    10.1.3.1/32 is directly connected, 5d14h, GigabitEthernet0/0/0/2
i L2 10.2.3.0/24 [115/20] via 10.1.2.2, 00:38:02, GigabitEthernet0/0/0/0
                 [115/20] via 10.1.3.3, 00:38:02, GigabitEthernet0/0/0/2
i L2 10.2.4.0/24 [115/40] via 10.1.2.2, 5d13h, GigabitEthernet0/0/0/0 (!)
                 [115/30] via 10.1.3.3, 5d13h, GigabitEthernet0/0/0/2
i L2 10.3.4.0/24 [115/30] via 10.1.2.2, 00:38:02, GigabitEthernet0/0/0/0 (!)
                 [115/20] via 10.1.3.3, 00:38:02, GigabitEthernet0/0/0/2
i L2 10.3.5.0/24 [115/50] via 10.1.2.2, 00:59:55, GigabitEthernet0/0/0/0 (!)
                 [115/40] via 10.1.3.3, 00:59:55, GigabitEthernet0/0/0/2
i L2 10.4.5.0/24 [115/40] via 10.1.2.2, 5d13h, GigabitEthernet0/0/0/0 (!)
                 [115/30] via 10.1.3.3, 5d13h, GigabitEthernet0/0/0/2
i L2 10.4.6.0/24 [115/60] via 10.1.2.2, 00:38:02, GigabitEthernet0/0/0/0 (!)
                 [115/50] via 10.1.3.3, 00:38:02, GigabitEthernet0/0/0/2
i L2 10.5.6.0/24 [115/50] via 10.1.2.2, 00:59:55, GigabitEthernet0/0/0/0 (!)
                 [115/40] via 10.1.3.3, 00:59:55, GigabitEthernet0/0/0/2
L    127.0.0.0/8 [0/0] via 0.0.0.0, 5d14h
RP/0/RP0/CPU0:h_N1#

インターフェースもダウンしていることが分かります。

RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una
Sat Mar 18 05:46:39.979 UTC

Interface                      IP-Address      Status          Protocol Vrf-Name
srte_c_6_ep_6.6.6.6            1.1.1.1         Down            Down     default 
Loopback0                      1.1.1.1         Up              Up       default 
GigabitEthernet0/0/0/0         10.1.2.1        Up              Up       default 
GigabitEthernet0/0/0/2         10.1.3.1        Up              Up       default 
RP/0/RP0/CPU0:h_N1#

SR-TE が Operational: down となると、トラフィックは当然意図した通りに流れなくなります。

h_N3's loopback0 shutdown( when segment list of first prefix-SID DOWN)

RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1       
Sat Mar 18 05:11:29.211 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.3.3 [MPLS: Label 16006 Exp 0] 12 msec  5 msec  4 msec 
 2  10.3.4.4 [MPLS: Label 16006 Exp 0] 7 msec  4 msec  5 msec 
 3  10.4.5.5 [MPLS: Label 16006 Exp 0] 8 msec  4 msec  4 msec 
 4  10.5.6.6 11 msec  *  7 msec 
RP/0/RP0/CPU0:h_N1#


最後に、Head-End(h_N1)の Loopback0 を shutdown するとどうなるかを示して終わります。

RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una   
Sat Mar 18 21:08:32.349 UTC

Interface                      IP-Address      Status          Protocol Vrf-Name
Loopback0                      1.1.1.1         Shutdown        Down     default 
GigabitEthernet0/0/0/0         10.1.2.1        Up              Up       default 
GigabitEthernet0/0/0/2         10.1.3.1        Up              Up       default 
RP/0/RP0/CPU0:h_N1#  
RP/0/RP0/CPU0:h_N1#show route | begin Gate
Sat Mar 18 21:08:58.024 UTC
Gateway of last resort is not set

i L2 2.2.2.2/32 [115/20] via 10.1.2.2, 6d05h, GigabitEthernet0/0/0/0
                [115/30] via 10.1.3.3, 6d05h, GigabitEthernet0/0/0/2 (!)
i L2 3.3.3.3/32 [115/30] via 10.1.2.2, 09:13:25, GigabitEthernet0/0/0/0 (!)
                [115/20] via 10.1.3.3, 09:13:25, GigabitEthernet0/0/0/2
i L2 4.4.4.4/32 [115/40] via 10.1.2.2, 6d05h, GigabitEthernet0/0/0/0 (!)
                [115/30] via 10.1.3.3, 6d05h, GigabitEthernet0/0/0/2
i L2 5.5.5.5/32 [115/50] via 10.1.2.2, 00:43:32, GigabitEthernet0/0/0/0 (!)
                [115/40] via 10.1.3.3, 00:43:32, GigabitEthernet0/0/0/2
i L2 6.6.6.6/32 [115/60] via 10.1.2.2, 00:43:15, GigabitEthernet0/0/0/0 (!)
                [115/50] via 10.1.3.3, 00:43:15, GigabitEthernet0/0/0/2
C    10.1.2.0/24 is directly connected, 6d05h, GigabitEthernet0/0/0/0
L    10.1.2.1/32 is directly connected, 6d05h, GigabitEthernet0/0/0/0
C    10.1.3.0/24 is directly connected, 6d05h, GigabitEthernet0/0/0/2
L    10.1.3.1/32 is directly connected, 6d05h, GigabitEthernet0/0/0/2
i L2 10.2.3.0/24 [115/20] via 10.1.2.2, 09:13:25, GigabitEthernet0/0/0/0
                 [115/20] via 10.1.3.3, 09:13:25, GigabitEthernet0/0/0/2
i L2 10.2.4.0/24 [115/40] via 10.1.2.2, 6d05h, GigabitEthernet0/0/0/0 (!)
                 [115/30] via 10.1.3.3, 6d05h, GigabitEthernet0/0/0/2
i L2 10.3.4.0/24 [115/30] via 10.1.2.2, 09:13:25, GigabitEthernet0/0/0/0 (!)
                 [115/20] via 10.1.3.3, 09:13:25, GigabitEthernet0/0/0/2
i L2 10.3.5.0/24 [115/50] via 10.1.2.2, 00:43:32, GigabitEthernet0/0/0/0 (!)
                 [115/40] via 10.1.3.3, 00:43:32, GigabitEthernet0/0/0/2
i L2 10.4.5.0/24 [115/40] via 10.1.2.2, 6d05h, GigabitEthernet0/0/0/0 (!)
                 [115/30] via 10.1.3.3, 6d05h, GigabitEthernet0/0/0/2
i L2 10.4.6.0/24 [115/60] via 10.1.2.2, 00:43:15, GigabitEthernet0/0/0/0 (!)
                 [115/50] via 10.1.3.3, 00:43:15, GigabitEthernet0/0/0/2
i L2 10.5.6.0/24 [115/50] via 10.1.2.2, 00:43:32, GigabitEthernet0/0/0/0 (!)
                 [115/40] via 10.1.3.3, 00:43:32, GigabitEthernet0/0/0/2
L    127.0.0.0/8 [0/0] via 0.0.0.0, 6d05h
RP/0/RP0/CPU0:h_N1#
   RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy 
   Sat Mar 18 21:09:12.783 UTC
   
   SR-TE policy database
   ---------------------
   
   Color: 6, End-point: 6.6.6.6
     Name: srte_c_6_ep_6.6.6.6
     Status:
★     Admin: up  Operational: down for 00:43:30 (since Mar 18 20:25:42.419)
     Candidate-paths:
       Preference: 100 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
☆       Explicit: segment-list EXPLICIT_LIST (invalid)
           Weight: 1, Metric Type: TE
       Preference: 75 (configuration)
         Name: EXPLICIT_PATH_POLICY
         Requested BSID: 24365
           Protection Type: protected-preferred
           Maximum SID Depth: 10 
☆       Explicit: segment-list PREF_75_EXPLICIT_LIST (invalid)
         Last error: unresolved first label (16003)
           Weight: 1, Metric Type: TE
     Attributes:
       Forward Class: 0
       Steering labeled-services disabled: no
       Steering BGP disabled: no
       IPv6 caps enable: no
       Invalidation drop enabled: no
   
   RP/0/RP0/CPU0:h_N1#

当然のことながら、SR-TE が Operational: down となり、トラフィックも流れません。

7. 参考

① Configure SR-TE Policy with Explicit Path www.cisco.com

② Segment Routing Traffic Engineering – Explicit Candidate Path y-network.jp

次回は、WECMP(重みづけ等コストロードバランシング)について記事を書きます。
最後までお読みいただきありがとうございました!