H O M E > ネットワークのおべんきょしませんか? Cisco CCNA/CCNP/CCIE、ネットワークスペシャリスト試験の勉強にピッタリ > 2013年3月
(所属カテゴリー:IPルーティング | シスコ---投稿日時:2013年3月29日)
上記のネットワーク構成でRIPドメインとOSPFドメインのR1、R2で双方向の再配送を行なっています。
R1 初期設定抜粋
----------------------------------------------- interface Ethernet0/0 ip address 192.168.13.1 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.15.1 255.255.255.0 ! router ospf 1 router-id 1.1.1.1 log-adjacency-changes redistribute rip subnets network 192.168.13.0 0.0.0.255 area 0 ! router rip version 2 redistribute ospf 1 metric 10 network 192.168.15.0 no auto-summary -----------------------------------------------
R2 初期設定抜粋
----------------------------------------------- interface Ethernet0/0 ip address 192.168.23.2 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.25.2 255.255.255.0 ! router ospf 100 router-id 2.2.2.2 log-adjacency-changes redistribute rip subnets network 192.168.23.0 0.0.0.255 area 0 ! router rip version 2 redistribute ospf 1 metric 10 network 192.168.25.0 no auto-summary -----------------------------------------------
R3 初期設定抜粋
----------------------------------------------- interface Ethernet0/0 ip address 192.168.13.3 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.23.3 255.255.255.0 ! interface Ethernet0/2 ip address 192.168.34.3 255.255.255.0 ! router ospf 1 router-id 3.3.3.3 log-adjacency-changes network 192.168.0.0 0.0.255.255 area 0 -----------------------------------------------
R4 初期設定抜粋
----------------------------------------------- interface Loopback0 ip address 10.1.1.4 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.34.4 255.255.255.0 ! router ospf 1 router-id 4.4.4.4 log-adjacency-changes network 10.1.1.0 0.0.0.255 area 0 network 192.168.34.0 0.0.0.255 area 0 -----------------------------------------------
R5 初期設定抜粋
----------------------------------------------- interface Ethernet0/0 ip address 192.168.15.5 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.25.5 255.255.255.0 ! interface Ethernet0/2 ip address 192.168.56.5 255.255.255.0 ! router rip version 2 network 192.168.15.0 network 192.168.25.0 network 192.168.56.0 no auto-summary -----------------------------------------------
R6 初期設定抜粋
----------------------------------------------- interface Loopback0 ip address 172.16.1.6 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.56.6 255.255.255.0 ! router rip version 2 offset-list 0 out 3 network 172.16.0.0 network 192.168.56.0 no auto-summary -----------------------------------------------
現在の設定では、インタフェースがダウンして、その後、復旧したなどのネットワーク構成の変化にともなって最適ではないルーティングになってしまうことがわかりました。
例として、R2のルーティングテーブルを確認します。現在のR2のルーティングテーブルは次のようになっています。
R2
----------------------------------------------- R2#show ip route ~省略~ Gateway of last resort is not set O 192.168.13.0/24 [110/20] via 192.168.23.3, 00:41:45, Ethernet0/0 O E2 192.168.15.0/24 [110/20] via 192.168.23.3, 00:41:45, Ethernet0/0 C 192.168.25.0/24 is directly connected, Ethernet0/1 172.16.0.0/24 is subnetted, 1 subnets R 172.16.1.0 [120/5] via 192.168.25.5, 00:00:14, Ethernet0/1 R 192.168.56.0/24 [120/1] via 192.168.25.5, 00:00:14, Ethernet0/1 10.0.0.0/32 is subnetted, 1 subnets O 10.1.1.4 [110/21] via 192.168.23.3, 00:41:45, Ethernet0/0 C 192.168.23.0/24 is directly connected, Ethernet0/0 O 192.168.34.0/24 [110/20] via 192.168.23.3, 00:41:45, Ethernet0/0 -----------------------------------------------
R2ではRIPドメインのルートである172.16.1.0/24、192.168.56.0/24はRIPルートとしてR5から学習しています。この状態からR2のE0/1をシャットダウンします。R2 E0/1 シャットダウン時のルーティングテーブルは以下のようになります。
R2(E0/1 シャットダウン時)
----------------------------------------------- R2#show ip route ~省略~ Gateway of last resort is not set O 192.168.13.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 O E2 192.168.15.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 O E2 192.168.25.0/24 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 172.16.0.0/24 is subnetted, 1 subnets O E2 172.16.1.0 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 O E2 192.168.56.0/24 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 10.0.0.0/32 is subnetted, 1 subnets O 10.1.1.4 [110/21] via 192.168.23.3, 00:42:44, Ethernet0/0 C 192.168.23.0/24 is directly connected, Ethernet0/0 O 192.168.34.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 -----------------------------------------------
R2 E0/1がシャットダウンされているときには、OSPFドメインを経由してRIPドメインへパケットをルーティングすることができます。ただし、その後、R2 E0/1のインタフェースがUpになってもRIPドメインあてのパケットのルーティングの経路が元に戻りません。R2 E0/1のシャットダウンを解除したあとのルーティングテーブルは、以下のようになり、シャットダウン時と同じです。
R2(E0/1 シャットダウンを解除したあと)
----------------------------------------------- R2#show ip route ~省略~ Gateway of last resort is not set O 192.168.13.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 O E2 192.168.15.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 O E2 192.168.25.0/24 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 172.16.0.0/24 is subnetted, 1 subnets O E2 172.16.1.0 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 O E2 192.168.56.0/24 [110/20] via 192.168.23.3, 00:00:07, Ethernet0/0 10.0.0.0/32 is subnetted, 1 subnets O 10.1.1.4 [110/21] via 192.168.23.3, 00:42:44, Ethernet0/0 C 192.168.23.0/24 is directly connected, Ethernet0/0 O 192.168.34.0/24 [110/20] via 192.168.23.3, 00:42:44, Ethernet0/0 -----------------------------------------------
その結果、R2からRIPドメインへのパケットの転送経路は最適ではありません。R2から172.16.1.0/24へTracerouteを実行すると、次のようになります。
R2
----------------------------------------------- R2#traceroute 172.16.1.6 Type escape sequence to abort. Tracing the route to 172.16.1.6 1 192.168.23.3 28 msec 24 msec 44 msec 2 192.168.13.1 8 msec 32 msec 52 msec 3 192.168.15.5 12 msec 44 msec 52 msec 4 192.168.56.6 8 msec 32 msec * -----------------------------------------------
R2からRIPドメインのネットワークへは、通信自体はできていますが最適ではないパケットの転送経路になってしまっていることがわかります。