2010年1月21日木曜日

7.3.6 RIP と IGRP でのデフォルトルーティング




基本設定、ripの設定後の show ip route



[Router0]
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:12, Serial2/0
C 192.168.2.0/24 is directly connected, Serial2/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:12, Serial2/0
R 192.168.5.0/24 [120/2] via 192.168.2.1, 00:00:12, Serial2/0

[Router1]
C 192.168.1.0/24 is directly connected, Serial2/0
C 192.168.2.0/24 is directly connected, Serial3/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial3/0
C 192.168.4.0/24 is directly connected, FastEthernet0/0
R 192.168.5.0/24 [120/1] via 192.168.1.2, 00:00:05, Serial2/0

[Router2]
C 192.168.1.0/24 is directly connected, Serial2/0
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:09, Serial2/0
R 192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:09, Serial2/0
R 192.168.4.0/24 [120/1] via 192.168.1.1, 00:00:09, Serial2/0
C 192.168.5.0/24 is directly connected, FastEthernet0/0


この後、Router0にloopback0とデフォルトルートをつけます。
(config)# ip route 0.0.0.0 0.0.0.0 loopback0

RIPでデフォルトルートを伝播させます。
(config)#router rip
(config-router)#default-information originate

#show ip route
[Router0]
C 172.16.1.1 is directly connected, Loopback0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:04, Serial2/0
C 192.168.2.0/24 is directly connected, Serial2/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:04, Serial2/0
R 192.168.5.0/24 [120/2] via 192.168.2.1, 00:00:04, Serial2/0
S* 0.0.0.0/0 is directly connected, Loopback0

[Router1]
C 192.168.1.0/24 is directly connected, Serial2/0
C 192.168.2.0/24 is directly connected, Serial3/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:00, Serial3/0
C 192.168.4.0/24 is directly connected, FastEthernet0/0
R 192.168.5.0/24 [120/1] via 192.168.1.2, 00:00:10, Serial2/0
R* 0.0.0.0/0 [120/1] via 192.168.2.2, 00:00:00, Serial3/0

[Router2]
C 192.168.1.0/24 is directly connected, Serial2/0
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:13, Serial2/0
R 192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:13, Serial2/0
R 192.168.4.0/24 [120/1] via 192.168.1.1, 00:00:13, Serial2/0
C 192.168.5.0/24 is directly connected, FastEthernet0/0
R* 0.0.0.0/0 [120/2] via 192.168.1.1, 00:00:13, Serial2/0

これで、どのワークステーションからも172.16.1.1 にpingできます。

2010年1月20日水曜日

7.2.7インタフェース経由のルーティング更新の抑止


両ルータにripを設定後のshow ip route


[router0]
C 192.168.14.0/24 is directly connected, FastEthernet0/0
C 192.168.15.0/24 is directly connected, Serial2/0
R 192.168.16.0/24 [120/1] via 192.168.15.2, 00:00:04, Serial2/0


[router1]
C 192.168.14.0/24 is directly connected, FastEthernet0/0
C 192.168.15.0/24 is directly connected, Serial2/0
R 192.168.16.0/24 [120/1] via 192.168.15.2, 00:00:04, Serial2/0


この状態でPC0⇔PC1のpingは通ります。
ここでRouter0からRouter1への更新を中止します。
Router0#(config-route)#passive-interface serial 0


(しばらく待って)この状態でのshow ip route
[Router0]
C 192.168.14.0/24 is directly connected, FastEthernet0/0
C 192.168.15.0/24 is directly connected, Serial2/0
R 192.168.16.0/24 [120/1] via 192.168.15.2, 00:00:18, Serial2/0


[Router1]
C 192.168.15.0/24 is directly connected, Serial2/0
C 192.168.16.0/24 is directly connected, FastEthernet0/0


PC0⇒PC1 のping : time out
PC1⇒PC0 のping : Destination host unreachable.
となり届かない。unreachableはルーティングテーブルがないこと。
更新情報がいかないので、ルーティングテーブルからRが削除


Router1にデフォルトルートを設定
(config)# ip route 0.0.0.0 0.0.0.0 192.168.15.1


[Router1] show ip route
C 192.168.15.0/24 is directly connected, Serial2/0
C 192.168.16.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.15.1


スタティックデフォルトルートが追加されている。
Router0⇔Router1 のpingが通るようになる