Single-Domain SR-TE その4(Dynamic SR-TE)
Dynamic SR-TE が理解できたので自分のメモ用にアウトプットします。
- 1. Dynamic SR-TE
- 2. Topology
- 3. Config
- 4.下準備(各種メトリックの仕込み)
- 5. SR-TE の実装
- 5.2 Head-End(h_N1)
- 6. 検証
- 7. 検証から得られたこと
- 8. 参考
1. Dynamic SR-TE
動的に生成する SR-TE
2. Topology
3. Config
◆h_N1(Head-End:hopcount)
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 distribute link-state level 2 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 1 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric type hopcount ! ! ! ! ! ! ! end
◆h_N1(Head-End:igp)
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 distribute link-state level 2 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 1 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric type igp ! ! ! ! ! ! ! end
◆h_N1(Head-End:latency)
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 distribute link-state level 2 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 1 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric type latency ! ! ! ! ! ! ! end
◆h_N1(Head-End:te)
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 distribute link-state level 2 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 1 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric type te ! ! ! ! ! ! ! end
◆h_N2(metric変更)
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 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! 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 15 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 15 ! ! ! performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 5 ! ! ! end
◆h_N3(metric変更)
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 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! 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 15 ! ! interface GigabitEthernet0/0/0/3 address-family ipv4 unicast metric 19 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 20 ! interface GigabitEthernet0/0/0/3 metric 8 ! ! ! performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 20 ! ! interface GigabitEthernet0/0/0/3 delay-measurement advertise-delay 7 ! ! ! end
◆h_N4(metric変更)
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 MgmtEth0/RP0/CPU0/0 shutdown ! 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 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 4 ! ! interface GigabitEthernet0/0/0/0 address-family ipv4 unicast metric 15 ! ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! interface GigabitEthernet0/0/0/3 address-family ipv4 unicast metric 19 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/0 metric 15 ! interface GigabitEthernet0/0/0/3 metric 8 ! ! ! performance-measurement interface GigabitEthernet0/0/0/0 delay-measurement advertise-delay 5 ! ! interface GigabitEthernet0/0/0/3 delay-measurement advertise-delay 7 ! ! ! end
◆h_N5(metric変更)
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 MgmtEth0/RP0/CPU0/0 shutdown ! 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 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 5 ! ! interface GigabitEthernet0/0/0/0 address-family ipv4 unicast metric 15 ! ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/0 metric 20 ! ! ! performance-measurement interface GigabitEthernet0/0/0/0 delay-measurement advertise-delay 20 ! ! ! 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 MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.4.6.6 255.255.255.0 ! interface GigabitEthernet0/0/0/1 shutdown ! 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 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 6 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng ! ! end
4.下準備(各種メトリックの仕込み)
4.1 IGP(Default 10)
IGP で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で IGP(ISIS)のメトリックを定義
RP/0/RP0/CPU0:h_N2(config)#router isis 1 RP/0/RP0/CPU0:h_N2(config-isis)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-isis-if)#address-family ipv4 unicast RP/0/RP0/CPU0:h_N2(config-isis-if-af)#metric 15 RP/0/RP0/CPU0:h_N2(config-isis-if-af)# RP/0/RP0/CPU0:h_N2(config-isis-if-af)#commit
4.2 Latency(Default 10)
performance-measurement で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で advertise-delay を定義
RP/0/RP0/CPU0:h_N2(config)#? performance-measurement Enter the Performance Measurement submode RP/0/RP0/CPU0:h_N2(config-perf-meas)#? interface Enable Performance Measurement on an interface RP/0/RP0/CPU0:h_N2(config-perf-meas)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-pm-intf)#? delay-measurement Enable delay-measurement on the interface RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement ? advertise-delay Advertisement delay delay-profile Interface delay profile <cr> RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement advertise-delay ? <1-16777215> Advertisement delay (uSec) RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement advertise-delay 5 RP/0/RP0/CPU0:h_N2(config-pm-intf)#show Sat Mar 25 12:19:52.100 UTC performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 5 ! ! !
4.3 Traffic-engineering(TE:Default 10)
Segment Routing の Traffic-engineering で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で TE のメトリックを定義
RP/0/RP0/CPU0:h_N2(config)#? segment-routing Segment Routing RP/0/RP0/CPU0:h_N2(config)#segment-routing RP/0/RP0/CPU0:h_N2(config-sr)#? traffic-eng Segment Routing Traffic Engineering RP/0/RP0/CPU0:h_N2(config-sr)#traffic-eng RP/0/RP0/CPU0:h_N2(config-sr-te)#? interface Enable SR-TE on an interface(cisco-support) RP/0/RP0/CPU0:h_N2(config-sr-te)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-sr-if)#? metric Interface TE metric configuration RP/0/RP0/CPU0:h_N2(config-sr-if)#metric 5 RP/0/RP0/CPU0:h_N2(config-sr-if)# RP/0/RP0/CPU0:h_N2(config-sr-if)#show Sat Mar 25 12:25:44.443 UTC segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 5 ! ! ! RP/0/RP0/CPU0:h_N2(config-sr-if)#
残りのノードもトポロジ図で指定した通りに定義します。
5. SR-TE の実装
実装の流れは、①全ノードでSegment Routing の Traffic-engineering 有効にしてから ②Head-End で LSDBの情報をSR-TE DBに投入します。 また、③Head-End で SR-TE のポリシーを定義します。④最後に経路(Candidate-paths)のメトリックを選択します。
5.1 全ノード共通
①IGPでSegment Routing を有効にします。
忘れずに 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 ! ! !
②IGP で Traffic-engineering 有効にします。 ISIS の場合、IGP のレベルと TE のレベルを合わせます。今回の場合は、level-2-only です。
RP/0/RP0/CPU0:h_N2(config)#router isis 1 RP/0/RP0/CPU0:h_N2(config-isis)#address-family ipv4 unicast RP/0/RP0/CPU0:h_N2(config-isis-af)#? mpls Configure MPLS routing protocol parameters RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls ? traffic-eng Routing protocol commands for MPLS Traffic Engineering RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng ? level-2-only Enable mpls traffic-eng at level 2 RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng level-2-only RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls ? traffic-eng Routing protocol commands for MPLS Traffic Engineering RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng ? router-id Traffic Engineering stable IP address for system RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng router-id ? Loopback Loopback interface(s) | short name is Lo RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng router-id Loopback 0 RP/0/RP0/CPU0:h_N2(config-isis-af)#show Sat Mar 25 12:43:39.055 UTC router isis 1 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! ! RP/0/RP0/CPU0:h_N2(config-isis-af)#
③ グローバルで Segment Routing の Traffic-engineering 有効にします。
RP/0/RP0/CPU0:h_N2(config)#? segment-routing Segment Routing RP/0/RP0/CPU0:h_N2(config)#segment-routing ? traffic-eng Segment Routing Traffic Engineering RP/0/RP0/CPU0:h_N2(config)#segment-routing traffic-eng RP/0/RP0/CPU0:h_N2(config-sr-te)# RP/0/RP0/CPU0:h_N2(config-sr-te)#show Sat Mar 25 12:50:31.803 UTC segment-routing traffic-eng ! ! RP/0/RP0/CPU0:h_N2(config-sr-te)#
5.2 Head-End(h_N1)
5.2.1 LSDBの情報をSR-TE DBに投入
IGP で以下のコマンドを定義します。ISIS のインターフェースレベルに合わせます。
RP/0/RP0/CPU0:h_N1(config)#router isis 1 RP/0/RP0/CPU0:h_N1(config-isis)#? distribute Distribute routing information to external services RP/0/RP0/CPU0:h_N1(config-isis)#distribute ? link-state Distribute the link-state database to external services RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state ? level Set distribution for one level only RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state level ? <1-2> Level RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state level 2 RP/0/RP0/CPU0:h_N1(config-isis)#
5.2.2 SR-TE Policy の定義
SR-TE Policy を以下のように定義します。
a) ポリシー名 :DYNAMIC_POLICY
b) B-SID(任意):24365
c) color :6000
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 DYNAMIC_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 6000 ? end-point Policy endpoint RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6000 end-point ? ipv4 IPv4 address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6000 end-point ipv4 ? A.B.C.D IPv4 endpoint address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 6000 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
5.2.3 Candidate-paths の定義
Candidate-paths を以下のように定義します。
a) preference :100(大きい方が優先されます!)
b) type :IGP(後の検証で他のタイプも確認します。)
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)#? dynamic Dynamically allocated path RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#dynamic ? metric Path metric configuration RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#dynamic RP/0/RP0/CPU0:h_N1(config-sr-te-pp-info)#? metric Path metric configuration RP/0/RP0/CPU0:h_N1(config-sr-te-pp-info)#metric RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type ? hopcount Hopcount metric type igp IGP metric type latency Latency metric type te TE metric type RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type igp RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)# RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#show Sat Mar 25 13:10:29.595 UTC segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric type igp ! ! ! ! ! ! ! RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#
6. 検証
6.1 SR-TE 基本確認
SR-TEを定義すると新しいインターフェース(SR-TE用のLSP)が出現します。
RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una Sat Mar 25 13:20:19.636 UTC Interface IP-Address Status Protocol Vrf-Name ★srte_c_6000_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:6000、Tail-End:6.6.6.6(h_N6)です。 ルーティングにその変化が現れています。
RP/0/RP0/CPU0:h_N1#show route 6.6.6.6/32 detail Sat Mar 25 13:21:35.373 UTC Routing entry for 6.6.6.6/32 Known via "isis 1", distance 115, metric 45, labeled SR, label redist non FIB, type level-2 Installed Mar 25 13:18:55.263 for 00:02:40 Routing Descriptor Blocks ★ 6.6.6.6, from 6.6.6.6, via srte_c_6000_ep_6.6.6.6 Route metric is 45 Label: 0x3 (3) Tunnel ID: None Binding Label: 0x5f2d (24365) Extended communities count: 0 Path id:1 Path ref count:0 NHID:0x0(Ref:0) Route version is 0x77 (119) Local Label: 0x3e86 (16006) IP Precedence: Not Set QoS Group ID: Not Set Flow-tag: Not Set Fwd-class: Not Set Route Priority: RIB_PRIORITY_NON_RECURSIVE_MEDIUM (7) SVD Type RIB_SVD_TYPE_LOCAL Download Priority 1, Download Version 997 No advertising protos. 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.2.2(Gi0/0/0/0)
・NEXT_HOP:10.1.3.3(Gi0/0/0/2)
・B-SID :24365
RP/0/RP0/CPU0:h_N1#show mpls forwarding Sat Mar 25 13:23:16.892 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/0 10.1.2.2 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/0 10.1.2.2 0 16006 SR Pfx (idx 6) Gi0/0/0/2 10.1.3.3 0 24000 Pop SR Adj (idx 1) Gi0/0/0/2 10.1.3.3 0 24001 Pop SR Adj (idx 3) Gi0/0/0/2 10.1.3.3 0 24002 Pop SR Adj (idx 1) Gi0/0/0/0 10.1.2.2 0 24003 Pop SR Adj (idx 3) Gi0/0/0/0 10.1.2.2 0 24004 Pop No ID Gi0/0/0/2 10.1.3.3 0 ★24005 Pop 6.6.6.6/32 srte_c_6000_ 6.6.6.6 0 24006 Pop No ID Gi0/0/0/0 10.1.2.2 0 Pop No ID Gi0/0/0/2 10.1.3.3 0 ★24008 16006 SR TE: 3 [TE-INT] Gi0/0/0/0 10.1.2.2 0 ★ 16006 SR TE: 3 [TE-INT] Gi0/0/0/2 10.1.3.3 0 ★24365 Pop No ID srte_c_6000_ 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 Sat Mar 25 13:25:43.173 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.2.2/32 GigabitEthernet0/0/0/0 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_6000_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.2.2/32 GigabitEthernet0/0/0/0 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.2.2/32 GigabitEthernet0/0/0/0 10.1.3.3/32 GigabitEthernet0/0/0/2 10.4.6.0/24 10.1.2.2/32 GigabitEthernet0/0/0/0 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 detail Sat Mar 25 13:27:11.251 UTC SR-TE policy database --------------------- Color: 6000, End-point: 6.6.6.6 ★1 Name: srte_c_6000_ep_6.6.6.6 Status: ★2 Admin: up Operational: up for 2d01h (since Mar 23 11:59:04.043) Candidate-paths: Preference: 100 (configuration) (active) ★3 Name: DYNAMIC_POLICY ★4 Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 Dynamic (valid) ★5 Metric Type: IGP, Path Accumulated Metric: 35 ★6 16006 [Prefix-SID, 6.6.6.6] LSPs: LSP[0]: LSP-ID: 27 policy ID: 3 (active) Local label: 24008 State: Programmed Binding SID: 24365 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#
★1:Color と End-point(Head-End) が自動的にLSP名に反映されるのが特徴です。
SR-TE LSP名(Name: srte_c_6_ep_6.6.6.6)から、Color: 6000, End-point: 6.6.6.6であることが分かります。
★2:SR-TEが有効な状態を示しています。(Admin: up Operational: up)
★3:SR-TE ポリシーは、DYNAMIC_POLICY であることが分かります。
★4:このSR-TEに紐づけられているBinding SIDは、 24365 であることが分かります。
★5:Dynamic SR-TE は IGP のメトリックで計算して 最短経路が 35 であることが分かります。
★6:SID-list(今回は1つのSID)が確認できます。
metric type:IGP の場合、ECMP があればロードバランシングします。
TRACEROUTE を10回実行した結果を確認できます
RP/0/RP0/CPU0:h_N1#! 1st attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:35:59.594 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 16 msec 3 msec 3 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 7 msec 3 msec 10.2.4.4 6 msec 3 10.4.6.6 9 msec 10.5.6.6 4 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 2nd attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:03.184 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 5 msec 10.1.3.3 9 msec 3 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 3 msec 10.3.5.5 4 msec 10.2.4.4 3 msec 3 10.4.6.6 9 msec * 10.5.6.6 12 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 3rd attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:06.797 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Label 16006 Exp 0] 5 msec 10.1.2.2 4 msec 10.1.3.3 3 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 4 msec 3 msec 10.3.5.5 3 msec 3 10.5.6.6 4 msec 10.4.6.6 4 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 4th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:10.341 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Label 16006 Exp 0] 8 msec 3 msec 3 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 10 msec 3 msec 3 msec 3 10.4.6.6 10 msec 10.5.6.6 9 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 5th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:13.883 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 8 msec 6 msec 3 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 3 msec 3 msec 3 10.5.6.6 6 msec * 6 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 6th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:17.490 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 10 msec 3 msec 3 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 5 msec 10.3.5.5 4 msec 3 msec 3 10.5.6.6 4 msec * 10.4.6.6 6 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 7th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:21.075 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 5 msec 10.1.3.3 4 msec 10.1.2.2 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 3 msec 3 msec 3 msec 3 10.5.6.6 4 msec 10.4.6.6 3 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 8th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:24.590 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 5 msec 10.1.3.3 3 msec 9 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 3 msec 3 msec 10.3.5.5 3 msec 3 10.4.6.6 6 msec 10.5.6.6 3 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 9th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:28.113 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 8 msec 10.1.3.3 4 msec 10.1.2.2 3 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 3 msec 3 msec 10.2.4.4 3 msec 3 10.5.6.6 4 msec * 6 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 10th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Sat Mar 25 13:36:31.786 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 5 msec 3 msec 10.1.3.3 4 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 4 msec 3 msec 6 msec 3 10.4.6.6 4 msec 10.5.6.6 4 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#show mpls forwarding Sat Mar 25 13:36:35.379 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/0 10.1.2.2 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/0 10.1.2.2 0 16006 SR Pfx (idx 6) Gi0/0/0/2 10.1.3.3 0 24000 Pop SR Adj (idx 1) Gi0/0/0/2 10.1.3.3 0 24001 Pop SR Adj (idx 3) Gi0/0/0/2 10.1.3.3 0 24002 Pop SR Adj (idx 1) Gi0/0/0/0 10.1.2.2 0 24003 Pop SR Adj (idx 3) Gi0/0/0/0 10.1.2.2 0 24004 Pop No ID Gi0/0/0/2 10.1.3.3 0 24005 Pop 6.6.6.6/32 srte_c_6000_ 6.6.6.6 0 24006 Pop No ID Gi0/0/0/0 10.1.2.2 0 Pop No ID Gi0/0/0/2 10.1.3.3 0 24008 16006 SR TE: 3 [TE-INT] Gi0/0/0/0 10.1.2.2 1008 16006 SR TE: 3 [TE-INT] Gi0/0/0/2 10.1.3.3 1232 24365 Pop No ID srte_c_6000_ point2point 0 RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#show mpls forwarding | i "TE|Label|Next|---" Sat Mar 25 13:36:35.702 UTC Local Outgoing Prefix Outgoing Next Hop Bytes Label Label or ID Interface Switched ------ ----------- ------------------ ------------ --------------- ------------ 24008 16006 SR TE: 3 [TE-INT] Gi0/0/0/0 10.1.2.2 1008 16006 SR TE: 3 [TE-INT] Gi0/0/0/2 10.1.3.3 1232 RP/0/RP0/CPU0:h_N1#
h_N1 → h_N2 → h_N4 → h_N6 と h_N1 → h_N3 → h_N5 → h_N6 が ECMP なのでロードバランシングしています。
traceroute 以外にも SR-TE が2種類の経路をたどっていることが分かる show コマンドがあります。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy Sat Mar 25 13:55:08.022 UTC SR-TE Policy Forwarding database -------------------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Binding SID: 24365 Active LSP: Candidate path: Preference: 100 (configuration) Name: DYNAMIC_POLICY Local label: 24008 Segment lists: SL[0]: Name: dynamic Switched Packets/Bytes: 90/2520 [MPLS -> MPLS]: 90/2520 Paths: Path[0]: Outgoing Label: 16006 ★1 Outgoing Interfaces: GigabitEthernet0/0/0/0 ★2 Next Hop: 10.1.2.2 ★3 Switched Packets/Bytes: 43/1204 [MPLS -> MPLS]: 43/1204 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) ★4 Label Stack (Top -> Bottom): { 16006 } Path[1]: Outgoing Label: 16006 ★5 Outgoing Interfaces: GigabitEthernet0/0/0/2 ★6 Next Hop: 10.1.3.3 ★7 Switched Packets/Bytes: 47/1316 [MPLS -> MPLS]: 47/1316 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) ★8 Label Stack (Top -> Bottom): { 16006 } Policy Packets/Bytes Switched: 849/26852 RP/0/RP0/CPU0:h_N1#
ECMP 1つ目
★1: Outgoing Interfaces: GigabitEthernet0/0/0/0
★2: Next Hop: 10.1.2.2
★3: Switched Packets/Bytes: 43/1204
★4: Label Stack (Top -> Bottom): { 16006 }
ECMP 2つ目
★5: Outgoing Interfaces: GigabitEthernet0/0/0/2
★6: Next Hop: 10.1.3.3
★7: Switched Packets/Bytes: 47/1316
★8: Label Stack (Top -> Bottom): { 16006 }
6.2 Latency metric type
ここで、metric type:Latency に変更します。
RP/0/RP0/CPU0:h_N1(config)# RP/0/RP0/CPU0:h_N1(config)#seg tr po DYNAMIC_POLICY can pref 100 dy metric RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type latency RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#show Sat Mar 25 14:04:26.690 UTC segment-routing traffic-eng policy DYNAMIC_POLICY candidate-paths preference 100 dynamic metric type latency ! ! ! ! ! ! ! RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#
インターフェースの状態、ルーティングテーブル、CEFは変化がありませんが、LFIBに変化が現れます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding Sat Mar 25 14:09:15.276 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/0 10.1.2.2 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/0 10.1.2.2 0 16006 SR Pfx (idx 6) Gi0/0/0/2 10.1.3.3 0 24000 Pop SR Adj (idx 1) Gi0/0/0/2 10.1.3.3 0 24001 Pop SR Adj (idx 3) Gi0/0/0/2 10.1.3.3 0 24002 Pop SR Adj (idx 1) Gi0/0/0/0 10.1.2.2 0 24003 Pop SR Adj (idx 3) Gi0/0/0/0 10.1.2.2 0 24004 Pop No ID Gi0/0/0/2 10.1.3.3 0 24005 Pop 6.6.6.6/32 srte_c_6000_ 6.6.6.6 0 24006 Pop No ID Gi0/0/0/0 10.1.2.2 0 Pop No ID Gi0/0/0/2 10.1.3.3 0 24007 Pop No ID Gi0/0/0/0 10.1.2.2 0 ★ 24009 24003 SR TE: 3 [TE-INT] Gi0/0/0/0 10.1.2.2 252 24365 Pop No ID srte_c_6000_ point2point 0 RP/0/RP0/CPU0:h_N1#
Delay の合計が最も小さい経路のみに SR-TE が動的に変化します。
SR-TE ポリシーにもその変化は現れます。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy Sat Mar 25 14:14:03.448 UTC SR-TE policy database --------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Status: Admin: up Operational: up for 2d02h (since Mar 23 11:59:04.043) Candidate-paths: Preference: 100 (configuration) (active) Name: DYNAMIC_POLICY Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 Dynamic (valid) ★1 Metric Type: LATENCY, Path Accumulated Metric: 25 ★2 16002 [Prefix-SID, 2.2.2.2] ★2 24003 [Adjacency-SID, 10.2.4.2 - 10.2.4.4] ★2 16006 [Prefix-SID, 6.6.6.6] 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#
★1:Dynamic SR-TE は LATENCY のメトリックで計算して 最短経路が 25 であることが分かります。
★2:SID-list(今回は3つのSID)が確認できます。
今回は ECMP がありませんが、Metric Type: LATENCY は ECMP があってもロードバランシングしません。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1 Sat Mar 25 15:09:49.591 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 24003/16006 Exp 0] 10 msec 5 msec 4 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 7 msec 5 msec 4 msec 3 10.4.6.6 11 msec * 7 msec RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail Sat Mar 25 15:11:25.046 UTC SR-TE Policy Forwarding database -------------------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Binding SID: 24365 Active LSP: Candidate path: Preference: 100 (configuration) Name: DYNAMIC_POLICY Local label: 24009 Segment lists: SL[0]: Name: dynamic Switched Packets/Bytes: 18/504 [MPLS -> MPLS]: 18/504 Paths: Path[0]: Outgoing Label: 24003 Outgoing Interfaces: GigabitEthernet0/0/0/0 Next Hop: 10.1.2.2 Switched Packets/Bytes: 18/504 [MPLS -> MPLS]: 18/504 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) Label Stack (Top -> Bottom): { 24003, 16006 } Path-id: 1, Weight: 64 Policy Packets/Bytes Switched: 867/27356 RP/0/RP0/CPU0:h_N1#
6.3 TE metric type
ここで、metric type:TE に変更します。
RP/0/RP0/CPU0:h_N1(config)#seg tr po DYNAMIC_POLICY can pref 100 dy metric RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type te RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)# RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#show Sat Mar 25 15:17:53.534 UTC segment-routing traffic-eng policy DYNAMIC_POLICY candidate-paths preference 100 dynamic metric type te ! ! ! ! ! ! ! RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#
インターフェースの状態、ルーティングテーブル、CEFは変化がありませんが、LFIBに変化が現れます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding Sat Mar 25 15:24:27.700 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/0 10.1.2.2 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/0 10.1.2.2 0 16006 SR Pfx (idx 6) Gi0/0/0/2 10.1.3.3 0 24000 Pop SR Adj (idx 1) Gi0/0/0/2 10.1.3.3 0 24001 Pop SR Adj (idx 3) Gi0/0/0/2 10.1.3.3 0 24002 Pop SR Adj (idx 1) Gi0/0/0/0 10.1.2.2 0 24003 Pop SR Adj (idx 3) Gi0/0/0/0 10.1.2.2 0 24004 Pop No ID Gi0/0/0/2 10.1.3.3 0 24005 Pop 6.6.6.6/32 srte_c_6000_ 6.6.6.6 0 24007 Pop No ID Gi0/0/0/0 10.1.2.2 0 ★ 24008 24003 SR TE: 3 [TE-INT] Gi0/0/0/2 10.1.3.3 0 24365 Pop No ID srte_c_6000_ point2point 0 RP/0/RP0/CPU0:h_N1#
TE の合計が最も小さい経路のみに SR-TE が動的に変化します。
SR-TE ポリシーにもその変化は現れます。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy Sat Mar 25 15:23:37.567 UTC SR-TE policy database --------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Status: Admin: up Operational: up for 2d03h (since Mar 23 11:59:04.043) Candidate-paths: Preference: 100 (configuration) (active) Name: DYNAMIC_POLICY Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 Dynamic (valid) ★1 Metric Type: TE, Path Accumulated Metric: 28 ★2 16003 [Prefix-SID, 3.3.3.3] ★2 24003 [Adjacency-SID, 10.3.4.3 - 10.3.4.4] ★2 16006 [Prefix-SID, 6.6.6.6] 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#
★1:Dynamic SR-TE は TE のメトリックで計算して 最短経路が 28 であることが分かります。
★2:SID-list(今回は3つのSID)が確認できます。
今回は ECMP がありませんが、Metric Type: TE は ECMP があってもロードバランシングしません。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1 Sat Mar 25 15:36:46.353 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 24003/16006 Exp 0] 10 msec 4 msec 3 msec 2 10.3.4.4 [MPLS: Label 16006 Exp 0] 6 msec 4 msec 4 msec 3 10.4.6.6 9 msec * 6 msec RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail Sat Mar 25 15:37:21.286 UTC SR-TE Policy Forwarding database -------------------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Binding SID: 24365 Active LSP: Candidate path: Preference: 100 (configuration) Name: DYNAMIC_POLICY Local label: 24008 Segment lists: SL[0]: Name: dynamic Switched Packets/Bytes: 9/252 [MPLS -> MPLS]: 9/252 Paths: Path[0]: Outgoing Label: 24003 Outgoing Interfaces: GigabitEthernet0/0/0/2 Next Hop: 10.1.3.3 Switched Packets/Bytes: 9/252 [MPLS -> MPLS]: 9/252 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) Label Stack (Top -> Bottom): { 24003, 16006 } Path-id: 1, Weight: 64 Policy Packets/Bytes Switched: 876/27608 RP/0/RP0/CPU0:h_N1#
6.4 Hopcount metric type
ここで、metric type:Hopcount に変更します。
RP/0/RP0/CPU0:h_N1(config)#seg tr po DYNAMIC_POLICY can pref 100 dy met RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type hopcount RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)# RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#show Sun Mar 26 00:56:58.805 UTC segment-routing traffic-eng policy DYNAMIC_POLICY candidate-paths preference 100 dynamic metric type hopcount ! ! ! ! ! ! ! RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#
インターフェースの状態、ルーティングテーブル、CEFは変化がありませんが、LFIBに変化が現れます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding Sun Mar 26 00:58:47.140 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/0 10.1.2.2 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/0 10.1.2.2 0 16006 SR Pfx (idx 6) Gi0/0/0/2 10.1.3.3 0 24000 Pop SR Adj (idx 1) Gi0/0/0/2 10.1.3.3 0 24001 Pop SR Adj (idx 3) Gi0/0/0/2 10.1.3.3 0 24002 Pop SR Adj (idx 1) Gi0/0/0/0 10.1.2.2 0 24003 Pop SR Adj (idx 3) Gi0/0/0/0 10.1.2.2 0 24004 Pop No ID Gi0/0/0/2 10.1.3.3 0 24005 Pop 6.6.6.6/32 srte_c_6000_ 6.6.6.6 0 24006 Pop No ID Gi0/0/0/0 10.1.2.2 0 ★ 24007 16006 SR TE: 3 [TE-INT] Gi0/0/0/0 10.1.2.2 252 24365 Pop No ID srte_c_6000_ point2point 0 RP/0/RP0/CPU0:h_N1#
SR-TE ポリシーも当然変化します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy Sun Mar 26 01:03:14.514 UTC SR-TE policy database --------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Status: Admin: up Operational: up for 2d13h (since Mar 23 11:59:04.043) Candidate-paths: Preference: 100 (configuration) (active) Name: DYNAMIC_POLICY Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 Dynamic (valid) ★1 Metric Type: HOPCOUNT, Path Accumulated Metric: 3 ★2 16002 [Prefix-SID, 2.2.2.2] ★2 16006 [Prefix-SID, 6.6.6.6] 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#
★1:Dynamic SR-TE は HOPCOUNT のメトリックで計算して 最短が 3 HOP であることが分かります。
★2:SID-list(今回は2つのSID)が確認できます。
hopcount 3 で ECMP がありますが、ロードバランシングしません。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source 1.1.1.1 Sun Mar 26 00:59:52.287 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Label 16006 Exp 0] 11 msec 16 msec 4 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 6 msec 3 msec 3 msec 3 10.4.6.6 10 msec * 6 msec RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy Sun Mar 26 01:04:30.407 UTC SR-TE Policy Forwarding database -------------------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Binding SID: 24365 Active LSP: Candidate path: Preference: 100 (configuration) Name: DYNAMIC_POLICY Local label: 24007 Segment lists: SL[0]: Name: dynamic Switched Packets/Bytes: 18/504 [MPLS -> MPLS]: 18/504 Paths: Path[0]: Outgoing Label: 16006 Outgoing Interfaces: GigabitEthernet0/0/0/0 Next Hop: 10.1.2.2 Switched Packets/Bytes: 18/504 [MPLS -> MPLS]: 18/504 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) Label Stack (Top -> Bottom): { 16006 } Policy Packets/Bytes Switched: 894/28112 RP/0/RP0/CPU0:h_N1#
7. 検証から得られたこと
Dynamic SR-TE には Metric Type に複数対応していて IGP だけが ECMP をロードバランシングする。
RP/0/RP0/CPU0:h_N1(config-sr-te-path-metric)#type ? hopcount Hopcount metric type igp IGP metric type latency Latency metric type te TE metric type
最後に検証し忘れていたが、Metric Type を指定しないと TE になります。
segment-routing traffic-eng policy DYNAMIC_POLICY binding-sid mpls 24365 color 6000 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 dynamic metric ! ! ! ! ! ! ! RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy Sun Mar 26 03:09:03.804 UTC SR-TE policy database --------------------- Color: 6000, End-point: 6.6.6.6 Name: srte_c_6000_ep_6.6.6.6 Status: Admin: up Operational: up for 2d15h (since Mar 23 11:59:04.043) Candidate-paths: Preference: 100 (configuration) (active) Name: DYNAMIC_POLICY Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 Dynamic (valid) ★ Metric Type: TE, Path Accumulated Metric: 28 16003 [Prefix-SID, 3.3.3.3] 24003 [Adjacency-SID, 10.3.4.3 - 10.3.4.4] 16006 [Prefix-SID, 6.6.6.6] 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#
8. 参考
① Dynamic Paths
www.cisco.com
② Segment Routing Traffic Engineering – Dynamic Candidate PathのTE Metric
次回は、SR-TE & link coloring について記事を書きます。
最後までお読みいただきありがとうございました!