忍者ブログ
Kossyの生活・仕事・ゲームのブログです^p^ 音ゲーは楽しい
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。


下図のようにRIPとOSPFを利用し、複数のルータで再配送を行う場合、
最短(最適)ルートがルーティングテーブルに載らないことがある。

redistribute_distance再配送時の最適ルート構成図.png

不適切なルートが載ってしまう原因はアドミニストレーティブディスタンスにある。
RIPのアドミニストレーティブディスタンスは120で、OSPFは110となっており、
値の少ない方が優先的にルーティングテーブルに載る。

拍手[0回]

まずルータR1とR2のルーティングテーブルを見てみる。
ルータR1はRIPで伝播されているが、ルータR2はOSPFで伝播されたものが載っている。
ルータR2のネクストホップを見ると、ルータR1(192.168.1.1)を指している。

R1# sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R       10.2.0.0/24 [120/1] via 192.168.2.4, 00:00:07, FastEthernet1
O       10.1.0.0/16 [110/2] via 192.168.1.3, 04:20:47, FastEthernet0
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1


R2# sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2    10.2.0.0/24 [110/20] via 192.168.1.1, 00:28:00, FastEthernet0
O       10.1.0.0/16 [110/2] via 192.168.1.3, 04:18:39, FastEthernet0
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1


隣接しているルータR4へ行くだけなのに、わざわざOSPFドメイン内を通り、
ルータR1を経由してからルータR4に到達している。
このように複数のルータで再配送を行うと、最適なルートを選択しないことが分かる。(下図参照)

redistribute_distance再配送時の最適ルート構成図2.png

これを解決するために、アドミニストレーティブディスタンスの値を調整する。
OSPFよりもRIPの方を優先させるよう値を105に設定する。
また、10.2.0.0/16のみの優先度を上げるようにするため、access-listを定義する。


◇アドミニストレーティブディスタンスを調整するコマンド
※ルータR1、R2の両方に実施。
R1(config)# router rip
R1(config-router)# distance 105 0.0.0.0 255.255.255.255 1
R1(config-router)# exit
R1(config)# access-list 1 permit 10.2.0.0

R2(config)# router rip
R2(config-router)# distance 105 0.0.0.0 255.255.255.255 1
R2(config-router)# exit
R2(config)# access-list 1 permit 10.2.0.0


ちなみに、access-listを定義せず、RIP全体のアドミニストレーティブティスタンスの値を105にすると、
OSPFよりも優先度が上がってしまい、OSPF側でも同様に不適切なルート選択が起こる。
(RIP全体の値を変更するには、単に“distance 105”と設定する。)

以下がそうなった場合のルーティングテーブル。

R1#
sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R       10.2.0.0/24 [105/1] via 192.168.2.4, 00:00:20, FastEthernet1
O       10.1.0.0/16 [110/2] via 192.168.1.3, 00:00:04, FastEthernet0
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1


R2# sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R       10.2.0.0/24 [105/1] via 192.168.2.4, 00:00:00, FastEthernet1
R       10.1.0.0/16 [105/2] via 192.168.2.1, 00:00:15, FastEthernet1
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1

ルータR1は10.1.0.0/16をOSPFで受け取っているが、
ルータR2はRIPの方をルーティングテーブルに載せてしまっている。
そのため、ルータR3に行くためにはRIPドメインを通り、ルータR1を経由した上で到着するという遠回りな道のりになる。


今度は、正常にアドミニストレーティブディスタンスの値を調整した場合を見てみる。
ルータR4へのルート情報がRIPで伝播され、最適なルートとなっていることが分かる。

R1# sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R       10.2.0.0/24 [105/1] via 192.168.2.4, 00:00:20, FastEthernet1
O       10.1.0.0/16 [110/2] via 192.168.1.3, 04:25:35, FastEthernet0
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1


R2# sh ip route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R       10.2.0.0/24 [105/1] via 192.168.2.4, 00:00:08, FastEthernet1
O       10.1.0.0/16 [110/2] via 192.168.1.3, 04:24:01, FastEthernet0
C    192.168.1.0/24 is directly connected, FastEthernet0
C    192.168.2.0/24 is directly connected, FastEthernet1

PR

Comment
Name
Title
Mail
URL
Comment
Pass   Vodafone絵文字 i-mode絵文字 Ezweb絵文字
この記事へのトラックバック
この記事にトラックバックする:
[178] [177] [176] [175] [174] [173] [172] [171] [170] [169] [168
«  Back :   HOME   : Next  »
カウンター
カレンダー
03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
プロフィール

[Author] Kossy
[Steam_ID] Kossy

定時帰りそこそこ復活<(╹ヮ╹)>

最新コメント
[07/17 Kossy]
[07/17 カサハンラ]
[09/04 Kossy]
[09/03 おちんちん]
[08/04 testes]
[08/03 Kossy]
[08/02 testes]
マシンスペック

【メインPC】
[OS] Windows11 Pro
[CPU] Core i5-10400 @2.9GHz
[MEM] 32GB
[VGA] NVIDIA GTX1660 SUPER
[マウス] Logicool M550L
[PAD] SteelSeries QcK 63004
[キーボード] Logicool K295

【Webサーバー機】
[Model] MINISFORUM N40
[OS] Rocky Linux
[CPU] Celeron N4020 @2.8GHz
[MEM] 4GB
[SSD] 64GB
ブログ内検索
アーカイブ
バーコード
最新トラックバック
忍者ブログ [PR]