[Multi-AS Segment Routing 検証連載 #6] IGP Flexible Algorithm

サマリ

  • Flexible Algorithm による VPN 経路の TE を実現
  • IOS XR + Junos の Multi-vendor 環境で動作検証に成功

この記事は Multi-AS SR 検証連載の第 6 回です。目次は こちら

概要

イノベーションセンターの田島です。

本記事では Flexible Algorithm を用いた Traffic Engineering について解説します。 Flexible Algorithm で計算された最適経路によって L3VPN の転送が行われる例や、トポロジーが変化しても制約を満たす経路が自動で再計算される例を検証で示します。 これまでの記事でも紹介したように TE を実施する場合において、対象が L3VPN と L2VPN とでは差異が無いため、本記事の内容は L2VPN でも適用可能です。 なお Flexible Algorithm の略称としては Flex-Algo、Flex Algo、Flex-Algorithm などが存在します。本記事中で略記する場合は以下 Flex-Algorithm と表記します。

本記事では Flex-Algorithm についての説明と、ルーターでの動作検証を紹介します。

Flexible Algorithm とは

Flexible Algorithm とは IGP での経路計算時に複数の異なるメトリックや制約を付け加え、複数の基準による最適経路を並行して決定し使用するための技術です。 リンクのメトリックとは帯域幅を基にしたコスト、遅延、または TE 用のコストのことです。 制約とは一部のリンクを使用しないような状況のことです。 従来の IGP では、リンクコストを基にし全リンクを使用可能な場合の最適経路のみを計算可能でしたが、 Flex-Algorithm により複数の指標を使い分けることができ、また仮想的にアンダーレイの一部に限定して通信させることができます。

例えば、リンク帯域を基にした最適経路とリンク間遅延を基にした最適経路をそれぞれ Flex-Algorithm で定義し、各 Algorithm を利用するための SR Policy を定義しておきます。 第 4 回の記事のように BGP color 等によってこれらの SR Policy を選択することで Flex-Algorithm の適用ができます。 このように最適化させたい意図ごとに仮想的にアンダーレイを分割し選択することで、各通信の性質や要求ごとに適切なアンダーレイおよび最適なパスでの通信が実現されます。

Flex-Algorithm により区別されたトポロジーは128から255まで番号をつけることができ、 メトリックの種類やトポロジー制約の記述などとともに定義されます。 各リンクに属性を割り当て、特定の属性のリンクを含むか、または含まないかで制約が記述されます。 この属性を color と表記し、本記事で後述する例でも RED や BLUE のようにリンクを区別します。 なお第 4 回の記事に BGP color の説明がありましたが、別物です。 Flex-Algorithm の color は、各属性を1ビットと見立てて割り当てられていれば1に対応するビットマップとして実装され Extended Administrative Group (EAG) や Administrative Group (AG) の値として保存されます。 これらの情報からなる定義は Flexible Algorithm Definition (FAD) と呼ばれ、 IGP により広告されます。

Flex-Algorithm は IETF Network Working Group での Internet-Draft 1 段階の技術であり、2022年8月時点では完全に標準化されている方式ではありません。 しかし、各社のルーター製品やオープンソース製品などにおいて実装が始まっています。 FAD の広告には EAG や AG などの Type Length Value (TLV) を使用しますが、使用する TLV や Sub-TLV を相互に認識可能で無ければ相互接続ができません。 実際に Extended Administrative Group や Application-Specific Link Attribute の解釈が違うことで意図した動作にならないことがありましたが、 IOS XR 7.4.1 と Junos 21.3 以降の組み合わせでは相互運用できることを確かめました。

Flex-Algorithm の動作例

Flex-Algorithm の動作をトポロジー例を用いて説明します。

図の中央上部にアンダーレイトポロジーを記載しています。 PE 2台、 P 2台の各リンクに対して RED と BLUE のラベル、 IGP メトリックと TE メトリックを設定しています。 このアンダーレイで 2 つの Flex-Algorithm を作成します。

  • Algorithm 128 : RED リンクは使用禁止。 IGP メトリックに従って最適経路を算出する。
  • Algorithm 129 : BLUE リンクのみを使用する。 TE メトリックに従って最適経路を算出する。

それぞれ図の左下と右下のような、制約が反映され指定のメトリックがついたトポロジーとして仮想的に認識されます。 この状態で転送経路としてどちらかの Algorithm を選択すると、それぞれの仮想的なトポロジー内での最適経路に従って転送されます。

Algorithm を明示的や自動的に選択するために SRGB をそれぞれ分けます。 例えばこの例だと Algorithm 128 側を SRGB 17000 から、 129 側を 18000 からというように設定します。 これにより Algorithm を指定した宛先の指定ができます。

リンク障害などで元のアンダーレイトポロジーから変化した場合でも、それぞれの Algorithm ごとに再計算されます。 これは自動計算されるバックアップパスも Algorithm の制約に従うことを意味します。 しかし気を付けるべき点もあります。制約を入れた後のトポロジーで単一障害点となるリンクが存在するような非冗長な場合において、そのリンクが障害状態になると当該 Algorithm はネットワークが分断され不通になってしまいます。 実際のアンダーレイが問題なく冗長化されていて通信継続させたい場合は、当該 Algorithm の使用を指定する SR Policy の定義などでフォールバック先を指定しておく必要があります。

Flex-Algorithm の適用検証

実際に Flex-Algorithm を用いて TE を実装します。 概要部分での説明に用いた次の図のトポロジーを使用し Algorithm 128 を設定します。 なお、次節で障害時の動作を確かめます。

このアンダーレイで RED リンクを使用せず IGP メトリックに従う Algorithm 128 を定義します。 あらかじめ顧客 A の BGP 経路には BGP color 100 をつけておき、定義した Algorithm 128 を顧客 A の VPN 経路に使用します。 転送経路は次のように表せ、これを実装します。 なお 129 を実装しない理由としては FAD の解釈にメーカー差があり想定の経路へは TE されないためです。

2023/09/19 追記:本記事公開後の OS のバージョンアップによって FAD の相互運用ができるようになりました。第 15 回 の記事を参照ください。

検証に用いたバージョンは下記の通りです。

  • PE1、P1: Cisco IOS XR 7.4.1
  • PE2、P2: Junos OS 21.3R1.9

第 4 回の記事 の通りに L3VPN および BGP color の SR Policy を作成します。実施内容は下記の通りで、詳しくはリンク先記事を参照ください。

  • VRF 100 と 200 による L3VPN 作成
  • BGP color の付与と広告
  • BGP color による SR Policy の適用

ここからは次のステップで設定し確認します。

  1. リンクに対する制約やメトリックの定義
  2. Flex-Algorithm 128 の定義
  3. ラベル学習の確認
  4. SR Policy の設定と確認
  5. traceroute による VPN の通信経路確認

1. リンクに対する制約やメトリックの定義

各ルーターにてインターフェースに対し Flex-Algorithm の color と IGP および TE のメトリックを指定します。 color はビットマップでフラグ管理されるため、各色で何ビット目を用いるかの定義がそれぞれのルーターに必要です。 今回は行きと帰りの経路を対象にするため 1 つのリンクに対して両端のルーターで同じ設定にします。

PE に関しては VPN の next-hop として Loopback インターフェースが使用されるため、特定の color のリンクのみを使用するといった制約を意味する include-any や include-all を用いる際は Loopback に当該 color を忘れずに付ける必要があります。

BLUE は最終的に本検証で使用しませんが、設定方法の参考として同時に設定します。

PE1 (IOS XR)

  • P1 向け Gi0/0/0/0 を RED かつ BLUE にします
  • PE であるため Loopback0 に BLUE をつけます
router isis 1
 affinity-map RED bit-position 1
 affinity-map BLUE bit-position 2
 !
 interface Loopback0
  affinity flex-algo BLUE
 !
 interface GigabitEthernet0/0/0/0
  affinity flex-algo RED BLUE
  address-family ipv4 unicast
   metric 10
  !
 !
 interface GigabitEthernet0/0/0/1
  address-family ipv4 unicast
   metric 10
  !
 !
!
segment-routing
 traffic-eng
  interface GigabitEthernet0/0/0/0
   metric 10
  !
  interface GigabitEthernet0/0/0/1
   metric 10
  !
 !
!

P1 (IOS XR)

  • PE1 向け Gi0/0/0/0 を RED かつ BLUE にします
  • PE2 向け Gi0/0/0/1 と P2 向け Gi0/0/0/2 を BLUE にします
router isis 1
 affinity-map RED bit-position 1
 affinity-map BLUE bit-position 2
 !
 interface GigabitEthernet0/0/0/0
  affinity flex-algo RED BLUE
  address-family ipv4 unicast
   metric 10
  !
 !
 interface GigabitEthernet0/0/0/1
  affinity flex-algo BLUE
  address-family ipv4 unicast
   metric 10
  !
 !
 interface GigabitEthernet0/0/0/2
  affinity flex-algo BLUE
  address-family ipv4 unicast
   metric 10
  !
 !
!
segment-routing
 traffic-eng
  interface GigabitEthernet0/0/0/0
   metric 10
  !
  interface GigabitEthernet0/0/0/1
   metric 100
  !
  interface GigabitEthernet0/0/0/2
   metric 10
  !
 !
!

PE2 (Junos)

  • P1 向け ge-0/0/0 と P2 向け ge-0/0/1 を BLUE にします
  • PE であるため lo0 に BLUE をつけます
set protocols isis interface ge-0/0/0.0 level 2 te-metric 100
set protocols isis interface ge-0/0/0.0 level 2 application-specific attribute-group Algo129 admin-group BLUE
set protocols isis interface ge-0/0/0.0 level 2 application-specific attribute-group Algo129 application flex-algorithm
set protocols isis interface ge-0/0/0.0 level 2 metric 10
set protocols isis interface ge-0/0/1.0 level 2 te-metric 10
set protocols isis interface ge-0/0/1.0 level 2 application-specific attribute-group Algo129 admin-group BLUE
set protocols isis interface ge-0/0/1.0 level 2 application-specific attribute-group Algo129 application flex-algorithm
set protocols isis interface ge-0/0/1.0 level 2 metric 10
set protocols isis interface lo0.0 level 2 application-specific attribute-group Algo129 admin-group BLUE
set protocols isis interface lo0.0 level 2 application-specific attribute-group Algo129 application flex-algorithm

set protocols mpls admin-groups RED 1
set protocols mpls admin-groups BLUE 2
set protocols mpls interface ge-0/0/0.0 admin-group BLUE
set protocols mpls interface ge-0/0/1.0 admin-group BLUE
set protocols mpls interface lo0.0 admin-group BLUE

P2 (Junos)

  • P1 向け ge-0/0/1 と PE2 向け ge-0/0/2 を BLUE にします
set protocols isis interface ge-0/0/0.0 level 2 te-metric 10
set protocols isis interface ge-0/0/0.0 level 2 metric 10
set protocols isis interface ge-0/0/1.0 level 2 te-metric 10
set protocols isis interface ge-0/0/1.0 level 2 application-specific attribute-group Algo129 admin-group BLUE
set protocols isis interface ge-0/0/1.0 level 2 application-specific attribute-group Algo129 application flex-algorithm
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/2.0 level 2 te-metric 10
set protocols isis interface ge-0/0/2.0 level 2 application-specific attribute-group Algo129 admin-group BLUE
set protocols isis interface ge-0/0/2.0 level 2 application-specific attribute-group Algo129 application flex-algorithm
set protocols isis interface ge-0/0/2.0 level 2 metric 10

set protocols mpls admin-groups RED 1
set protocols mpls admin-groups BLUE 2
set protocols mpls interface ge-0/0/1.0 admin-group BLUE
set protocols mpls interface ge-0/0/2.0 admin-group BLUE

2. Flex-Algorithm 128 の定義

Algorithm 128 を定義し広告します。 下記では各ルーターごとに掲示していますが、同じものが設定されます。

Algorithm ごとの転送に用いるため、各 Node-SID も Algorithm ごとに付与します。 ここでは Algorithm 128 は 17000 番台へと空間を分けています。 下記設定では比較をわかりやすくするために、 Algorithm がついていない元の Node-SID の設定も残しています。

PE1 (IOS XR)

router isis 1
 flex-algo 128
  advertise-definition
  affinity exclude-any RED
 !
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 1
   prefix-sid algorithm 128 index 1001
  !
 !
!

P1 (IOS XR)

router isis 1
 flex-algo 128
  advertise-definition
  affinity exclude-any RED
 !
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index 2
   prefix-sid algorithm 128 index 1002
  !
 !
!

PE2 (Junos)

Junos において RSVP などのシグナリングが別に動作していないときはドキュメントに従い set protocols isis traffic-engineering advertisement always が必要です。

set policy-options policy-statement Flex-Algo-SID term 1 from route-filter 10.255.0.3/32 exact
set policy-options policy-statement Flex-Algo-SID term 1 then prefix-segment algorithm 128 index 1003
set policy-options policy-statement Flex-Algo-SID term 1 then prefix-segment algorithm 128 node-segment

set routing-options flex-algorithm 128 definition metric-type igp-metric
set routing-options flex-algorithm 128 definition spf
set routing-options flex-algorithm 128 definition admin-group exclude RED

set protocols isis source-packet-routing node-segment ipv4-index 3
set protocols isis source-packet-routing flex-algorithm 128
set protocols isis source-packet-routing strict-asla-based-flex-algorithm
set protocols isis traffic-engineering advertisement always
set protocols isis export Flex-Algo-SID

P2 (Junos)

set policy-options policy-statement Flex-Algo-SID term 1 from route-filter 10.255.0.4/32 exact
set policy-options policy-statement Flex-Algo-SID term 1 then prefix-segment algorithm 128 index 1004
set policy-options policy-statement Flex-Algo-SID term 1 then prefix-segment algorithm 128 node-segment

set routing-options flex-algorithm 128 definition metric-type igp-metric
set routing-options flex-algorithm 128 definition spf
set routing-options flex-algorithm 128 definition admin-group exclude RED

set protocols isis source-packet-routing node-segment ipv4-index 4
set protocols isis source-packet-routing flex-algorithm 128
set protocols isis source-packet-routing strict-asla-based-flex-algorithm
set protocols isis traffic-engineering advertisement always
set protocols isis export Flex-Algo-SID

3. ラベル学習の確認

上記設定が完了すると FAD の広告がされるため、各ルーターで各 Algorithm の情報を見ることができます。 FAD の内容と、ラベルが学習されているのかを確認します。

PE1 (IOS XR)

PE1 自身の広告内容を確認します。 FAD の定義内容や隣接である P1 へのリンクの color が見えます。 なおビットマップのため RED は 1 << 1 = 0x2 となり、 BLUE は 1 << 2 = 0x4 となり、 RED かつ BLUE は 0x2 & 0x4 = 0x6 と表現されます。

RP/0/RP0/CPU0:PE1#show isis database verbose
Mon Aug 15 10:50:02.431 JST

IS-IS 1 (Level-2) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
PE1.00-00     * 0x000007ed   0xe7e5        1067 /*            0/0/0
  Area Address:   49.0000
  NLPID:          0xcc
  IP Address:     10.255.0.1
  Metric: 10         IP-Extended 10.0.0.0/30
    Prefix Attribute Flags: X:0 R:0 N:0 E:0 A:0
  Metric: 10         IP-Extended 10.0.1.0/30
    Prefix Attribute Flags: X:0 R:0 N:0 E:0 A:0
  Metric: 10         IP-Extended 10.255.0.1/32
    Prefix-SID Index: 1, Algorithm:0, R:0 N:1 P:0 E:0 V:0 L:0
    Prefix-SID Index: 1001, Algorithm:128, R:0 N:1 P:0 E:0 V:0 L:0
    Prefix-SID Index: 2001, Algorithm:129, R:0 N:1 P:0 E:0 V:0 L:0
    Prefix Attribute Flags: X:0 R:0 N:1 E:0 A:0
    Source Router ID: 10.255.0.1
  Hostname:       PE1
  Router ID:      10.255.0.1
  Router Cap:     10.255.0.1 D:0 S:0
    Segment Routing: I:1 V:0, SRGB Base: 16000 Range: 8000
    SR Local Block: Base: 15000 Range: 1000
    Node Maximum SID Depth:
      Label Imposition: 10
    SR Algorithm:
      Algorithm: 0
      Algorithm: 1
      Algorithm: 128
      Algorithm: 129
    Flex-Algo Definition:
      Algorithm: 128 Metric-Type: 0 Alg-type: 0 Priority: 128
      Flex-Algo Exclude-Any Ext Admin Group:
        0x00000002
    Flex-Algo Definition:
      Algorithm: 129 Metric-Type: 0 Alg-type: 0 Priority: 128
      Flex-Algo Include-Any Ext Admin Group:
        0x00000004
  Metric: 10         IS-Extended P1.00
(snip)
    Application Specific Link Attributes:
      L flag: 0, SA-Length: 1, UDA-Length: 1
      Standard Applications: 0x10 FLEX-ALGO
      User Defined Applications: 0x10
      Ext Admin Group:
        0x00000006
      Affinity: 0x00000006
    ADJ-SID: F:0 B:0 V:1 L:1 S:0 P:0 weight:0 Adjacency-sid:24003
(snip)

元々の Node-SID だけではなく、各 Algorithm で設定した Node-SID も学習されています。

RP/0/RP0/CPU0:PE1#show mpls forwarding
Mon Aug 15 11:07:47.194 JST
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
(snip)
16003  16003       SR Pfx (idx 3)     Gi0/0/0/0    10.0.0.2        5416
(snip)
17003  17003       SR Pfx (idx 1003)  Gi0/0/0/1    10.0.1.2        0
(snip)

PE2 (Junos)

FAD を参照するために show isis database extensive 以外にも Flex-Algorithm のコマンドがあります。

user@PE2> show isis spring flex-algorithm flex-algorithm-id 128
Flex Algo: 128
  Level: 2, Color: 100, Participating, FAD supported
      Winner: P1, Metric: 0, Calc: 0, Prio: 128, Excl: 0x2, FAD supported
        Exclude:  0x2 RED
    Spf Version: 632
    Participation toggles: 1
    Last Route add: 0
    Last Route rem: 0
    Last Route chg: 0
    Last Route fail: 0
    Last Route def: 0
    Total Route add: 16
    Total Route rem: 8
    Total Route chg: 0
    Total Route fail: 0
    Total Route def: 0
    Topo refresh count: 2
      PE1, Metric: 0, Calc: 0, Prio: 128, Excl: 0x2, FAD supported
      P2, Metric: 0, Calc: 0, Prio: 0, Excl: 0x2, FAD supported
      PE2, Metric: 0, Calc: 0, Prio: 0, Excl: 0x2, FAD supported
    Full SPFs: 631, Partial SPFs: 0
 IS-IS Flex Algo 128 level 2 SPF log:
Start time          Elapsed (secs) Count Reason
Sun Aug 14 11:03:06        0.000056    1 Periodic SPF
(snip)

ラベルも学習されています。

user@PE2> show route table mpls.0
(snip)
16001              *[L-ISIS/14] 5d 16:04:39, metric 30
                       to 10.0.2.1 via ge-0/0/0.0, Swap 16001
                    >  to 10.0.3.2 via ge-0/0/1.0, Swap 16001
(snip)
17001              *[L-ISIS/14] 5d 14:55:16, metric 30
                    >  to 10.0.3.2 via ge-0/0/1.0, Swap 17001
(snip)

4. SR Policy の設定と確認

On Demand Nexthop (ODN) を使用して特定の BGP color の経路に使用する Algorithm を指定します。

PE1 (IOS XR)

segment-routing
 traffic-eng
  on-demand color 100
   dynamic
    metric
     type igp
    !
    sid-algorithm 128
   !
  !
 !
!

SR Policy が up 状態になり、宛先も PE2 の Algorithm 128 の SID (17003) が選択されています。

RP/0/RP0/CPU0:PE1#show segment-routing traffic-eng policy color 100
Mon Aug 15 13:27:34.701 JST

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

Color: 100, End-point: 10.255.0.3
  Name: srte_c_100_ep_10.255.0.3
  Status:
    Admin: up  Operational: up for 4d12h (since Aug 10 14:31:37.908)
  Candidate-paths:
    Preference: 200 (BGP ODN) (active)
      Requested BSID: dynamic
      Constraints:
        Prefix-SID Algorithm: 128
        Protection Type: protected-preferred
        Maximum SID Depth: 10
      Dynamic (valid)
        Metric Type: IGP,   Path Accumulated Metric: 30
          17003 [Prefix-SID: 10.255.0.3, Algorithm: 128]
    Preference: 100 (BGP ODN)
      Requested BSID: dynamic
      PCC info:
        Symbolic name: bgp_c_100_ep_10.255.0.3_discr_100
        PLSP-ID: 3
      Constraints:
        Prefix-SID Algorithm: 128
        Protection Type: protected-preferred
        Maximum SID Depth: 10
      Dynamic (pce) (invalid)
      Last error: No path
        Metric Type: NONE,   Path Accumulated Metric: 0
  Attributes:
    Binding SID: 24012
    Forward Class: Not Configured
    Steering labeled-services disabled: no
    Steering BGP disabled: no
    IPv6 caps enable: yes
    Invalidation drop enabled: no

顧客 A の BGP 経路も上記で設定した SR Policy (24012) を使用するようになっています。

RP/0/RP0/CPU0:PE1#show route vrf 100 192.168.1.0/24 detail
Mon Aug 15 13:34:37.770 JST

Routing entry for 192.168.1.0/24
  Known via "bgp 65000", distance 200, metric 0, type internal
  Installed Aug 10 14:31:37.916 for 4d13h
  Routing Descriptor Blocks
    10.255.0.3, from 10.255.0.3
      Nexthop in Vrf: "default", Table: "default", IPv4 Unicast, Table Id: 0xe0000000
      Route metric is 0
      Label: 0x10 (16)
      Tunnel ID: None
      Binding Label: 0x5dcc (24012)
      Extended communities count: 0
      Source RD attributes: 0x0000:65000:100
      NHID:0x0(Ref:0)
  Route version is 0x5 (5)
  No local label
  IP Precedence: Not Set
  QoS Group ID: Not Set
  Flow-tag: Not Set
  Fwd-class: Not Set
  Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_REMOTE
  Download Priority 3, Download Version 22
  No advertising protos.

PE2 (Junos)

set routing-options flex-algorithm 128 color 100

こちらも PE1 の Algorithm 128 の SID (17001) が選択されています。

user@PE2> show route table inetcolor.0

inetcolor.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.255.0.1-100<c>/64
                   *[L-ISIS/14] 5d 17:18:36, metric 30
                    >  to 10.0.3.2 via ge-0/0/1.0, Push 17001
(snip)

顧客 A の BGP 経路も 17001 SID として積むようになっています。

user@PE2> show route table 100.inet.0 192.168.0.0/24 extensive

100.inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
192.168.0.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 192.168.0.0/24 -> {indirect(1048579)}
        *BGP    Preference: 170/-101
                Route Distinguisher: 65000:100
                Next hop type: Indirect, Next hop index: 0
                Address: 0x704fafc
                Next-hop reference count: 3
                Source: 10.255.0.1
                Next hop type: Router, Next hop index: 654
                Next hop: 10.0.3.2 via ge-0/0/1.0, selected
                Label operation: Push 24004, Push 17001(top)
                Label TTL action: prop-ttl, prop-ttl(top)
                Load balance label: Label 24004: None; Label 17001: None;
                Label element ptr: 0x780fb50
                Label parent element ptr: 0x782f1d0
                Label element references: 1
                Label element child references: 0
                Label element lsp id: 0
                Session Id: 0x142
                Protocol next hop: 10.255.0.1-100<c>
                Label operation: Push 24004
                Label TTL action: prop-ttl
                Load balance label: Label 24004: None;
                Indirect next hop: 0x7199204 1048579 INH Session ID: 0x0
                State: <Secondary Active Int Ext ProtectionCand>
                Local AS: 65000 Peer AS: 65000
                Age: 4d 10:32:58        Metric: 0       Metric2: 30
                Validation State: unverified
                ORR Generation-ID: 0
                Task: BGP_65000.10.255.0.1
                Announcement bits (1): 0-KRT
                AS path: ?
                Communities: target:65000:100 color:0:100
                Import Accepted
                VPN Label: 24004
                Localpref: 100
                Router ID: 10.255.0.1
                Primary Routing Table: bgp.l3vpn.0
                Thread: junos-main
                Indirect next hops: 1
                        Protocol next hop: 10.255.0.1-100<c> Metric: 30
                        Label operation: Push 24004
                        Label TTL action: prop-ttl
                        Load balance label: Label 24004: None;
                        Indirect next hop: 0x7199204 1048579 INH Session ID: 0x0
                        Indirect path forwarding next hops: 1
                                Next hop type: Router
                                Next hop: 10.0.3.2 via ge-0/0/1.0
                                Session Id: 0x142
                                10.255.0.1-100<c>/64 Originating RIB: inetcolor.0
                                  Metric: 30 Node path count: 1
                                  Forwarding nexthops: 1
                                        Next hop type: Router
                                        Next hop: 10.0.3.2 via ge-0/0/1.0
                                        Session Id: 0x0

5. traceroute による VPN の通信経路確認

PE1 -> PE2

PE1 -> P2 -> P1 -> PE2 と通過していることが観測できます。

RP/0/RP0/CPU0:PE1#traceroute 192.168.1.254 vrf 100
Mon Aug 15 13:39:24.020 JST

Type escape sequence to abort.
Tracing the route to 192.168.1.254

 1  10.0.1.2 [MPLS: Labels 17003/16 Exp 0] 15 msec  13 msec  3 msec
 2  10.0.4.1 [MPLS: Labels 17003/16 Exp 0] 27 msec  8 msec  28 msec
 3  192.168.1.254 3 msec  9 msec  2 msec

PE2 -> PE1

逆順の PE2 -> P1 -> P2 -> PE1 と通過していることが観測できます。

user@PE2> traceroute 192.168.0.254 routing-instance 100
traceroute to 192.168.0.254 (192.168.0.254), 30 hops max, 52 byte packets
 1  10.0.2.1 (10.0.2.1)  2.871 ms  13.558 ms  2.522 ms
     MPLS Label=17001 CoS=0 TTL=1 S=0
     MPLS Label=24004 CoS=0 TTL=1 S=1
 2  10.0.4.2 (10.0.4.2)  2.522 ms  2.372 ms  2.534 ms
     MPLS Label=17001 CoS=0 TTL=1 S=0
     MPLS Label=24004 CoS=0 TTL=2 S=1
 3  10.0.1.1 (10.0.1.1)  10.075 ms *  4.672 ms

リンク障害時の Flex-Algorithm 検証

前節で設定したネットワークにて1つのリンクを故意に閉塞し、障害時においても Algorithm 内でパスが切り替わる動作を確かめます。 落とすリンクは P1 と P2 の間です。

当該のリンクを落とした後も Algorithm 128 は有効なため、 Algorithm 128 内での最短パスに切り替わります。

切り替え前の P2 および PE2 のテーブル

どちらも P1 を向いています。

P2

user@P2> show route table mpls.0 label 17003

17003              *[L-ISIS/14] 5d 20:37:15, metric 20
                    >  to 10.0.4.1 via ge-0/0/2.0, Swap 17003

PE2

user@PE2> show route table mpls.0 label 17001

17001              *[L-ISIS/14] 01:52:13, metric 40
                    >  to 10.0.2.1 via ge-0/0/0.0, Swap 17001

切り替え後の P2 および PE2 のテーブル

どちらもメトリックが増え、直接それぞれ転送するようになります。

P2

user@P2> show route table mpls.0 label 17003

17003              *[L-ISIS/14] 00:00:29, metric 100
                    >  to 10.0.3.1 via ge-0/0/1.0, Pop

PE2

user@PE2> show route table mpls.0 label 17001

17001              *[L-ISIS/14] 00:00:22, metric 120
                    >  to 10.0.3.2 via ge-0/0/1.0, Swap 17001

traceroute による VPN の通信経路確認

PE1 -> PE2

リンク障害時の図の通り PE1 -> P2 -> PE2 と通過していることが観測できます。

RP/0/RP0/CPU0:PE1#traceroute 192.168.1.254 vrf 100
Mon Aug 15 15:45:51.232 JST

Type escape sequence to abort.
Tracing the route to 192.168.1.254

 1  10.0.1.2 [MPLS: Labels 17003/16 Exp 0] 8 msec  12 msec  2 msec
 2  192.168.1.254 10 msec  2 msec  8 msec

PE2 -> PE1

逆順の PE2 -> P2 -> PE1 と通過していることが観測できます。

user@PE2> traceroute 192.168.0.254 routing-instance 100
traceroute to 192.168.0.254 (192.168.0.254), 30 hops max, 52 byte packets
 1  10.0.3.2 (10.0.3.2)  2.428 ms  1.969 ms  1.463 ms
     MPLS Label=17001 CoS=0 TTL=1 S=0
     MPLS Label=24004 CoS=0 TTL=1 S=1
 2  10.0.1.1 (10.0.1.1)  12.766 ms *  9.734 ms

まとめ

本記事ではアンダーレイの分割や複数指標での最適経路計算ができる Flexible Algorithm ついて解説しました。 Multi-vendor での実装とリンク障害時の動作検証を紹介しました。 Flexible Algorithm はまだ draft 段階のため、機能追加が盛んで相互運用性も限定的ですが、ネットワーク網の意図を表現する方法として VPN の TE にも使用可能と考えられます。

次回の記事では、Flex-Algorithm のメトリックとしても使える、遅延測定値を基にした Delay-based TE を紹介予定です。

(2022/09/05 追記) 公開しました:[Multi-AS Segment Routing 検証連載 #7] Delay-Based TE

© NTT Communications Corporation All Rights Reserved.