このページで解説している内容は、以下の YouTube 動画の解説で見ることができます。
演習ファイルのダウンロード
ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習で使用するファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。
RIP(デフォルトルートの伝播)
デフォルトルートの設定は、ルーティングプロトコルの種類、IOSのバージョンによって、ルータの動作が異なるため、注意が必要です。ここでは、RIPによるデフォルトルートの伝搬について解説していきます。
下図のネットワークを使用します。
インターネット網をシミュレートするために、ISPルータにループバックアドレス、Lo0~lo3 を設定します。このループバックアドレスを仮のインターネット宛てのIPアドレスとして代用します。

上図のネットワークの構成では、インターネット宛へのルートは膨大です。そのルートを、各々のルータで扱うのは大変な作業となります。そこで、R1ルータ、R2ルータにおいて、宛先ネットワークがインターネット向けのルートをデフォルトルートを設定することでルータのルーティングテーブルの小さくすることができます。
そのデフォルトルートですが、R1ルータ、R2ルータにおいて静的なデフォルトルート「ip route 0.0.0.0 0.0.0.0」を指定することでもできますし、インターネットへの境界ルータであるR1ルータAで指定したデフォルトルートを他のRIPルータに伝播させることもできます。
基本設定
まず、ホスト名とIPv4アドレスなどの基本設定をルータに行います。
各ルータの基本コンフィグは、以下のとおりです。
●ISPのコンフィグ
hostname ISP
int lo0
ip address 10.0.0.1 255.255.255.0
int lo1
ip address 20.0.0.1 255.255.255.0
int lo2
ip address 30.0.0.1 255.255.255.0
int lo3
ip address 40.0.0.1 255.255.255.0
int s0/0/0
ip address 200.0.0.1 255.255.255.0
clock rate 64000
bandwidth 64
no shutdown
exit
ip route 172.16.0.0 255.255.255.0 200.0.0.2
ip route 172.17.0.0 255.255.255.0 200.0.0.2
end
copy run start
●R1のコンフィグ
hostname R1
int s0/0/0
ip address 200.0.0.2 255.255.255.0
bandwidth 64
no shutdown
int s0/0/1
ip address 172.16.0.1 255.255.255.0
clock rate 64000
bandwidth 64
no shutdown
exit
router rip
network 172.16.0.0
end
copy run start
●R2のコンフィグ
hostname R2
int g0/0
ip address 172.17.0.1 255.255.255.0
no shutdown
int s0/0/0
ip address 172.16.0.2 255.255.255.0
bandwidth 64
no shutdown
exit
router rip
network 172.16.0.0
network 172.17.0.0
end
copy run start
R1ルータのデフォルトルートの設定
R1ルータにデフォルトルートを設定します。
R1(config)#ip route 0.0.0.0 0.0.0.0 200.0.0.1
●R1ルータのルーティングテーブルを確認します。
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 200.0.0.1 to network 0.0.0.0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Serial0/0/1
L 172.16.0.1/32 is directly connected, Serial0/0/1
R 172.17.0.0/16 [120/1] via 172.16.0.2, 00:00:16, Serial0/0/1
200.0.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 200.0.0.0/24 is directly connected, Serial0/0/0
L 200.0.0.2/32 is directly connected, Serial0/0/0
S* 0.0.0.0/0 [1/0] via 200.0.0.1
上の黄色のマークに注目すると、ISPルータへのデフォルトルートの存在が確認できます。
●R2ルータのデフォルトルートを確認します。
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Serial0/0/0
L 172.16.0.2/32 is directly connected, Serial0/0/0
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.17.0.0/24 is directly connected, GigabitEthernet0/0
L 172.17.0.1/32 is directly connected, GigabitEthernet0/0
R2ルータにおいて、デフォルトルートがありません。
R1ルータにおけるデフォルトルートの伝播設定
default-information originate コマンド
R1ルータで「default-information originate」コマンドを実行してデフォルトルートを生成し、R2ルータにへアドバタイズさせます。
以下のコマンドを実行します。
R1(config)#router rip
R1(config-router)#default-information originate
●R2ルータのデフォルトルートを確認します。
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 172.16.0.1 to network 0.0.0.0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Serial0/0/0
L 172.16.0.2/32 is directly connected, Serial0/0/0
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.17.0.0/24 is directly connected, GigabitEthernet0/0
L 172.17.0.1/32 is directly connected, GigabitEthernet0/0
R* 0.0.0.0/0 [120/1] via 172.16.0.1, 00:00:29, Serial0/0/0
R2のルーティングテーブルに、RIPにより、以下のデフォルトルート「0.0.0.0/0」が追加されたことが確認できます。
R* 0.0.0.0/0 [120/1] via 172.16.0.1, 00:00:29, Serial0/0/0
●PC1から、インターネット網へPingを行います。
C:>ping 10.0.0.1

pingは、成功します。
RIPv2(デフォルトルートの伝播)
●R1ルータでRIPv2を設定します。
以下のコマンドを実行します。
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#end
R1#copy run startup-config
●R2ルータでRIPv2を設定します。
以下のコマンドを実行します。
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#end
R2#copy run startup-config
すべてのデバイスの再起動
すべてのデバイスを再起動させます。
「Power Cycle Devices」ボタンをクリックします。

リンクライトが緑色に点灯したら、R2ルータのルーティングテーブルを確認します。
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 172.16.0.1 to network 0.0.0.0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Serial0/0/0
L 172.16.0.2/32 is directly connected, Serial0/0/0
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.17.0.0/24 is directly connected, GigabitEthernet0/0
L 172.17.0.1/32 is directly connected, GigabitEthernet0/0
R* 0.0.0.0/0 [120/1] via 172.16.0.1, 00:00:04, Serial0/0/0
RIPv2においても、デフォルトルートが伝番してきていることが確認できます。
次の「IGRP(デフォルトルートの伝播)」では、IGRPのデフォルトルートの伝播について解説します。
演習ファイルのダウンロード
ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習で使用するファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。