このページで
RIP タイマー
RIP タイマーについて
RIP は、いくつかのタイマーを使用して動作を調整します。
更新間隔は、RIP によって学習されたルートがネイバーにアドバタイズされる間隔です。このタイマーは、ルーティングの更新間隔を制御します。更新間隔はデフォルトで 30 秒に設定され、タイマーがリセットされたときに追加されるランダムな時間は少ない値です。これにより、すべてのルーティング デバイスがネイバーを同時に更新した場合に発生する輻輳を回避できます。
更新時間の間隔を設定するには、 ステートメントを update-interval 含めます。
update-interval seconds;
seconds 10~60の値を指定できます。
ルートタイムアウト間隔を設定できます。指定した時間間隔でルーティング・テーブルにインストールされた後にルートが更新されない場合、そのルートは無効とマークされ、ホールドダウン期間の期限が切れた後、ルーティング・テーブルから削除されます。
RIP のルート タイムアウトを設定するには、 ステートメントを route-timeout 含めます。
route-timeout seconds;
seconds は、30~360 の値を指定できます。デフォルト値は180秒です。
RIP ルートは、ルートのタイムアウト制限に達した場合、またはルート メトリックが無限に達し、ルートが無効な場合に期限切れになります。ただし、期限切れになったルートは、指定された期間ルーティングテーブルに保持されるため、ネイバーにルートがドロップされたことを通知できます。この期間は、ホールドダウンタイマーを設定することで設定されます。ホールドダウン タイマーが終了すると、ルートはルーティング テーブルから削除されます。
RIP のホールドダウン タイマーを設定するには、 ステートメントを holddown 含めます。
holddown seconds;
seconds 10~180の値を指定できます。デフォルト値は120秒です。
Junos OS リリース 11.1 以降では、RIP デマンド回線に再送信タイマーを使用できます。
通常、変更による影響が十分に理解されていない限り、RIP タイマーの変更を推奨します。ルートタイムアウトは、更新間隔の少なくとも3倍にする必要があります。通常、デフォルト値は標準的な操作には有効なままであるのが最善です。
例:RIP タイマーの設定
この例では、RIP 更新間隔を設定する方法と、変更の影響を監視する方法を示します。
要件
この例を設定する前に、デバイス初期化以外の特別な設定は必要ありません。
概要
この例では、デバイス R2 のネイバー、デバイス R1 の更新間隔は 60 秒、ネイバーであるデバイス R3 の更新間隔は 10 秒です。
この例は、必ずしも実用的ではありませんが、デモンストレーションを目的として示しています。通常、変更による影響が十分に理解されていない限り、RIP タイマーの変更を推奨します。通常、デフォルト値は標準的な操作には有効なままであるのが最善です。
エクスポート・ポリシーは、RIP の最小構成の一部として必要となるため、エクスポート・ポリシーも表示されます。
図 1 は、この例で使用したトポロジーを示しています。
CLI クイック設定 は、 図 1 にすべてのデバイスの設定を示しています。セクション #d69e62__d69e183 では、デバイス R2 の手順について説明します。
トポロジ
構成
手順
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更してから、 階層レベルの CLI にコマンドを [edit] コピー アンド ペーストします。
デバイス R1
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30 set interfaces lo0 unit 1 family inet address 172.16.0.1/32 set interfaces lo0 unit 1 family inet address 192.168.1.1/32 set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.1 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 interfaces lo0 unit 2 family inet address 192.168.2.2/32 set interfaces lo0 unit 2 family inet address 172.16.2.2/32 set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.2 update-interval 60 set protocols rip group rip-group neighbor fe-1/2/1.5 update-interval 10 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 interfaces lo0 unit 3 family inet address 192.168.3.3/32 set interfaces lo0 unit 3 family inet address 172.16.3.3/32 set protocols rip group rip-group export advertise-routes-through-rip set protocols rip group rip-group neighbor fe-1/2/0.6 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 更新間隔を設定するには:
ネットワーク インターフェイスを設定します。
この例では、複数のループバックインターフェイスアドレスを示し、接続されたネットワークをシミュレートします。
[edit interfaces] user@R2# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30 user@R2# set fe-1/2/1 unit 5 family inet address 10.0.0.5/30 user@R2# set lo0 unit 2 family inet address 192.168.2.2/32 user@R2# set lo0 unit 2 family inet address 172.16.2.2/32
2 つの RIP ネイバーに対して異なる更新間隔を設定します。
Junos OS で RIP を設定するには、RIP が有効になっているインターフェイスを含むグループを設定する必要があります。ループバック インターフェイスで RIP を有効にする必要はありません。
[edit protocols rip group rip-group] user@R2# set neighbor fe-1/2/0.2 update-interval 60 user@R2# set neighbor fe-1/2/1.5 update-interval 10
直接ルートと RIP 学習ルートの両方をアドバタイズするルーティング ポリシーを作成します。
[edit policy-options policy-statement advertise-routes-through-rip term 1] user@R2# set from protocol direct user@R2# set from protocol rip user@R2# set then accept
ルーティング ポリシーを適用します。
Junos OS では、RIP エクスポート ポリシーはグループ レベルでのみ適用できます。
[edit protocols rip group rip-group] user@R2# set export advertise-routes-through-rip
結果
設定モードから、 、 、 show protocolsコマンドを入力して設定をshow interfacesshow policy-options確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
user@R2# show interfaces
fe-1/2/0 {
unit 2 {
family inet {
address 10.0.0.2/30;
}
}
}
fe-1/2/1 {
unit 5 {
family inet {
address 10.0.0.5/30;
}
}
}
lo0 {
unit 2 {
family inet {
address 192.168.2.2/32;
address 172.16.2.2/32;
}
}
}
user@R2# show protocols
rip {
group rip-group {
export advertise-routes-through-rip;
neighbor fe-1/2/0.2 {
update-interval 60;
}
neighbor fe-1/2/1.5 {
update-interval 10;
}
}
}
user@R2# show policy-options
policy-statement advertise-routes-through-rip {
term 1 {
from protocol [ direct rip ];
then accept;
}
}
デバイスの設定が完了したら、設定モードから コミット を入力します。
検証
設定が正しく機能していることを確認します。
デバイスR2によって送信されたRIPアップデートの確認
目的
RIP 更新パケットが予想される間隔で送信されていることを確認します。
アクション
動作モードから、 コマンドを show rip statistics 入力します。
user@R2> show rip statistics
RIPv2 info: port 520; holddown 120s.
rts learned rts held down rqsts dropped resps dropped
4 2 0 0
fe-1/2/0.2: 2 routes learned; 5 routes advertised; timeout 180s; update interval 60s
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 123 5 1
Triggered Updates Sent 0 0 0
Responses Sent 0 0 0
Bad Messages 0 0 0
RIPv1 Updates Received 0 0 0
RIPv1 Bad Route Entries 0 0 0
RIPv1 Updates Ignored 0 0 0
RIPv2 Updates Received 244 10 2
RIPv2 Bad Route Entries 0 0 0
RIPv2 Updates Ignored 0 0 0
Authentication Failures 0 0 0
RIP Requests Received 0 0 0
RIP Requests Ignored 0 0 0
none 0 0 0
fe-1/2/1.5: 2 routes learned; 5 routes advertised; timeout 180s; update interval 10s
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 734 32 6
Triggered Updates Sent 0 0 0
Responses Sent 0 0 0
Bad Messages 0 0 0
RIPv1 Updates Received 0 0 0
RIPv1 Bad Route Entries 0 0 0
RIPv1 Updates Ignored 0 0 0
RIPv2 Updates Received 245 11 2
RIPv2 Bad Route Entries 0 0 0
RIPv2 Updates Ignored 0 0 0
Authentication Failures 0 0 0
RIP Requests Received 0 0 0
RIP Requests Ignored 0 0 0
none 0 0 0
意味
更新間隔フィールドは、ネイバー R1 の間隔が 60 秒、ネイバー R3 の 10 秒であることを示しています。[送信された更新] フィールドには、デバイス R2 がデバイス R3 に更新を送信する速度のおよそ 1/6 でデバイス R1 に更新を送信していることを示しています。
デバイスR2が受信したRIPアップデートの確認
目的
RIP 更新パケットが予想される間隔で送信されていることを確認します。
アクション
動作モードから、 コマンドを show rip statistics 入力します。
user@R1> show rip statistics
RIPv2 info: port 520; holddown 120s.
rts learned rts held down rqsts dropped resps dropped
5 0 0 0
fe-1/2/0.1: 5 routes learned; 2 routes advertised; timeout 180s; update interval 30s
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 312 10 2
Triggered Updates Sent 2 0 0
Responses Sent 0 0 0
Bad Messages 0 0 0
RIPv1 Updates Received 0 0 0
RIPv1 Bad Route Entries 0 0 0
RIPv1 Updates Ignored 0 0 0
RIPv2 Updates Received 181 5 1
RIPv2 Bad Route Entries 0 0 0
RIPv2 Updates Ignored 0 0 0
Authentication Failures 0 0 0
RIP Requests Received 1 0 0
RIP Requests Ignored 0 0 0
none 0 0 0
意味
RIPv2アップデート受信フィールドには、デバイスR2から受信したアップデートの数が表示されます。
デバイスR3が受信したRIPアップデートの確認
目的
RIP 更新パケットが予想される間隔で送信されていることを確認します。
アクション
動作モードから、 コマンドを show rip statistics 入力します。
user@R3> show rip statistics
RIPv2 info: port 520; holddown 120s.
rts learned rts held down rqsts dropped resps dropped
5 0 0 0
fe-1/2/0.6: 5 routes learned; 2 routes advertised; timeout 180s; update interval 30s
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 314 11 2
Triggered Updates Sent 1 0 0
Responses Sent 0 0 0
Bad Messages 0 0 0
RIPv1 Updates Received 0 0 0
RIPv1 Bad Route Entries 0 0 0
RIPv1 Updates Ignored 0 0 0
RIPv2 Updates Received 827 31 6
RIPv2 Bad Route Entries 0 0 0
RIPv2 Updates Ignored 0 0 0
Authentication Failures 0 0 0
RIP Requests Received 0 0 0
RIP Requests Ignored 0 0 0
none 0 0 0
意味
RIPv2アップデート受信フィールドには、デバイスR2から受信したアップデートの数が表示されます。