Segment Routing Traffic Engineering – Candidate PathのPreference

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

 

概要

Candidate PathのPreference

1つのSR-TE Policyに複数のCandidate Pathが存在する場合、Head-endはPreferenceの高いCandidate Pathを使用して、トラフィックを転送します。

 

もし、障害などでPreferenceの高いCandidate PathのLSPが消失した場合、Head-endは次にPreferenceの高いCandidate Pathを使用してパケットを転送します。

検証内容と設定

基本設定の内容

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(Preference 5)
  • R1 ⇒ R4 ⇒ R3(Preference 10)

 

 

初期設定


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 20401
   index 20 mpls label 20301
  !
  segment-list SID_LIST_2
   index 10 mpls label 20301
  !
  policy SR-TE_POLICY
   color 1 end-point ipv4 3.3.3.3
   autoroute
    include all
   !
   candidate-paths
    preference 5
     explicit segment-list SID_LIST_2
     !
    !
    preference 10
     explicit segment-list SID_LIST_1
            


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の設定の確認

Candidate PathのPreferenceはpreferenceコマンドで設定可能です。

R1

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

 

SR-TE Policyの確認(R4障害前)

SR-TE Policyに2個のCandidate Pathが存在し、Preferenceの高いR1 ⇒ R4 ⇒ R3のCandidate PathのみActive状態であることが確認できます。

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:00:06 (since Jun 14 21:49:05.544)
  Candidate-paths:
    Preference: 10 (configuration) (active)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST_1 (valid)
        Weight: 1, Metric Type: TE
          20401 [Prefix-SID, 4.4.4.4]
          20301
    Preference: 5 (configuration)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST_2 (invalid)
        Weight: 1, Metric Type: TE
  Attributes:
    Binding SID: 24008
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
            

 

R1は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: 24008
  Active LSP:
    Candidate path:
      Preference: 10 (configuration)
      Name: SR-TE_POLICY
    Local label: 24007
    Segment lists:
      SL[0]:
        Name: SID_LIST_1
        Packets/Bytes Switched: 0/0
        Paths:
          Path[0]:
            Outgoing Label: 20401
            Outgoing Interface: GigabitEthernet0/0/0/0
            Next Hop: 10.1.1.2
            Switched Packets/Bytes: 0/0
            FRR Pure Backup: No
            ECMP/LFA Backup: No
            Label Stack (Top -> Bottom): { 20401, 20301 }

  Policy Packets/Bytes Switched: 0/0
            

 

疎通確認(R4障害前)

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

 

R1はSID 20401 20301をパケットに付加して、R2に転送していることが確認できます。

R1

RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.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] 49 msec  50 msec  42 msec
 2  10.3.3.4 [MPLS: Label 20301 Exp 0] 49 msec  58 msec  61 msec
 3  10.4.4.3 60 msec  *  54 msec
           

 

SR-TE Policyの確認(R4障害後)

R4で障害が発生し、R1 ⇒ R4 ⇒ R3のCandidate Pathが消失したため、R1 ⇒ R3のCandidate PathがActive状態に変化したことが確認できます。

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:03:14 (since Jun 14 21:49:05.544)
  Candidate-paths:
    Preference: 10 (configuration)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST_1 (invalid)
      Last error: unresolved first label (20401)
        Weight: 1, Metric Type: TE
    Preference: 5 (configuration) (active)
      Name: SR-TE_POLICY
      Requested BSID: dynamic
      Explicit: segment-list SID_LIST_2 (valid)
        Weight: 1, Metric Type: TE
          20301 [Prefix-SID, 3.3.3.3]
  Attributes:
    Binding SID: 24008
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
            

 

R1はSID 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: 24008
  Active LSP:
    Candidate path:
      Preference: 5 (configuration)
      Name: SR-TE_POLICY
    Local label: 24009
    Segment lists:
      SL[0]:
        Name: SID_LIST_2
        Packets/Bytes Switched: 0/0
        Paths:
          Path[0]:
            Outgoing Label: 20301
            Outgoing Interface: GigabitEthernet0/0/0/0
            Next Hop: 10.1.1.2
            Switched Packets/Bytes: 0/0
            FRR Pure Backup: No
            ECMP/LFA Backup: No
            Label Stack (Top -> Bottom): { 20301 }

  Policy Packets/Bytes Switched: 9/252
            

 

疎通確認(R4障害後)

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

 

R1はSID 20301をパケットに付加して、R2に転送していることが確認できます。

R1

RP/0/RP0/CPU0:R1#traceroute 3.3.3.3 source 1.1.1.1

Type escape sequence to abort.
Tracing the route to 3.3.3.3

 1  10.1.1.2 [MPLS: Label 20301 Exp 0] 96 msec  95 msec  96 msec
 2  10.2.2.3 82 msec  *  100 msec
           

コメント

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