例:IS-ISルートに優先順位を付けるルーティングポリシーの設定
多数の IS-IS ルートを持つネットワークでは、ネットワーク トポロジの変化に応じてルートを更新する順序を制御すると便利です。この例では、一部の IS-IS ルートを他のルートよりも優先するルーティング ポリシーを定義する方法を示します。IS-IS トポロジーが変更された場合、最初にルーティング テーブルで高優先度プレフィックスが更新され、その後に中優先度プレフィックスと低優先度プレフィックスが更新されます。インターネットサービスプロバイダ(ISP)は、この機能を使用して、重要な顧客に対して迅速なコンバージェンスを保証できます。
要件
この例を設定する前に、デバイス初期化以外の特別な設定は必要ありません。
この例では、以下のハードウェアとソフトウェアのコンポーネントを使用しています。
M シリーズ、MX シリーズ、または T シリーズ ルーターの組み合わせが可能な 3 台のルーター
デバイス上のJunos OSリリース17.1以降
概要
Junos OS リリース 17.1 以降、ルーティング テーブルにインストールされている IS-IS ルートの優先度を設定または拒否できます。ポリシー オプションを reject
使用して、特定のタグでマークされた特定のプレフィックスまたはルートからのルートを拒否します。
IS-IS ルートに優先順位を付けてコンバージェンスを改善し、差別化されたサービスを提供できます。BGP レイヤー 3 VPN またはラベルベース psuedowire サービスが一部の IGP プレフィックス上に確立された多数の IGP プレフィックスを持つネットワークでは、転送テーブルでルートが更新される順序を制御することが重要です。インポートポリシーを設定し、ルートタグを使用するか、プレフィックスに基づいてルートをフィルタリングしてから、ネットワーク要件に従って、 、 medium
、または low
のhigh
優先度を設定できます。IS-ISプロトコルは、設定された優先度に基づいて、rpdルーティングテーブルにルートをダウンロードします。インポートポリシーを設定しない場合、すべてのルートはデフォルトで中優先度に設定されます。
IS-ISインポートポリシーは、優先度を設定したり、以下の基準に基づいてIS-IS外部ルートをフィルタリングしたりするために使用できます。
Prefix | ポリシー オプションを使用して |
Route Tag | ポリシー オプションを使用して |
IS-ISインポートポリシーが適用され、外部以外のルートに reject
対して終了アクションが発生した場合、その reject
アクションは無視され、とにかくルートが受け入れられます。デフォルトでは、そのようなルートは優先度が低いルーティングテーブルにインストールされます。この動作は、一貫したルーティングを確保することで、トラフィックブラックホール(通知なくトラフィックを破棄)を防ぎます。ただし、 ポリシーオプションを reject
使用して、プレフィックスまたは設定されたタグに基づいてルートを拒否できます。
ルートダウンロードの順序が変化すると、マイクロループトラフィックが増加する場合があります。
トポロジ
図 1 では、ルーター R1 はルーター R2 を介してルーター R3 に接続されています。より迅速なコンバージェンスを実現するには、ルーター R3 へのルートに高い優先度を設定する必要があります。インポートルーティングポリシーは、ルーターR1に設定され、ルーターR3に接続するルートに高い優先度を設定します。203.0.113.3/32 に一致するルートは、優先度が高いため、最初にインストールされます。LDPは、ルートとその設定優先度をIS-ISからインポートします。このルートは、ネットワーク トポロジが変更された場合に最初に復元されます。
構成
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーして、テキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを 階層レベルで [edit]
CLI にコピー アンド ペーストして、設定モードからコミットを入力します。
ルーター R1
set interfaces ge-1/0/1 unit 0 description R1->R2 set interfaces ge-1/0/1 unit 0 family inet address 192.0.2.1/24 set interfaces ge-1/0/1 unit 0 family iso set interfaces ge-1/0/1 unit 0 family inet6 address 2001:db8:1:2::1/64 set interfaces ge-1/0/1 unit 0 family mpls set interfaces ge-5/0/9 unit 0 description R1->R2 set interfaces ge-5/0/9 unit 0 family inet address 192.0.10.1/24 set interfaces ge-5/0/9 unit 0 family iso set interfaces ge-5/0/9 unit 0 family inet6 address 2001:db8:1:1::1/64 set interfaces ge-5/0/9 unit 0 family mpls set interfaces lo0 unit 0 family inet address 203.0.113.1/32 set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0010.00 set interfaces lo0 unit 0 family inet6 address 2001:db8:1:1::1/128 set interfaces lo0 unit 0 family mpls set protocols mpls ipv6-tunneling set protocols mpls interface ge-5/0/9.0 set protocols mpls interface ge-1/0/1.0 set protocols isis level 1 disable set protocols isis interface ge-1/0/1.0 set protocols isis interface ge-5/0/9.0 set protocols isis interface lo0.0 passive set protocols ldp interface ge-1/0/1.0 set protocols ldp interface ge-5/0/9.0 set protocols ldp interface lo0.0 set policy-options policy-statement test_rf term t1 from route-filter 203.0.113.3/32 exact set policy-options policy-statement test_rf term t1 then priority high set protocols isis import test_rf set routing-options router-id 203.0.113.1 set routing-options autonomous-system 64496
ルーターR2
set interfaces ge-0/0/1 unit 0 description R2->R1 set interfaces ge-0/0/1 unit 0 family inet address 192.0.2.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:1:2::2/64 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/7 unit 0 description R2->R3 set interfaces ge-0/0/7 unit 0 family inet address 198.0.2.1/24 set interfaces ge-0/0/7 unit 0 family iso set interfaces ge-0/0/7 unit 0 family inet6 address 2001:db8:1:2::1/64 set interfaces ge-0/0/7 unit 0 family mpls set interfaces ge-1/0/5 unit 0 description R2->R1 set interfaces ge-1/0/5 unit 0 family inet address 192.0.10.2/24 set interfaces ge-1/0/5 unit 0 family iso set interfaces ge-1/0/5 unit 0 family inet6 address 2001:db8:1:1::2/64 set interfaces ge-1/0/5 unit 0 family mpls set interfaces ge-1/1/0 unit 0 family inet address 198.0.10.1/24 set interfaces ge-1/1/0 unit 0 family iso set interfaces ge-1/1/0 unit 0 family inet6 address 2001:db8:::1::1/64 set interfaces ge-1/1/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 203.0.113.2/32 set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0030.00 set interfaces lo0 unit 0 family inet6 address 2001:db8:2:2::1/128 set interfaces lo0 unit 0 family mpls set protocols mpls interface ge-1/0/5.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-1/1/0.0 set protocols mpls interface ge-0/0/7.0 set protocols isis level 1 disable set protocols isis interface ge-0/0/1.0 set protocols isis interface ge-0/0/7.0 set protocols isis interface ge-1/0/5.0 set protocols isis interface ge-1/1/0.0 set protocols isis interface lo0.0 passive set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/7.0 set protocols ldp interface ge-1/0/5.0 set protocols ldp interface ge-1/1/0.0 set protocols ldp interface lo0.0 set routing-options router-id 203.0.113.2 set routing-options autonomous-system 64496
ルーター R3
set interfaces ge-2/0/3 unit 0 description R3->R2 set interfaces ge-2/0/3 unit 0 family inet address 198.1.2.2/24 set interfaces ge-2/0/3 unit 0 family iso set interfaces ge-2/0/3 unit 0 family inet6 address 2001:db8:1:2::2/64 set interfaces ge-2/0/3 unit 0 family mpls set interfaces ge-3/0/10unit 0 description R3->R4 set interfaces ge-3/0/0 unit 0 family inet address 198.0.1.2/24 set interfaces ge-3/0/0 unit 0 family iso set interfaces ge-3/0/0 unit 0 family inet6 address 2001:db8::1:1::2/64 set interfaces ge-3/0/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 203.0.113.3/32 set interfaces lo0 unit 0 family iso address 49.0002.0103.0000.0020.00 set interfaces lo0 unit 0 family inet6 address 2001:db8:3:3::3/128 set interfaces lo0 unit 0 family mpls set protocols mpls ipv6-tunneling set protocols mpls interface ge-3/0/0.0 set protocols mpls interface ge-2/0/3.0 set protocols isis level 1 disable set protocols isis interface ge-2/0/3.0 set protocols isis interface ge-3/0/0.0 set protocols isis interface lo0.0 passive set protocols ldp interface ge-2/0/3.0 set protocols ldp interface ge-3/0/0.0 set protocols ldp interface lo0.0 set policy-options policy-statement add_tag term t1 from route-filter 203.0.113.3/32 exact set policy-options policy-statement add_tag term t1 then tag 18 set protocols isis export add_tag set routing-options router-id 203.0.113.3 set routing-options autonomous-system 64496
ルーターR1の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
ルーターR1を設定するには:
適切なインターフェイス名、アドレス、およびその他のパラメーターを変更した後、他のルーターに対してこの手順を繰り返します。
インターフェイスにIPv4およびIPv6アドレスを設定します。
[edit interfaces] user@R1# set ge-1/0/1 unit 0 description R1->R2 user@R1# set ge-1/0/1 unit 0 family inet address 192.0.2.1/24 user@R1# set ge-1/0/1 unit 0 family iso user@R1# set ge-1/0/1 unit 0 family inet6 address 2001:db8:1:2::1/64 user@R1# set ge-1/0/1 unit 0 family mpls user@R1# set ge-1/0/1 unit 0 description R1->R2 user@R1# set ge-5/0/9 unit 0 family inet address 192.0.10.1/24 user@R1# set ge-5/0/9 unit 0 family iso user@R1# set ge-5/0/9 unit 0 family inet6 address 2001:db8:1:1::1/64 user@R1# set ge-5/0/9 unit 0 family mpls
ループバックアドレスを設定します。
[edit interfaces] user@R1# set lo0 unit 0 family inet address 203.0.113.1/32 user@R1# set lo0 unit 0 family iso address 49.0002.0103.0000.0010.00 user@R1# set lo0 unit 0 family inet6 address 2001:db8:1:1::1/128 user@R1# set lo0 unit 0 family mpls
MPLS を設定します。
[edit protocols] user@R1# set mpls ipv6-tunneling user@R1# set mpls interface ge-5/0/9.0 user@R1# set mpls interface ge-1/0/1.0
インターフェイスでIS-ISプロトコルを有効にします。
[edit protocols] user@R1# set isis level 1 disable user@R1# set isis interface ge-1/0/1.0 user@R1# set isis interface ge-5/0/9.0 user@R1# set isis interface lo0.0 passive user@R1# set isis import test_rf
インターフェイスでLDPプロトコルを設定します。
[edit protocols] user@R1# set ldp interface ge-1/0/1.0 user@R1# set ldp interface ge-5/0/9.0 user@R1# set ldp interface lo0.0
ルーターR3へのIS-ISルートを優先するポリシーを定義します。.
[edit policy-options] user@R1# set policy-statement test_rf term t1 from route-filter 203.0.113.3/32 exact user@R1# set policy-statement test_rf term t1 then priority high
ルーターIDと自律システム(AS)番号を設定します。
[edit routing--options] user@R1# set routing-options router-id 203.0.113.1 user@R1# set routing-options autonomous-system 64496
結果
設定モードから、 、 、 show policy-options show protocolsコマンドを入力して設定をshow interfacesshow routing-options確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
[edit] user@R1> show interfaces ge-1/0/1 { unit 0 { family inet { address 192.0.2.1/24; } family iso; family inet6 { address 2001:db8:1:2::1/64; } family mpls; } } ge-5/0/9 { unit 0 { family inet { address 192.0.2.1/24; } family iso; family inet6 { address 2001:db8:1:1::1/64; } family mpls; } } lo0 { unit 0 { family inet { address 203.0.113.1/32; } family iso { address 49.0002.0103.0000.0010.00; } family inet6 { address 2001:db8:1:1::1/128; } family mpls; } }
[edit] user@R1> show protocols mpls { ipv6-tunneling; interface ge-5/0/9.0; interface ge-1/0/1.0; } isis { import test_rf; level 1 disable; interface ge-1/0/1.0; interface ge-5/0/9.0; interface lo0.0 { passive; } } ldp { interface ge-1/0/1.0; interface ge-5/0/9.0; interface lo0.0; }
[edit] user@R1> show routing-options router-id 203.0.113.1; autonomous-system 64496;
user@R1> sshow configuration policy-options policy-statement test_rf { term t1 { from { route-filter 203.0.113.3/32 exact; } then priority high; } }
検証
LDP ルートの優先度の検証
目的
LDPがIS-ISプロトコルからルート203.0.113.3を継承していることを確認します。
アクション
運用モードから、ルーターR1の show route extensive コマンドを実行します。
user@R1> show route 203.0.113.3 extensive inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden) 203.0.113.3/32 (1 entry, 1 announced) State: <FlashAll> TSI: KRT in-kernel 203.0.113.3/32 -> {16.1.2.2} *IS-IS Preference: 18 Level: 2 Next hop type: Router, Next hop index: 0 Address: 0x4a1f43c Next-hop reference count: 4 Next hop: 16.1.2.2 via ge-1/0/1.0, selected Session Id: 0x0 Next hop: 16.1.1.2 via ge-5/0/9.0 Session Id: 0x0 State: <Active Int HighPriority> Local AS: 64496 Age: 59 Metric: 20 Validation State: unverified ORR Generation-ID: 0 Tag: 18 Task: IS-IS Announcement bits (2): 0-KRT 4-LDP AS path: I inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) 203.0.113.3/32 (1 entry, 1 announced) State: <FlashAll> *LDP Preference: 9 Next hop type: Router, Next hop index: 0 Address: 0x4a1e55c Next-hop reference count: 2 Next hop: 16.1.2.2 via ge-1/0/1.0, selected Label operation: Push 299776 Label TTL action: prop-ttl Load balance label: Label 299776: None; Label element ptr: 0x4b99100 Label parent element ptr: 0x0 Label element references: 2 Label element child references: 0 Label element lsp id: 0 Session Id: 0x0 Next hop: 16.1.1.2 via ge-5/0/9.0 Label operation: Push 299776 Label TTL action: prop-ttl Load balance label: Label 299776: None; Label element ptr: 0x4b99100 Label parent element ptr: 0x0 Label element references: 2 Label element child references: 0 Label element lsp id: 0 Session Id: 0x0 State:<Active Int HighPriority> Local AS: 64496 Age: 59 Metric: 1 Validation State: unverified Task: LDP Announcement bits (1): 2-Resolve tree 1 AS path: I Secondary Tables: inet6.3
意味
出力は、LDPがIS-ISから優先 high
してルート203.0.113.3を継承していることを示しています。
IS-ISルートの優先度の検証
目的
IS-IS のルート 203.0.113.3 に優先度が設定されていることを確認します。
アクション
user@R1> show isis route download-priority IS-IS routing table Current version: L1: 0 L2: 122 IPv4/IPv6 Routes ---------------- Prefix L Version Metric Type Interface NH Via Backup Score 203.0.113.3/32 2 122 20 int ge-1/0/1.0 IPV4 R2 ge-5/0/9.0 IPV4 R2 203.0.113.2/32 2 122 10 int ge-1/0/1.0 IPV4 R2 ge-5/0/9.0 IPV4 R2 198.1.1.0/24 2 122 20 int ge-1/0/1.0 IPV4 R2 ge-5/0/9.0 IPV4 R2 198.1.2.0/24 2 122 20 int ge-1/0/1.0 IPV4 R2 ge-5/0/9.0 IPV4 R2 2001:db8:2:2::1/128 2 122 10 int ge-1/0/1.0 IPV6 R2 ge-5/0/9.0 IPV6 R2 2001:db8:3:3::3/128 2 122 20 int ge-1/0/1.0 IPV6 R2 ge-5/0/9.0 IPV6 R2 2001:db8:1:1::/64 2 122 20 int ge-1/0/1.0 IPV6 R2 ge-5/0/9.0 IPV6 R2 2001:db8:1:2::/64 2 122 20 int ge-1/0/1.0 IPV6 R2 ge-5/0/9.0 IPV6 R2
意味
ルートは、設定された優先度の順に表示されます。優先度が設定 high
されているルート 203.0.113.3 は、優先度が中程度または低のルートが続く一番上に表示されます。