例: RIP 用の BFD の設定
この例では、RIP ネットワーク用に BFD(Bidirectional Forwarding Detection)を設定する方法を示しています。
要件
この例を設定する前に、デバイス初期化以外の特別な設定を行う必要はありません。
概要
障害検知を有効にするには、 ステートメントを含 bfd-liveness-detection
にします。
bfd-liveness-detection { detection-time { threshold milliseconds; } minimum-interval milliseconds; minimum-receive-interval milliseconds; multiplier number; no-adaptation; transmit-interval { threshold milliseconds; minimum-interval milliseconds; } version (1 | automatic); }
必要に応じて、 ステートメントを含めて検出時間の適応のしきい値を指定 threshold
できます。BFD セッション検出時間がしきい値以上の値に適応すると、1 つのトラップとシステム ログ メッセージが送信されます。
障害検知の最小送受信間隔を指定するには、 ステートメントを含 minimum-interval
にします。この値は、ローカル ルーティング デバイスが hello パケットを送信する最小間隔と、BFD セッションを確立したネイバーからの応答をルーティング デバイスが受信する最小間隔を表します。1~255,000ミリ秒の範囲で値を設定できます。この例では、600 ミリ秒の最小間隔を設定します。
BFD は、システム リソースを消費する集中的なプロトコルです。ルーティング エンジンベース のセッションに 100 ms 未満の BFD と 10 ms 未満の分散 BFD セッションに対して最小間隔を指定すると、望ましくない BFD フラッピングが発生する可能性があります。
ネットワーク環境によっては、以下の推奨事項が追加される場合があります。
多数の BFD セッションを持つ大規模なネットワーク導入の場合は、ルーティング エンジン ベース のセッションに 300 ms、分散 BFD セッションで 100 ms の最小間隔を指定します。
非常に大規模なネットワーク導入と多数の BFD セッションについては、詳細については、カスタマー サポートジュニパーネットワークスにお問い合わせください。
ノンストップ アクティブ ルーティング(NSR)が設定されている場合に、ルーティング エンジン スイッチオーバー イベント中に BFD セッションを維持するには、ルーティング エンジン ベースのセッションに 2,500 ms の最小間隔を指定します。ノンストップ アクティブ ルーティングが設定された分散 BFD セッションの場合、最小間隔の推奨事項は変更されず、ネットワークの導入によってのみ異なります。
必要に応じて最小送信間隔と受信間隔を個別に指定できます。
障害検知の最小受信間隔のみを指定するには、 ステートメントを含 minimum-receive-interval
にします。この値は、BFDセッションを確立したネイバーからの返信を受け取るローカル ルーティング デバイスが期待する最小間隔を表します。1~255,000ミリ秒の範囲で値を設定できます。
障害検知の最小送信間隔のみを指定するには、 ステートメントを含 transmit-interval minimum-interval
にします。この値は、ローカル ルーティング デバイスが HELLO パケットを BFD セッションを確立したネイバーに送信する最小間隔を表します。1~255,000ミリ秒の範囲で値を設定できます。
発信インターフェイスが宣言されるネイバーによって受信されない hello パケットの数を指定するには、 ステートメントを含 multiplier
にします。デフォルトは3で、1~255の範囲で値を設定できます。
送信間隔の適応を検出するしきい値を指定するには、 ステートメントを含 transmit-interval threshold
める。しきい値は送信間隔を超える必要があります。
検出に使用される BFD バージョンを指定するには、 ステートメントを含 version
にします。デフォルトでは、自動的に検出されたバージョンを使用します。
ステートメントを階層レベルに含めて BFD traceoptions
操作を [edit protocols bfd]
追跡できます。
ソフトウェア Junos OS 9.0 以降では、BFD セッションを設定して、変化するネットワークの状態に適応しなけって設定できます。BFD の適応を無効にするには、 ステートメントを no-adaptation
含にします。ネットワークで BFD アダプテーションを有効にしない方が望ましい場合を限り、BFD の適応を無効にすることをお勧めします。
図 1 は 、この例で使用されているトポロジを示しています。
CLI簡易構成は 、図 1 のすべてのデバイスの設定 を示しています。デバイス R1 #configuration122__rip-bfd に関 するセクションでは、手順を示します。
トポロジ
構成
手順
CLI迅速な設定
この例を迅速に設定するには、以下のコマンドをコピーして、テキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に一致する必要がある詳細情報を変更してから、コマンドを階層レベルで CLI にコピー アンド ペースト [edit]
します。
デバイス R1
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30 set protocols bfd traceoptions file bfd-trace set protocols bfd traceoptions flag all set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.1 set protocols rip group rip-group bfd-liveness-detection minimum-interval 600 set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip set policy-options policy-statement advertise-routes-through-rip term 1 then accept
デバイス R2
set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30 set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.5/30 set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.2 set protocols rip group rip-group neighbor fe-1/2/1.5 set protocols rip group rip-group bfd-liveness-detection minimum-interval 600 set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip set policy-options policy-statement advertise-routes-through-rip term 1 then accept
デバイス R3
set interfaces fe-1/2/0 unit 6 family inet address 10.0.0.6/30 set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.6 set protocols rip group rip-group bfd-liveness-detection minimum-interval 600 set policy-options policy-statement advertise-routes-through-rip term 1 from protocol direct set policy-options policy-statement advertise-routes-through-rip term 1 from protocol rip set policy-options policy-statement advertise-routes-through-rip term 1 then accept
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。デバイスのナビゲーションの詳細については、「 CLI ガイド 」の「 設定モードでの CLI CLI エディター の使用 」 を参照してください。
RIP ネットワークの BFD を設定するには、次の手順に示します。
ネットワーク インターフェイスを設定します。
[edit interfaces] user@R1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30
RIP グループを作成し、インターフェイスを追加します。
ネットワークで RIP をJunos OS、RIP が有効になっているインターフェイスを含むグループを設定する必要があります。ループバック インターフェイスで RIP を有効にする必要があります。
[edit protocols rip group rip-group] user@R1# set neighbor fe-1/2/0.1
直接ルートルーティング ポリシー RIP 学習ルートの両方をアドバタイズするプロファイルを作成します。
[edit policy-options policy-statement advertise-routes-through-rip term 1] user@R1# set from protocol direct user@R1# set from protocol rip user@R1# set then accept
ポリシーを適用ルーティング ポリシー。
このJunos OS、グループ レベルでのみ RIP エクスポート ポリシーを適用できます。
[edit protocols rip group rip-group] user@R1# set export advertise-routes-through-rip
BFD を有効にする。
[edit protocols rip group rip-group] user@R1# set bfd-liveness-detection minimum-interval 600
トレース操作を設定して BFD メッセージを追跡します。
[edit protocols bfd traceoptions] user@R1# set file bfd-trace user@R1# set flag all
結果
設定モードから、 、 、 および のコマンドを入力して show interfaces
show protocols
設定を確認 show policy-options
します。出力結果に意図した設定が表示されない場合は、この例の設定手順を繰り返して設定を修正します。
user@R1# show interfaces
fe-1/2/0 {
unit 1 {
family inet {
address 10.0.0.1/30;
}
}
}
user@R1# show protocols
bfd {
traceoptions {
file bfd-trace;
flag all;
}
}
rip {
group rip-group {
export advertise-routes-through-rip;
bfd-liveness-detection {
minimum-interval 600;
}
neighbor fe-1/2/0.1;
}
}
user@R1# show policy-options
policy-statement advertise-routes-through-rip {
term 1 {
from protocol [ direct rip ];
then accept;
}
}
デバイスの設定が完了したら、設定モード から Commit を入力します。
検証
設定が正常に機能されていることを確認します。
BFD セッションがアップの確認
目的
BFD セッションが動作している必要があります。
アクション
動作モードから コマンドを入力 show bfd session
します。
user@R1> show bfd session Detect Transmit Address State Interface Time Interval Multiplier 10.0.0.2 Up fe-1/2/0.1 1.800 0.600 3 1 sessions, 1 clients Cumulative transmit rate 1.7 pps, cumulative receive rate 1.7 pps
意味
出力は、認証エラーがない示しています。
BFD トレース ファイルの確認
目的
トレース操作を使用して、BFD パケットが交換されている確認を行います。
アクション
動作モードから コマンドを入力 show log
します。
user@R1> show log bfd-trace Feb 16 10:26:32 PPM Trace: BFD periodic xmit to 10.0.0.2 (IFL 124, rtbl 53, single-hop port) Feb 16 10:26:32 Received Downstream TraceMsg (24) len 86: Feb 16 10:26:32 IfIndex (3) len 4: 0 Feb 16 10:26:32 Protocol (1) len 1: BFD Feb 16 10:26:32 Data (9) len 61: (hex) 42 46 44 20 70 61 63 6b 65 74 20 66 72 6f 6d 20 31 30 2e Feb 16 10:26:32 PPM Trace: BFD packet from 10.0.0.1 (IFL 73, rtbl 56, ttl 255) absorbed Feb 16 10:26:32 Received Downstream TraceMsg (24) len 60: Feb 16 10:26:32 IfIndex (3) len 4: 0 Feb 16 10:26:32 Protocol (1) len 1: BFD Feb 16 10:26:32 Data (9) len 35: (hex) 42 46 44 20 70 65 72 69 6f 64 69 63 20 78 6d 69 74 20 6f ...
意味
出力は BFD の正常な機能を示しています。