Single-Domain SR-TE その2(WECMP)
SR-TE & WECMP(Weighted ECMP) が理解できたので自分のメモ用にアウトプットします。
1. SR-TE & WECMP
トラフィックの経路を重みづけで等コストロードバランシングする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 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng segment-list EXPLICIT_LIST1 index 10 mpls label 16002 index 20 mpls label 16004 index 30 mpls label 16006 ! segment-list EXPLICIT_LIST2 index 10 mpls label 16003 index 20 mpls label 16005 index 30 mpls label 16006 ! policy WECMP_POLICY binding-sid mpls 24365 color 60 end-point ipv4 6.6.6.6 autoroute include ipv4 6.6.6.6/32 ! candidate-paths preference 100 explicit segment-list EXPLICIT_LIST1 weight 10 ! explicit segment-list EXPLICIT_LIST2 weight 40 ! ! ! ! ! ! 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 ! ! mpls oam ! 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 ! 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 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! 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 ! 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 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! end
4.実装
実装の流れは、①全ノードでSegment Routing を有効にしてから ②Head-End で explicit Path を定義し、
③SR-TEのポリシーを定義します。④最後に経路(Candidate-paths)の候補を②で指定した path list から選択します。
前回(SR-TE その1)と異なる点は、最後選択する経路ごとに重みを付ける点です。
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 Head-End(h_N1)
4.2.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_LIST1/2)を定義します。
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_LIST1?
④ 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 16002 ? <cr>
今回は、Node1→2→4→6 と Node1→3→5→6 を2つ作ります。
segment-routing traffic-eng segment-list EXPLICIT_LIST1 index 10 mpls label 16002 index 20 mpls label 16004 index 30 mpls label 16006 ! segment-list EXPLICIT_LIST2 index 10 mpls label 16003 index 20 mpls label 16005 index 30 mpls label 16006 ! ! !
4.2.2 SR-TE Policy の定義
SR-TE Policy を以下のように定義します。
a) ポリシー名 :WECMP_POLICY
b) B-SID(任意):24365
c) color :60
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 WECMP_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 60 ? end-point Policy endpoint RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60 end-point ? ipv4 IPv4 address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60 end-point ipv4 ? A.B.C.D IPv4 endpoint address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60 end-point ipv4 6.6.6.6 ? <cr>
4.2.3 Candidate-paths の定義
Candidate-paths を以下のように定義します。
a) preference :100(大きい方が優先されます!)
b) explicit path :EXPLICIT_LIST
c) weight :EXPLICIT_LIST1/weight1、EXPLICIT_LIST2/weight4
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_LIST1
ここからが前回のSR-TEその1と異なる点です。事前に準備した segment-list EXPLICIT_LIST1 / EXPLICIT_LIST2 に対してそれぞれ重みを付けます。 Node1→2→4→6:Node1→3→5→6 = 1:4 になるようにします。
RP/0/RP0/CPU0:h_N1(config-sr-te-pp-info)#? weight Path option weight RP/0/RP0/CPU0:h_N1(config-sr-te-pp-info)#weight ? <1-4294967295> Weight RP/0/RP0/CPU0:h_N1(config-sr-te-pp-info)#weight 10 ? <cr>
全体像としてはこのようになります。
segment-routing traffic-eng segment-list EXPLICIT_LIST1 index 10 mpls label 16002 index 20 mpls label 16004 index 30 mpls label 16006 ! segment-list EXPLICIT_LIST2 index 10 mpls label 16003 index 20 mpls label 16005 index 30 mpls label 16006 ! policy WECMP_POLICY binding-sid mpls 24365 color 60 end-point ipv4 6.6.6.6 candidate-paths preference 100 explicit segment-list EXPLICIT_LIST1 weight 10 ! explicit segment-list EXPLICIT_LIST2 weight 40 ! ! ! ! ! !
weight 1 と weight 4 でも良いのですが、default値 が weight 1 であるため部分的に表示しなくなるのが嫌だったので 10:40 にしました。
5. 検証
SR-TEを定義すると新しいインターフェース(SR-TE用のLSP)が出現します。
RP/0/RP0/CPU0:h_N1#show ip interface brief | exclude una Mon Mar 20 12:56:22.814 UTC Interface IP-Address Status Protocol Vrf-Name ★srte_c_60_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:60、Tail-End:6.6.6.6(h_N6)です。 ルーティングにその変化が現れています。
RP/0/RP0/CPU0:h_N1#show route | begin Gate Mon Mar 20 12:55:57.983 UTC Gateway of last resort is not set L 1.1.1.1/32 is directly connected, 09:43:21, Loopback0 i L2 2.2.2.2/32 [115/20] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 i L2 3.3.3.3/32 [115/20] via 10.1.3.3, 09:42:30, GigabitEthernet0/0/0/2 i L2 4.4.4.4/32 [115/30] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 [115/30] via 10.1.3.3, 09:42:29, GigabitEthernet0/0/0/2 i L2 5.5.5.5/32 [115/30] via 10.1.3.3, 09:42:30, GigabitEthernet0/0/0/2 ★i L2 6.6.6.6/32 [115/40] via 6.6.6.6, 09:41:19, srte_c_60_ep_6.6.6.6 C 10.1.2.0/24 is directly connected, 09:42:41, GigabitEthernet0/0/0/0 L 10.1.2.1/32 is directly connected, 09:42:41, GigabitEthernet0/0/0/0 C 10.1.3.0/24 is directly connected, 09:42:41, GigabitEthernet0/0/0/2 L 10.1.3.1/32 is directly connected, 09:42:41, GigabitEthernet0/0/0/2 i L2 10.2.3.0/24 [115/20] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 [115/20] via 10.1.3.3, 09:42:29, GigabitEthernet0/0/0/2 i L2 10.2.4.0/24 [115/20] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 i L2 10.3.4.0/24 [115/20] via 10.1.3.3, 09:42:30, GigabitEthernet0/0/0/2 i L2 10.3.5.0/24 [115/20] via 10.1.3.3, 09:42:30, GigabitEthernet0/0/0/2 i L2 10.4.5.0/24 [115/30] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 [115/30] via 10.1.3.3, 09:42:29, GigabitEthernet0/0/0/2 i L2 10.4.6.0/24 [115/30] via 10.1.2.2, 09:42:29, GigabitEthernet0/0/0/0 [115/30] via 10.1.3.3, 09:42:29, GigabitEthernet0/0/0/2 i L2 10.5.6.0/24 [115/30] via 10.1.3.3, 09:42:30, GigabitEthernet0/0/0/2 L 127.0.0.0/8 [0/0] via 0.0.0.0, 09:43:26 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 Mon Mar 20 13:00:42.380 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 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/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 No ID Gi0/0/0/0 10.1.2.2 0 ☆24007 Pop 6.6.6.6/32 srte_c_60_ep 6.6.6.6 0 ☆24008 16004 SR TE: 1 [TE-INT] Gi0/0/0/0 10.1.2.2 196 ☆ 16005 SR TE: 1 [TE-INT] Gi0/0/0/2 10.1.3.3 560 ☆24365 Pop No ID srte_c_60_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 Mon Mar 20 13:02:50.032 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 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_60_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.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 Mon Mar 20 13:04:01.907 UTC SR-TE policy database --------------------- Color: 60, End-point: 6.6.6.6 ★1 Name: srte_c_60_ep_6.6.6.6 Status: Admin: up Operational: up for 09:49:23 (since Mar 20 03:14:38.176) Candidate-paths: Preference: 100 (configuration) (active) Name: WECMP_POLICY Requested BSID: 24365 Protection Type: protected-preferred Maximum SID Depth: 10 ★2 Explicit: segment-list EXPLICIT_LIST1 (valid) ★2 Weight: 10, Metric Type: TE 16002 16004 16006 ★3 Explicit: segment-list EXPLICIT_LIST2 (valid) ★3 Weight: 40, Metric Type: TE 16003 16005 16006 Attributes: ★4 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: 60, End-point: 6.6.6.6であることが分かります。
★2:有効な segment-list は、EXPLICIT_LIST1 (valid)で、Weight は 10 です。
★3:有効な segment-list は、EXPLICIT_LIST2 (valid)で、Weight は 40 です。
★4:このSR-TEに紐づけられているBinding SIDは、 24365 であることが分かります。
では実際にトラフィックが重みづけされてロードバランシングする様子を確認してみます。
TRACEROUTE を何回か実行した結果をクリックすると確認できます
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 Mon Mar 20 13:15:32.529 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 21 msec 4 msec 5 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 7 msec 10.2.4.4 8 msec 10.3.5.5 4 msec 3 10.5.6.6 8 msec * 7 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 Mon Mar 20 13:15:36.156 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 6 msec 3 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 5 msec 5 msec 12 msec 3 10.5.6.6 5 msec * 6 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 Mon Mar 20 13:15:39.702 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 16004/16006 Exp 0] 16 msec 10.1.3.3 5 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.5.6.6 5 msec * 7 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 Mon Mar 20 13:15:43.248 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 11 msec 5 msec 10.1.2.2 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.5.6.6 15 msec * 8 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 Mon Mar 20 13:15:46.800 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 12 msec 5 msec 10.1.2.2 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.4.6.6 5 msec 10.5.6.6 5 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 Mon Mar 20 13:15:50.370 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 12 msec 10.1.2.2 4 msec 10.1.3.3 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 5 msec 4 msec 10.2.4.4 9 msec 3 10.5.6.6 5 msec * 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 Mon Mar 20 13:15:53.899 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 5 msec 3 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 5 msec 4 msec 4 msec 3 * 10.5.6.6 6 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 Mon Mar 20 13:16:00.421 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 16004/16006 Exp 0] 6 msec 3 msec 10.1.3.3 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 5 msec 4 msec 10.2.4.4 4 msec 3 10.5.6.6 5 msec * 6 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 Mon Mar 20 13:16:03.981 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 16004/16006 Exp 0] 6 msec 10.1.3.3 4 msec 4 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.5.6.6 6 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 Mon Mar 20 13:16:07.561 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 16004/16006 Exp 0] 6 msec 10.1.3.3 4 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 5 msec 4 msec 4 msec 3 10.5.6.6 7 msec * 8 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 11th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Mon Mar 20 13:16:11.093 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 7 msec 4 msec 3 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.5.6.6 6 msec * 6 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 12th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Mon Mar 20 13:16:14.642 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 5 msec 4 msec 4 msec 2 10.2.4.4 [MPLS: Label 16006 Exp 0] 5 msec 10.3.5.5 5 msec 4 msec 3 10.5.6.6 8 msec * 6 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 13th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Mon Mar 20 13:16:18.166 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 7 msec 3 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 4 msec 3 10.4.6.6 5 msec * 10.5.6.6 23 msec RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 14th attemt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Mon Mar 20 13:16:21.750 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 6 msec 4 msec 4 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 4 msec 4 msec 10.2.4.4 4 msec 3 10.5.6.6 5 msec 10.4.6.6 4 msec * RP/0/RP0/CPU0:h_N1#! RP/0/RP0/CPU0:h_N1#! 15th attempt RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 sou 1.1.1.1 numeric Mon Mar 20 13:16:25.278 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.3.3 [MPLS: Labels 16005/16006 Exp 0] 7 msec 5 msec 11 msec 2 10.3.5.5 [MPLS: Label 16006 Exp 0] 9 msec 4 msec 4 msec 3 10.5.6.6 10 msec * 6 msec RP/0/RP0/CPU0:h_N1#!
トラフィックが少ないので想定通り 1:4 にキッカリ分散されてはいませんがロードバランシング出来ている様子が見て取れます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding Mon Mar 20 13:19:25.823 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 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/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 No ID Gi0/0/0/0 10.1.2.2 0 24007 Pop 6.6.6.6/32 srte_c_60_ep 6.6.6.6 0 ☆ 24008 16004 SR TE: 1 [TE-INT] Gi0/0/0/0 10.1.2.2 588 ☆ 16005 SR TE: 1 [TE-INT] Gi0/0/0/2 10.1.3.3 3192 24365 Pop No ID srte_c_60_ep point2point 0 RP/0/RP0/CPU0:h_N1#
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail Mon Mar 20 13:25:01.861 UTC SR-TE Policy Forwarding database -------------------------------- Color: 60, End-point: 6.6.6.6 Name: srte_c_60_ep_6.6.6.6 Binding SID: 24365 Active LSP: Candidate path: Preference: 100 (configuration) Name: WECMP_POLICY Local label: 24008 Segment lists: SL[0]: ★1 Name: EXPLICIT_LIST1 ★2 Switched Packets/Bytes: 21/588 [MPLS -> MPLS]: 21/588 Paths: Path[0]: Outgoing Label: 16004 Outgoing Interfaces: GigabitEthernet0/0/0/0 Next Hop: 10.1.2.2 Switched Packets/Bytes: 21/588 [MPLS -> MPLS]: 21/588 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) ★3 Label Stack (Top -> Bottom): { 16004, 16006 } ★4 Path-id: 1, Weight: 640 SL[1]: ★5 Name: EXPLICIT_LIST2 ★6 Switched Packets/Bytes: 114/3192 [MPLS -> MPLS]: 114/3192 Paths: Path[0]: Outgoing Label: 16005 Outgoing Interfaces: GigabitEthernet0/0/0/2 Next Hop: 10.1.3.3 Switched Packets/Bytes: 114/3192 [MPLS -> MPLS]: 114/3192 FRR Pure Backup: No ECMP/LFA Backup: No Internal Recursive Label: Unlabelled (recursive) ★7 Label Stack (Top -> Bottom): { 16005, 16006 } ★8 Path-id: 2, Weight: 2560 Policy Packets/Bytes Switched: 1770/131660 RP/0/RP0/CPU0:h_N1#
★1:Name: EXPLICIT_LIST1
★2:Switched Packets/Bytes: 21/588
★3:Label Stack (Top -> Bottom): { 16004, 16006 }
★4:Path-id: 1, Weight: 640
→ Node1→2→4→6 と流れるトラフィックに Weight: 640
★5:Name: EXPLICIT_LIST2
★6:Switched Packets/Bytes: 114/3192
★7:Label Stack (Top -> Bottom): { 16005, 16006 }
★8:Path-id: 2, Weight: 2560
→ Node1→3→5→6 と流れるトラフィックに Weight: 2560
理論上は 1:4 にトラフィックをロードバランシングすることが出来ていることが分かります。 恐らくもっとトラフィックを流せば、理論値の 1:4 に近づくものと思われます。
6. 参考
① Segment Routing Traffic Engineering – Explicit Candidate PathのWeight y-network.jp
次回は、SR-TE & Anycast-SID について記事を書きます。
最後までお読みいただきありがとうございました!