セグメントルーティングトラフィックエンジニアリングのためのOSPFで柔軟なアルゴリズムを設定する方法
柔軟なアルゴリズムにより、IGP単独でネットワーク上の制約ベースのパスを計算できるため、ネットワークコントローラを使用せずにシンプルなトラフィック制御を行うことができます。本格的なセグメントルーティングを備えたコントローラを実装していないが、ネットワークでセグメントルーティングのメリットを享受したいネットワーク向けの軽量ソリューションです。
今後の予定
柔軟なアルゴリズムの設定の詳細については、『OSPF User Guide』を参照してください
セグメントルーティングのためのOSPFフレキシブルアルゴリズムの理解
要件に基づいてさまざまなパラメーターとリンク制約を使用してパスを計算する柔軟なアルゴリズムを定義することで、ネットワークを薄くスライスできます。例えば、IGPメトリックを最小化するパスを計算する柔軟なアルゴリズムを定義し、ネットワークを別々のプレーンに分割するためにトラフィック制御メトリックに基づいてパスを計算する別の柔軟なアルゴリズムを定義できます。この機能により、コントローラを持たないネットワークでも、実際にネットワークコントローラを実装することなく、セグメントルーティングを使用してトラフィック制御を設定することができます。プレフィックスSIDを使用して、制約ベースのパスに沿ってパケットを誘導できます。ポリシー設定により、柔軟なアルゴリズムのプレフィックスSIDを設定することができます。
IGPプロトコルは、リンクメトリックを使用して最適なパスを計算します。ただし、特定のタイプのトラフィックに対しては、最適な IGP パスが必ずしも最適なパスであるとは限りません。そのため、最短のIGPメトリックに基づいて計算されたIGP最適なパスは、IGPメトリックに反映されないトラフィック要件のために、トラフィックエンジニアリングパスに置き換えられることが多いIGPです。通常、RSVP-TE または SR TE を使用して、この制限を克服するための追加のメトリックと制約に基づいてパスを計算します。Junosは、IGPによって計算された元のパスに加えて、またはその代わりとして、このようなパスを転送テーブルにインストールします。
- フレキシブルアルゴリズムを設定するメリット
- フレキシブルアルゴリズム定義(FAD)とは?
- 柔軟なアルゴリズムへの参加
- 柔軟なアルゴリズム定義で構成されたネットワークトポロジー
- 柔軟なアルゴリズムRIB
- BGPコミュニティと柔軟なアルゴリズム
- サポートされている機能とサポートされていない機能
フレキシブルアルゴリズムを設定するメリット
-
ネットワークのコアで使用できる、セグメントルーティングトラフィックエンジニアリングの軽量バージョンです。
-
ネットワークコントローラをインストールしなくても、セグメントルーティングによるトラフィック制御の設定が可能です。
-
BGP-LSやスタティックパスを設定せずに、スライスごとのイコールコストマルチパス(ECMP)およびTI-LFAを利用します。
-
同じ柔軟なアルゴリズム定義と制約計算を使用して、TI-LFAバックアップパスを計算します。
-
RSVP や LDP を設定せずに、OSPFv2 のみを使用したセグメント ルーティング トラフィック エンジニアリングを活用します。
-
単一ラベルに基づいて制約付きプライマリパスをプロビジョニングする機能。
フレキシブルアルゴリズム定義(FAD)とは?
柔軟なアルゴリズムにより、IGPは指定された制約に基づいて追加の最適パスを計算できるため、ネットワークコントローラを使用せずに簡単なトラフィック制御を行うことができます。本格的なセグメントルーティングを備えたコントローラを実装していないが、ネットワークでセグメントルーティングのメリットを享受したいネットワーク向けの軽量ソリューションです。すべての運用担当者は、要件に応じて個別の制約または色を定義できます。
柔軟なアルゴリズムを定義するには、[edit routing-options]階層レベルでflex-algorithm idステートメントを含めます。柔軟なアルゴリズム定義(FAD)には、128から255までの識別子が割り当てられます。この柔軟なアルゴリズムは、ネットワーク内の 1 つ以上のルーターで定義できます。柔軟なアルゴリズムは、以下のパラメーターに基づいて最適なパスを計算します。
-
Calculation type—SPFまたはストリクトSPFの2つの計算タイプオプションがあります。FADでこれらの計算タイプのいずれかを指定できます。トラフィックエンジニアリングのショートカットなどの特定のローカルポリシーに基づいて、デバイスのSPF計算に影響を与えたい場合は、SPF計算タイプを選択します。厳密なSPFを選択した場合、ローカルポリシーはSPFパスの選択に影響を与えることはできません。
-
Metric type- IGP メトリックまたは TE メトリックは、使用可能なメトリック タイプ オプションです。ネットワークの要件に応じて、FADでこれらのメトリックタイプのいずれかを指定できます。特定のリンクに IGP メトリックを使用したくない場合は、OSPFv2 がルートの計算に使用できる TE メトリックを設定できます。
-
Priority- 要件に応じてFADに優先度を割り当てることができ、OSPFv2は割り当てられた優先度に基づいて、特定のFADアドバタイズメントを別のFADよりも優先します。
-
Set of Link constraints-
[edit protocols mpls admin-groups]階層レベルで多くのプロトコルのadmin-groupsを設定して、個々のリンクに色を付けることができます。これらのadmin-groupsは、[edit routing-options flex-algorithm definition admin-groups]階層レベルで、include any、include-all、またはexcludeとして定義できます。
冗長性を確保し、競合を避けるために、少数のルーターでのみ柔軟なアルゴリズムを設定することをお勧めします。柔軟なアルゴリズムの定義は、 FAD sub-TLVsとしてIGPでアドバタイズされます。非常に大規模なネットワークでは、柔軟なアルゴリズム定義を 8 つ以上設定することはお勧めしません。柔軟なアルゴリズムはそれぞれ独自のパスを計算し、それを超えるとパフォーマンスの問題が発生する可能性があるためです。
デフォルトのFADには、以下のパラメータがあります。
-
計算タイプ:SPF
-
メトリックタイプ:IGP-Metric
-
優先度:0
-
リンク制約:なし
ライブネットワーク内またはその場で柔軟なアルゴリズムの定義を変更すると、すべてのノードが新しいパスに収束するまでトラフィックが中断する可能性があります。
Junos OS 21.4R1以降、TEDで「柔軟なアルゴリズム定義(FAD)」と「柔軟なアルゴリズムプレフィックスメトリック(FAPM)」をサポートし、BGP-LSで2つの新しい対応するTLV「FAD TLV」と「FAPM TLV」を実装します。FAD TLVの値には、フレックスアルゴリズム、メトリックタイプ、計算タイプ、および優先度が含まれており、すべてそれぞれ1バイトです。TLVには、0個以上のサブTLVが含まれている場合があります。5つのサブtlvは、フレックスアルゴがアフィニティを除外、フレックスアルゴにアフィニティを含む、フレックスアルゴがすべてのアフィニティを含む、フレックスアルゴ定義フラグ、フレックスアルゴがSRLGを除外するのです。
FAD TLVは、対応するノードが基盤となるIGP TLVまたはサブTLVに由来する場合にのみ、ノードNLRIのBGP-LS属性に追加できます。ノードNLRIに関連付けられたBGP-LS属性には、ノードがアドバタイズしている各アルゴリズムの柔軟なアルゴリズム定義に対応する1つ以上のFAD TLVが含まれている場合があります。
FAPM TLVの値には、フレックスアルゴリズム(1バイト)、予約済み(3バイト)、メトリック(4バイト)が含まれています。FAPM TLVは、対応するノードがプレフィックスから発信された場合のみ、ノードから発信されたプレフィックスNLRIのBGP-LS属性に追加できます。
Junos OSリリース22.4R1以降、エリア間プレフィックスに最適なエンドツーエンドのパスを可能にするために、柔軟なアルゴリズムプレフィックスメトリック(FAPM)が定義されました。エリアボーダールーター(ABR)は、指定されたフレキシブルアルゴリズム(フレックスアルゴ)で到達可能なエリア間でプレフィックスをアドバタイズする場合に、FAPMを含める必要があります。プレフィックスが到達できない場合、エリア間でアドバタイズする際に、ABRはそのフレックスアルゴリズムにそのプレフィックスを含めてはなりません。定義された FAPM は、エリア間サポートを提供します。
柔軟なアルゴリズムへの参加
要件に応じて、特定のルーターを特定の柔軟なアルゴリズムに参加するように設定できます。柔軟なアルゴリズムの定義に基づいて計算されたパスは、さまざまなアプリケーションによって使用され、それぞれが独自のデータプレーンを使用して、そのようなパスを介してデータを転送する可能性があります。参加デバイスは、OSPFv2のセグメントルーティングフレキシブルアルゴリズムサブTLV内のすべてのアプリケーションに、特定のフレキシブルアルゴリズムへの参加を明示的にアドバタイズする必要があります。特定の柔軟なアルゴリズムに参加するようにノードを設定することは、その FAD で指定された制約をサポートできる場合に条件です。
柔軟なアルゴリズムへの参加を設定するには、[edit protocols isis source-packet- routing]階層レベルにflex-algorithmステートメントを含めます。同じデバイスがFADをアドバタイズし、柔軟なアルゴリズムに参加することもできます。
inetcolor.0およびmpls.0ルーティングテーブルでOSPFフレキシブルアルゴリズムルートの優先度を設定することで、パス選択を制御できます。
柔軟なアルゴリズム定義で構成されたネットワークトポロジー
図1 はサンプルトポロジーを示しており、8つのルーターR0、R1、R2、R3、R4、R5、R6、およびR7があります。4つの柔軟なアルゴリズム、128、129、130、および135は、以下の表に示すようにadminグループで定義および設定されます。
| フレックスアルゴリズム定義(FAD) |
色 |
|---|---|
| 128 |
任意の赤を含める |
| 129 |
緑色を含む |
| 130 |
緑と青を含める |
| 135 |
赤を除外する |
図2 は、FAD 128がadminグループredで設定された任意のインターフェイスでトラフィックをどのようにルーティングするかを示しています。
図3 は、FAD 129がadminグループgreenで設定されたインターフェイスでトラフィックをどのようにルーティングするかを示しています。
図4 は、FAD 130が管理グループ緑と青で設定された任意のインターフェイスでトラフィックをルーティングする方法を示しています。
図5 は、FAD 135がadminグループredで設定されていないインターフェイスでトラフィックをどのようにルーティングするかを示しています。
柔軟なアルゴリズムRIB
ルーターが対応するフレキシブル アルゴリズムに参加するすべてのフレキシブル アルゴリズムについて、ルートは、対応するフレキシブル アルゴリズム RIB グループ(ルーティング テーブルとも呼ばれます)にインストールされます。デフォルトでは、ラベル付きのOSPFv2フレキシブルアルゴリズムルートが、inet.color、 inet(6)color.0 、および mpls.0 RIBにインストールされます。
BGPコミュニティと柔軟なアルゴリズム
柔軟なアルゴリズムは、VPN サービスなどの他のサービスのルートを解決するために、BGP カラー コミュニティを関連付けることができます。デフォルトでは、関連するBGPカラーコミュニティは柔軟なアルゴリズムIDと同じです。inet(6)color.0 テーブルにインストールされている柔軟なアルゴリズムのイングレスルートは、ルート内にこのカラーコミュニティを持ちます。ただし、 [edit routing-options flex-algorithm id color desired color community value] 階層レベルで異なるBGPカラーコミュニティを設定することができます。
柔軟なアルゴリズムのためにBGPカラーコミュニティを変更すると、トラフィックが中断する可能性があります。フレキシブルアルゴリズムのBGPカラーコミュニティを変更した場合、そのフレキシブルアルゴリズムに関連するすべてのルートがRIBから削除され、新しいカラーで再度追加されます。
サポートされている機能とサポートされていない機能
Junos OSは、以下のシナリオで柔軟なアルゴリズムをサポートします。
-
さまざまな柔軟なアルゴリズムのプレフィックスSIDの設定とアドバタイズのサポート。
-
インターネットドラフトdraft-ietf-lsr-flex-algo-05.txt IGP柔軟なアルゴリズムを部分的にサポート
- OSPFv2のみがセグメントルーティングをサポートしているため、柔軟なアルゴリズムの現在の実装はOSPFv2でのみサポートされています。
Junos OS は、柔軟なアルゴリズムと組み合わせた以下の機能をサポートしていません。
-
柔軟なアルゴリズムはデフォルトのユニキャストトポロジーにのみ適用可能で、OSPFv2マルチトポロジーはサポートされていません。
- OSPFv2ショートカットおよびその他のOSPFv2トラフィックエンジニアリング設定オプションは、柔軟なアルゴリズム計算には適用されません。.
- 柔軟なアルゴリズムの現在の実装は、OSPFv3ではサポートされていません。
-
フレキシブル アルゴリズム プレフィックス SID のエリア間(OSPFv2)リークはサポートされていません。
-
プレフィックスとSIDの競合解決はサポートされていません。
-
TI-LFAが優先されるFRR計算であるため、リモートループフリーの代替機能はサポートされていません。
-
柔軟なアルゴリズムの参加がない場合の柔軟なアルゴリズム定義のアドバタイズはサポートされていません。
-
トランスポートクラスRIBはサポートされていません。
例:OSPF フレキシブル アルゴリズム
概要
この例では、OSPFv2ネットワークで柔軟なアルゴリズムを設定する方法を示します。この柔軟なアルゴリズムにより、コントローラを持たないネットワークでも、実際にネットワークコントローラを実装することなく、セグメントルーティングを使用してトラフィック制御を設定することができます。
要件に基づいてさまざまなパラメーターとリンク制約を使用してパスを計算する柔軟なアルゴリズムを定義することで、ネットワークを薄くスライスできます。計算型、メトリック型、および一連の制約で構成されるセットは、フレキシブルアルゴリズム定義(FAD)と呼ばれます。FADを定義し、OSPFv2ネットワークで同じものをアドバタイズすることができます。デバイスは、特定の FAD の制約をサポートしていれば、特定の柔軟なアルゴリズムに参加するように設定することもできます。
トポロジー
図6は、R0、R1、R2、R3、R4、およびR5の6つのデバイスが存在する柔軟なアルゴリズムトポロジーを示しています。2つの柔軟なアルゴリズム128および129は、これらの各デバイスに定義されている。管理グループred、blue、greenはデバイス上で設定されています。メトリックタイプ、計算タイプ、リンク制約などの異なるパラメーターを持つFADは、各デバイスで定義されます。
要件
この例では、以下のハードウェアおよびソフトウェアコンポーネントを使用しています。
- 6 台の MXシリーズ ルーター。
- すべてのデバイスで実行されている Junos OS リリース 21.1R1 以降。
設定
CLIクイックコンフィグレーション
この例をすばやく設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストします。
デバイスR0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R0_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R0_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R0_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R0_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement ex-bgp term 1 from route-filter 10.1.1.0/24 exact set policy-options policy-statement ex-bgp term 1 then community add blue set policy-options policy-statement ex-bgp term 1 then accept set policy-options policy-statement ex-bgp term 0 from route-filter 10.1.0.0/24 exact set policy-options policy-statement ex-bgp term 0 then community add red set policy-options policy-statement ex-bgp term 0 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set policy-options community blue members color:1:129 set policy-options community red members color:0:128 set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection 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 include-any RED set routing-options flex-algorithm 129 definition metric-type te-metric set routing-options flex-algorithm 129 definition spf set routing-options flex-algorithm 129 definition admin-group include-all BLUE set routing-options router-id 192.168.255.10 set routing-options autonomous-system 65000 set routing-options static route 10.1.1.0/24 receive set routing-options static route 10.1.0.0/24 receive set routing-options forwarding-table export pplb set routing-options flex-algorithm 128 use-transport-class set routing-options transport-class auto-create
デバイスR1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R1_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R1_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R1_to_R2_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.12.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R1_to_R2_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.12.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R1_to_R3 set interfaces ge-0/0/4 unit 0 family inet address 10.10.13.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R1_to_R4 set interfaces ge-0/0/5 unit 0 family inet address 10.10.14.1/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.11/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.11/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1281 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1291 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1001 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols mpls interface ge-0/0/4.0 admin-group BLUE set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.11 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
デバイスR2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R2_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.12.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R2_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.12.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R2_to_R3 set interfaces ge-0/0/2 unit 0 family inet address 10.10.23.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R2_to_R4 set interfaces ge-0/0/3 unit 0 family inet address 10.10.24.1/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R2_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.25.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R2_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.25.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.12/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.12/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1282 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1292 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1002 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.12 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
デバイスR3
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R3_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.3.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R3_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.3.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R3_to_R1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.13.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R3_to_R2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.23.2/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R3_to_R4_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.34.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R3_to_R4_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.34.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.13/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.13/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1003 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group BLUE set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.13 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
デバイスR4
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R4_to_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.14.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R4_to_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.24.2/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R4_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.34.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R4_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.34.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R4_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.45.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R4_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.45.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.14/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.14/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1004 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/0.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.14 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
デバイスR5
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R5_to_R2_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.25.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R5_to_R2_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.25.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R5_to_R4_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.45.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R5_to_R4_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.45.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.15/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.15/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1285 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1295 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1005 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group GREEN set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.15 set routing-options autonomous-system 65000 set routing-options static route 10.1.15.0/24 reject set routing-options forwarding-table export pplb
デバイスR0の設定
OSPFv2の柔軟なアルゴリズムを設定するには、デバイスR0で以下の手順を実行します。
-
IPトランスポートを有効にするようにデバイスインターフェイスを設定します。
[edit] user@R0set interfaces ge-0/0/0 description R0_to_R1_1 user@R0set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 user@R0set interfaces ge-0/0/0 unit 0 family mpls user@R0set interfaces ge-0/0/1 description R0_to_R1_2 user@R0set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 user@R0set interfaces ge-0/0/1 unit 0 family mpls user@R0set interfaces ge-0/0/2 description R0_to_R3_1 user@R0set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 user@R0set interfaces ge-0/0/2 unit 0 family mpls user@R0set interfaces ge-0/0/3 description R0_to_R3_2 user@R0set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 user@R0set interfaces ge-0/0/3 unit 0 family mpls
-
OSPF セッションのルーター ID として使用するループバック インターフェイス(lo0)アドレスを設定します。
[edit] user@R0set interfaces lo0 unit 0 family inet address 192.168.255.10/32
-
ルーターIDと自律システム(AS)番号を設定して、同じASに属する一連のルーティングデバイス内でルーティング情報を伝送します。
[edit] user@R0set routing-options router-id 192.168.255.10 user@R0set routing-options autonomous-system 65000
-
パケットの負荷分散を行うポリシーを定義し、パケットごとのポリシーを適用してトラフィックのロードバランシングを有効にします。
[edit] user@R0set policy-options policy-statement pplb then load-balance per-packet user@R0set routing-options forwarding-table export pplb
-
デバイスR0が192.168.255.10/32ネットワークに到達できるようにするルーティングポリシー条件のルートフィルターを設定します。
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact
- 管理インターフェイスを除くすべてのインターフェイスで MPLS を設定します。
[edit] user@R0set protocols mpls interface all user@R0set protocols mpls interface fxp0.0 disable
-
MPLSラベル範囲を設定して、リンクに静的ラベルを割り当てます。
[edit] user@R0set protocols mpls label-range static-label-range 1000 8000
-
TI-LFA を設定して、リンクとノードの障害に対する保護を有効にします。TI-LFAを用いたSRでは、プライマリパスに障害が発生したり利用できなくなった場合、バックアップパスや代替パスに瞬時にトラフィックをルーティングすることで、ネットワーク接続の早期復旧を実現します。
[edit] user@R0set protocols ospf backup-spf-options use-source-packet-routing
-
バックアップの最短パスファースト属性を保護するために、セグメントルーティングルーティングパスのラベルの最大数を設定します。
[edit] user@R0set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5
-
OSPFプロトコルのSPRINGのセグメントルーティンググローバルブロック(SRGB)のプレフィックスセグメント属性、開始ラベル、およびインデックス範囲を設定します。
[edit] user@R0set protocols ospf source-packet-routing prefix-segment prefix-sid user@R0set protocols ospf source-packet-routing srgb start-label 80000 user@R0set protocols ospf source-packet-routing srgb index-range 5000
-
コンバージェンス後のパスをたどる OSPF インターフェイスでノードリンク保護を有効にします。
[edit] user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection
-
プロトコルがループループバック インターフェイス上で実行されないようにし、ループバック インターフェイスがネットワーク全体で正しくアドバタイズされることを確認するには、ループバック インターフェイスをパッシブとして設定します。
[edit] user@R0set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
デバイスR0で柔軟なアルゴリズムを定義します。128から255までの各FADに名前を割り当てます。
[edit] user@R0set routing-options flex-algorithm 128 user@R0set routing-options flex-algorithm 129
定義のパラメーターを指定します。OSPFv2は、FADのこれらの指定されたパラメーターに基づいてパスを計算します。
-
OSPFv2プロトコルがパスを計算する際の計算タイプを指定します。
[edit] user@R0set routing-options flex-algorithm 128 definition spf user@R0set routing-options flex-algorithm 128 definition spf
-
OSPFv2がパスを計算するメトリックタイプを指定します。
[edit] user@R0set routing-options flex-algorithm 128 definition metric-type igp-metric user@R0set routing-options flex-algorithm 129 definition metric-type te-metric
-
RSVPトラフィックエンジニアリングを有効にしている場合、多くのプロトコルのadmin-groupsを設定して、個々のリンクに色を付けることができます。
[edit] user@R0set protocols mpls admin-groups RED 0 user@R0set protocols mpls admin-groups BLUE 1 user@R0set protocols mpls admin-groups GREEN 2
-
設定したadmin-groupsポリシーをデバイスR0インターフェイスに割り当てます。
[edit] user@R0set protocols mpls interface ge-0/0/0.0 admin-group RED user@R0set protocols mpls interface ge-0/0/1.0 admin-group GREEN user@R0set protocols mpls interface ge-0/0/2.0 admin-group RED user@R0set protocols mpls interface ge-0/0/3.0 admin-group GREEN
-
要件に従って管理グループを定義します。
[edit] user@R0set routing-options flex-algorithm 128 definition admin-group include-any RED user@R0set routing-options flex-algorithm 129 definition admin-group include-all GREEN user@R0set routing-options flex-algorithm 129 definition admin-group include-all BLUE
注:リンク制約のあるFADが機能するためには、関連するすべてのリンクがOSPFv2でadmin-colorをアドバタイズする必要があります。インターフェイスでRSVPを有効にするか、トラフィックエンジニアリング用にRSVPを設定していない場合は、常に
[edit protocols ospf]階層レベルでset traffic-engineering advertiseを設定する必要があります。[edit] user@R0set protocols ospf traffic-engineering advertisement always
-
- デバイスR0で柔軟なアルゴリズム参加を設定します。同じデバイスがFADをアドバタイズし、柔軟なアルゴリズムに参加することもできます。
[edit] user@R0set protocols ospf source-packet-routing flex-algorithm 128 user@R0set protocols ospf source-packet-routing flex-algorithm 129
-
ポリシー設定を通じてプレフィックスセグメントをアドバタイズします。
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then accept
結果
設定の結果を確認します。
設定モードから、 show interfaces、 show routing-options、 show protocols、 show policy-options コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
interfaces {
ge-0/0/0 {
description R0_to_R1_1;
unit 0 {
family inet {
address 10.10.1.1/30;
}
family mpls;
}
}
ge-0/0/1 {
description R0_to_R1_2
unit 0 {
family inet {
address 10.10.1.5/30;
}
family mpls;
}
}
ge-0/0/2 {
description R0_to_R3_1
unit 0 {
family inet {
address 10.10.3.1/30;
}
family mpls;
}
}
ge-0/0/3 {
description R0_to_R3_2
unit 0 {
family inet {
address 10.10.3.5/30;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.255.10/32;
}
}
}
}
policy-options {
policy-statement pplb {
then {
load-balance per-packet;
}
}
policy-statement prefix-sid {
term 1001 {
from {
route-filter 192.168.255.10/32 exact;
}
then {
prefix-segment {
algorithm 128 index 1280 node-segment;
algorithm 129 index 1290 node-segment;
algorithm 130 index 1300 node-segment;
algorithm 131 index 1310 node-segment;
algorithm 132 index 1320 node-segment;
algorithm 133 index 1330 node-segment;
algorithm 134 index 1340 node-segment;
algorithm 135 index 1350 node-segment;
index 1000;
node-segment;
}
accept;
}
}
}
}
protocols {
mpls {
admin-groups {
RED 0;
BLUE 1;
GREEN 2;
}
label-range {
static-label-range 1000 8000;
}
interface all;
interface fxp0.0 {
disable;
}
interface ge-0/0/0.0 {
admin-group RED;
}
interface ge-0/0/1.0 {
admin-group GREEN;
}
interface ge-0/0/2.0 {
admin-group RED;
}
interface ge-0/0/3.0 {
admin-group GREEN;
}
}
ospf {
backup-spf-options {
use-post-convergence-lfa maximum-labels 5;
use-source-packet-routing;
}
traffic-engineering {
advertisement always;
}
source-packet-routing {
prefix-segment prefix-sid;
srgb start-label 80000 index-range 5000;
flex-algorithm [ 128 129 ];
}
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/0.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/1.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/2.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/3.0 {
post-convergence-lfa {
node-protection;
}
}
}
}
}
routing-options {
flex-algorithm 128 {
definition {
metric-type igp-metric;
spf;
admin-group include-any RED;
}
}
flex-algorithm 129 {
definition {
metric-type te-metric;
spf;
admin-group include-all [ GREEN BLUE ];
}
}
router-id 192.168.255.10;
autonomous-system 65000;
forwarding-table {
export pplb;
}
}
検証
設定が正常に機能していることを確認するには、以下のタスクを実行します。
- OSPFデータベースの検証
- アクション
- フレキシブルアルゴリズムの詳細の検証
- アクション
- 柔軟なアルゴリズム固有の OSPF 内部ルートの検証
- アクション
- フレックスカラールートの検証
- アクション
- OSPFログの検証
- アクション
OSPFデータベースの検証
目的
柔軟なアルゴリズムシグナリングが OSPF データベースに表示されていることを確認します。
アクション
動作モードから、 show ospf database opaque-area extensive コマンドを実行します。
R0について
user@R0>show ospf database opaque-area extensive
OpaqArea 4.0.0.0 192.168.255.10 0x800000ad 503 0x22 0xb85d 76
Opaque LSA
SR-Algorithm (8), length 3:
Algo (1), length 1:
0
Algo (2), length 1:
128
Algo (3), length 1:
129
SID/Label Range (9), length 12:
Range Size (1), length 3:
5000
SID/Label (1), length 3:
Label (1), length 3:
80000
Flex-Algorithm Definition (16), length 12:
Flex-Algo (1), length 1:
128
Metric-Type (2), length 1:
0
Calc-Type (3), length 1:
0
Priority (4), length 1:
0
FAD AG Include Any (2), length 4:
Include Any AG (1), length 4:
0x1
Flex-Algorithm Definition (16), length 12:
Flex-Algo (1), length 1:
129
Metric-Type (2), length 1:
2
Calc-Type (3), length 1:
0
Priority (4), length 1:
0
FAD AG Include All (3), length 4:
Include All AG (1), length 4:
0x6
Aging timer 00:51:37
Installed 00:08:20 ago, expires in 00:51:37, sent 00:08:18 ago
Last changed 5d 13:35:52 ago, Change count:
意味
R0のこの出力は、以下を示しています。
このデバイスは、3つのセグメントルーティングアルゴリズム(2つの柔軟なアルゴリズムを含む)をアドバタイズします。
このデバイスによって 2 つの FAD がアドバタイズされます。
フレキシブルアルゴリズムの詳細の検証
目的
柔軟なアルゴリズムの詳細が表示されていることを検証します。
アクション
動作モードから、 show ospf spring flex-algorithm <flex-algorithm-id> コマンドを実行します。
R0について
user@R0>show ospf spring flex-algorithm 128
Flex Algo: 128, Area: 0.0.0.0
Color: 128, Participating, FAD supported
Winner: 192.168.255.10, Metric: 0, Calc: 0, Prio: 0, inc-any: 0x1, FAD supported
Include-Any: 0x1 RED
SPF Version: 296
Participation toggles: 1
Topo refresh count: 0
Full SPFs: 296, Partial SPFs: 0
意味
R0で設定された柔軟なアルゴリズムの詳細が表示されます。
柔軟なアルゴリズム固有の OSPF 内部ルートの検証
目的
柔軟なアルゴリズム固有の OSPF 内部ルートが表示されていることを検証します。
アクション
動作モードから、 show ospf route flex-algorithm <flex-algorithm-id> コマンドを実行します。
R0について
user@R0>show ospf route flex-algorithm 128
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface Address/LSP
192.168.255.11 Intra Router IP 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.12 Intra Router IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13 Intra Router IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14 Intra Router IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15 Intra Router IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.1.0/30 Intra Network IP 1 ge-0/0/0.0
10.10.1.4/30 Intra Network IP 1 ge-0/0/1.0
10.10.3.0/30 Intra Network IP 1 ge-0/0/2.0
10.10.3.4/30 Intra Network IP 1 ge-0/0/3.0
10.10.12.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.12.4/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.13.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.14.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.23.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.24.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.25.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.25.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.34.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.34.4/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.45.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.45.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
128.49.106.245/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
128.49.107.40/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.10/32 Intra Network IP 0 lo0.0
192.168.255.10/32 Intra Network Spring 0 lo0.0
192.168.255.11/32 Intra Network IP 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.11/32 Intra Network Spring 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.12/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.12/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13/32 Intra Network Spring 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15/32 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15/32 Intra Network Spring 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
16 Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2
Bkup MPLS ge-0/0/1.0 10.10.1.6
16 (S=0) Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2
Bkup MPLS ge-0/0/1.0 10.10.1.6
17 Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6
Bkup MPLS ge-0/0/0.0 10.10.1.2
17 (S=0) Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6
Bkup MPLS ge-0/0/0.0 10.10.1.2
20 Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2
Bkup MPLS ge-0/0/3.0 10.10.3.6
20 (S=0) Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2
Bkup MPLS ge-0/0/3.0 10.10.3.6
21 Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6
Bkup MPLS ge-0/0/2.0 10.10.3.2
21 (S=0) Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6
Bkup MPLS ge-0/0/2.0 10.10.3.2
81001 Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
81001 (S=0) Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
81003 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81004 Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81004 (S=0) Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81006 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81007 Intra Network Mpls 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
意味
show ospf routeコマンドはflex-algorithmオプションで拡張されており、柔軟なアルゴリズム固有のOSPF内部ルートを表示します。各ルートには、flex-algo-id がプレフィックスが付いています。
フレックスカラールートの検証
目的
柔軟なアルゴリズム固有の OSPF 内部ルートが表示されていることを検証します。
アクション
動作モードから、 show route protocol ospf コマンドを実行します。
R0について
user@R0>show route protocol ospf
junos-rti-tc-<color>.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.255.11-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 1
> to 10.10.1.2 via ge-0/0/0.0
to 10.10.3.2 via ge-0/0/2.0, Push 81281, Push 81283(top)
192.168.255.12-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 2
to 10.10.1.2 via ge-0/0/0.0, Push 81283
> to 10.10.3.2 via ge-0/0/2.0, Push 81283
192.168.255.13-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 1
> to 10.10.3.2 via ge-0/0/2.0
to 10.10.1.2 via ge-0/0/0.0, Push 81284, Push 81283(top)
192.168.255.14-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 2
> to 10.10.3.2 via ge-0/0/2.0, Push 81286
to 10.10.1.2 via ge-0/0/0.0, Push 81286, Push 81283(top)
192.168.255.15-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 3
to 10.10.1.2 via ge-0/0/0.0, Push 81287
> to 10.10.3.2 via ge-0/0/2.0, Push 81287
意味
出力には、junos-rti-tc-<color>.inet.0テーブルでプログラムされたすべての色付きフレックスルートが次の形式で表示されます:prefix_address-flex-algo-id<c>/64
OSPFログの検証
目的
OSPFログに柔軟なアルゴリズムキーワードが表示されていることを確認する。
アクション
動作モードから、 show ospf log コマンドを実行します。
R0について
user@R0>show ospf log
Topology default SPF log:
Last instance of each event type
When Type Elapsed
1w2d 13:59:18 SPF 0.000316
1w2d 13:59:18 Stub 0.000233
1w2d 13:59:18 Interarea 0.000002
1w2d 13:59:18 External 0.000004
1w2d 13:59:18 NSSA 0.000001
1w2d 13:59:18 Cleanup 0.000551
Maximum length of each event type
When Type Elapsed
1w2d 14:34:27 SPF 0.000997
1w2d 15:59:35 Stub 0.000675
1w3d 07:08:27 Interarea 0.000010
1w3d 07:29:07 External 0.000013
1w3d 07:15:21 NSSA 0.000008
1w3d 08:38:05 Cleanup 0.001044
Last 100 events
When Type Elapsed
1w2d 14:08:36 FlexAlgo SPF 0.000680
1w2d 14:08:36 SPF 0.000204
1w2d 14:08:36 Stub 0.000025
1w2d 14:08:36 Interarea 0.000003
1w2d 14:08:36 External 0.000002
1w2d 14:08:36 NSSA 0.000001
1w2d 14:08:36 Prefix SID 0.000222
1w2d 14:08:36 Adj SID 0.000074
1w2d 14:08:36 Cleanup 0.000607
1w2d 14:08:36 Total 0.001209
1w2d 14:08:31 SPF 0.000188
1w2d 14:08:31 Stub 0.000054
1w2d 14:08:31 Interarea 0.000002
1w2d 14:08:31 External 0.000001
1w2d 14:08:31 NSSA 0.000001
1w2d 14:08:31 Prefix SID 0.000181
1w2d 14:08:31 Adj SID 0.000178
1w2d 14:08:31 Cleanup 0.000413
1w2d 14:08:31 Total 0.001656
1w2d 14:06:54 FlexAlgo SPF 0.001914
1w2d 14:06:54 FlexAlgo SPF 0.000081
1w2d 14:06:54 SPF 0.000215
1w2d 14:06:54 Stub 0.000030
1w2d 14:06:54 Interarea 0.000003
1w2d 14:06:54 External 0.000001
1w2d 14:06:54 NSSA 0.000001
1w2d 14:06:54 Prefix SID 0.000227
1w2d 14:06:54 Adj SID 0.000075
1w2d 14:06:54 Cleanup 0.000233
1w2d 14:06:54 Total 0.000859
1w2d 14:06:49 SPF 0.000234
1w2d 14:06:49 Stub 0.000072
1w2d 14:06:49 Interarea 0.000003
1w2d 14:06:49 External 0.000002
1w2d 14:06:49 NSSA 0
1w2d 14:06:49 Prefix SID 0.000262
1w2d 14:06:49 Adj SID 0.000254
1w2d 14:06:49 Cleanup 0.000495
1w2d 14:06:49 Total 0.001936
1w2d 14:06:30 FlexAlgo SPF 0.001356
1w2d 14:06:30 FlexAlgo SPF 0.000061
1w2d 14:06:30 SPF 0.000207
1w2d 14:06:30 Stub 0.000023
1w2d 14:06:30 Interarea 0.000003
1w2d 14:06:30 External 0.000002
1w2d 14:06:30 NSSA 0.000001
1w2d 14:06:30 Prefix SID 0.000237
1w2d 14:06:30 Adj SID 0.000087
1w2d 14:06:30 Cleanup 0.000430
1w2d 14:06:30 Total 0.001060
1w2d 14:06:25 SPF 0.000207
1w2d 14:06:25 Stub 0.000077
1w2d 14:06:25 Interarea 0.000002
1w2d 14:06:25 External 0.000002
1w2d 14:06:25 NSSA 0.000001
1w2d 14:06:25 Prefix SID 0.000250
1w2d 14:06:25 Adj SID 0.000245
1w2d 14:06:25 Cleanup 0.000399
1w2d 14:06:25 Total 0.001840
1w2d 14:05:56 FlexAlgo SPF 0.001781
1w2d 14:05:56 FlexAlgo SPF 0.000080
1w2d 14:05:55 SPF 0.000215
1w2d 14:05:55 Stub 0.000025
1w2d 14:05:55 Interarea 0.000002
1w2d 14:05:55 External 0.000001
1w2d 14:05:55 NSSA 0.000001
1w2d 14:05:55 Prefix SID 0.000240
1w2d 14:05:55 Adj SID 0.000073
1w2d 14:05:55 Cleanup 0.000422
1w2d 14:05:55 Total 0.001055
1w2d 14:05:50 SPF 0.000212
1w2d 14:05:50 Stub 0.000082
1w2d 14:05:50 Interarea 0.000003
1w2d 14:05:50 External 0.000001
1w2d 14:05:50 NSSA 0.000001
1w2d 14:05:50 Prefix SID 0.000264
1w2d 14:05:50 Adj SID 0.000239
1w2d 14:05:50 Cleanup 0.000458
1w2d 14:05:50 Total 0.002053
1w2d 13:59:23 FlexAlgo SPF 0.001603
1w2d 13:59:23 FlexAlgo SPF 0.000062
1w2d 13:59:23 SPF 0.000224
1w2d 13:59:23 Stub 0.000021
1w2d 13:59:23 Interarea 0.000002
1w2d 13:59:23 External 0.000001
1w2d 13:59:23 NSSA 0.000001
1w2d 13:59:23 Prefix SID 0.000222
1w2d 13:59:23 Adj SID 0.000087
1w2d 13:59:23 Cleanup 0.000413
1w2d 13:59:23 Total 0.001228
1w2d 13:59:18 SPF 0.000316
1w2d 13:59:18 Stub 0.000233
1w2d 13:59:18 Interarea 0.000002
1w2d 13:59:18 External 0.000004
1w2d 13:59:18 NSSA 0.000001
1w2d 13:59:18 Prefix SID 0.000324
1w2d 13:59:18 Adj SID 0.000318
1w2d 13:59:18 Cleanup 0.000551
1w2d 13:59:18 Total 0.002751
意味
出力には、SPFログに追加されたFlexAlgoキーワードが表示されます。
変更履歴テーブル
サポートされる機能は、使用しているプラットフォームとリリースによって決まります。 機能エクスプローラー を使用して、機能がお使いのプラットフォームでサポートされているかどうかを確認します。
inetcolor.0 および
mpls.0 ルーティングテーブルでOSPFフレキシブルアルゴリズムルートの優先度を設定することで、パス選択を制御できるようになりました。
inetcolor.0 および
mpls.0 ルーティングテーブルでOSPFフレキシブルアルゴリズムルートの優先度を設定することで、パス選択を制御できるようになりました。