Segment Routing Traffic Engineering – Explicit Candidate PathのWeight

今回はSR-TEのExplicit Candidate PathのWeightパラメータについて説明します。

 

概要

Explicit Candidate PathのWeight

SR-TE PolicyのCandidate Pathに対して、複数のExplicit Candidate Pathを登録可能です。この際、Head-endはExplicit Candidate PathのWeightの比率を基に、トラフィックを分散して転送します。。

 

検証内容と設定

基本設定の内容

R1-R2-R3-R4間でOSPF Area 0を構成します。
OSPFでSR-TEを有効にします。

R1でLoopback Interfaceの1.1.1.1/32にPrefix SIDとして20101を割り当てます。
R3でLoopback Interfaceの2.2.2.2/32にPrefix SIDとして20201を割り当てます。
R3でLoopback Interfaceの3.3.3.3/32にPrefix SIDとして20301を割り当てます。
R4でLoopback Interfaceの4.4.4.4/32にPrefix SIDとして20401を割り当てます。

 

R1で3.3.3.3/32へのパスを2個手動で定義します。

  • R1 ⇒ R3(Weight 10)
  • R1 ⇒ R4 ⇒ R3(Weight 20)

 

 

初期設定


interface Loopback0
 ipv4 address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.1.1 255.255.255.0
!
router ospf 1
 distribute link-state
 router-id 1.1.1.1
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20101
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
  segment-list SID_LIST_1
   index 10 mpls label 20301
  !
  segment-list SID_LIST_2
   index 10 mpls label 20401
   index 20 mpls label 20301
  !
  policy SR-TE_POLICY
   color 1 end-point ipv4 3.3.3.3
   autoroute
    include all
   !
   candidate-paths
    preference 10
     explicit segment-list SID_LIST_1
      weight 10
     !
     explicit segment-list SID_LIST_2
      weight 20
            


interface Loopback0
 ipv4 address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.1.1.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.2.2.2 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 10.3.3.2 255.255.255.0
!
router ospf 1
 router-id 2.2.2.2
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20201
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
  interface GigabitEthernet0/0/0/2
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.2.2.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.4.4.3 255.255.255.0
!
router ospf 1
 router-id 3.3.3.3
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20301
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            


interface Loopback0
 ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/0
 ipv4 address 10.3.3.4 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.4.4.4 255.255.255.0
!
router ospf 1
 router-id 4.4.4.4
 segment-routing mpls
 area 0
  mpls traffic-eng
  interface Loopback0
   prefix-sid absolute 20401
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
segment-routing
 traffic-eng
            

 

設定と状態の確認

SR-TE Policyの設定の確認

Explicit Candidate PathのWeightはweightコマンドで設定可能です。

R1

segment-routing
 traffic-eng
  segment-list SID_LIST_1
   index 10 mpls label 20301
  !
  segment-list SID_LIST_2
   index 10 mpls label 20401
   index 20 mpls label 20301
  !
  policy SR-TE_POLICY
   color 1 end-point ipv4 3.3.3.3
   autoroute
    include all
   !
   candidate-paths
    preference 10
     explicit segment-list SID_LIST_1
      weight 10
     !
     explicit segment-list SID_LIST_2
      weight 20
            

 

SR-TE Policyの確認

SR-TE PolicyのCandidate Pathに2個のExplicit Candidate Pathが登録されていることが確認できます。R1 ⇒ R3のLSPのWeightが10、R1 ⇒ R4 ⇒ R3のLSPのWeightが20であることが確認できます。

R1

RP/0/RP0/CPU0:R1#show segment-routing traffic-eng policy

SR-TE policy database
---------------------

Color: 1, End-point: 3.3.3.3
  Name: srte_c_1_ep_3.3.3.3
  Status:
    Admin: up  Operational: up for 00:04:41 (since Jun 16 22:54:58.853)
  Candidate-paths:
    Preference: 10 (configuration) (active)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
        Maximum SID Depth: 10
      Explicit: segment-list SID_LIST_1 (valid)
        Weight: 10, Metric Type: TE
          20301 [Prefix-SID, 3.3.3.3]
      Explicit: segment-list SID_LIST_2 (valid)
        Weight: 20, Metric Type: TE
          20401 [Prefix-SID, 4.4.4.4]
          20301
  Attributes:
    Binding SID: 24007
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
            

 

R1はSID 20301、または、SID 20401 20301をパケットに付加することが確認できます。

R1

RP/0/RP0/CPU0:R1#show segment-routing traffic-eng forwarding policy

SR-TE Policy Forwarding database
--------------------------------

Color: 1, End-point: 3.3.3.3
  Name: srte_c_1_ep_3.3.3.3
  Binding SID: 24007
  Active LSP:
    Candidate path:
      Preference: 10 (configuration)
      Name: SR-TE_POLICY
    Local label: 24008
    Segment lists:
      SL[0]:
        Name: SID_LIST_1
        Packets/Bytes Switched: 14/392
        Paths:
          Path[0]:
            Outgoing Label: 20301
            Outgoing Interface: GigabitEthernet0/0/0/0
            Next Hop: 10.1.1.2
            Switched Packets/Bytes: 14/392
            FRR Pure Backup: No
            ECMP/LFA Backup: No
            Label Stack (Top -> Bottom): { 20301 }
      SL[1]:
        Name: SID_LIST_2
        Packets/Bytes Switched: 28/784
        Paths:
          Path[0]:
            Outgoing Label: 20401
            Outgoing Interface: GigabitEthernet0/0/0/0
            Next Hop: 10.1.1.2
            Switched Packets/Bytes: 28/784
            FRR Pure Backup: No
            ECMP/LFA Backup: No
            Label Stack (Top -> Bottom): { 20401, 20301 }

  Policy Packets/Bytes Switched: 177/4956
            

 

疎通確認

R1の1.1.1.1からR3の3.3.3.3へTracerouteを実施します。

 

R1は10:20の比率でパケットを分散していることが確認できます。

R1

◆1回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Labels 20401/20301 Exp 0] 48 msec
 2  10.3.3.4 [MPLS: Label 20301 Exp 0] 58 msec
 3  10.4.4.3 61 msec


◆2回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Labels 20401/20301 Exp 0] 51 msec
 2  10.3.3.4 [MPLS: Label 20301 Exp 0] 55 msec
 3  10.4.4.3 59 msec


◆3回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Label 20301 Exp 0] 45 msec
 2  10.2.2.3 56 msec


◆4回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Labels 20401/20301 Exp 0] 60 msec
 2  10.3.3.4 [MPLS: Label 20301 Exp 0] 53 msec
 3  10.4.4.3 72 msec


◆5回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Labels 20401/20301 Exp 0] 51 msec
 2  10.3.3.4 [MPLS: Label 20301 Exp 0] 56 msec
 3  10.4.4.3 44 msec


◆6回目
RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1 probe 1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Label 20301 Exp 0] 51 msec
 2  10.2.2.3 44 msec

            

コメント

タイトルとURLをコピーしました