DynagenでCCIEを目指す
20100509 デフォルトゲートウェイ EIGRPの場合
最終更新:
it_certification
-
view
目的
- EIGRPのデフォルトルートの扱い方を確認します。
- EIGRPはip default-networkでデフォルトルートを通知できない事を確認します。
構成
- 設定概要
- EIGRPによってルーティングします。
- 構成図

- netファイル
model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f1/0 [[ROUTER R2]] f0/0 = R3 f1/0 [[ROUTER R3]]
- 初期設定 R1
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface FastEthernet0/0 ip address 192.168.10.1 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 192.168.10.0 auto-summary ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 R2
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! interface FastEthernet0/0 ip address 192.168.20.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.10.2 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 192.168.10.0 network 192.168.20.0 auto-summary ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 R3
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.0 ! interface FastEthernet1/0 ip address 192.168.20.3 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 192.168.20.0 auto-summary ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 ip route
- 事前確認
R1からR3 Loopback 0(3.3.3.3)へpingが届かない事を確認します。R1のルーティングテーブルを見ると、3.3.3.3宛てのエントリはありません。
R1#ping 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) R1# R1# R1# R1#show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0 C 192.168.10.0/24 is directly connected, FastEthernet0/0 D 192.168.20.0/24 [90/30720] via 192.168.10.2, 00:09:24, FastEthernet0/0 R1#
- デフォルトルートの通知
R3へのデフォルトルートを他のルータへ通知します。
R3(config)#ip route 0.0.0.0 0.0.0.0 3.3.3.254 R3(config)#router eigrp 1 R3(config-router)#redistribute static
この設定によって送信されたパケットは以下です。デフォルトルートが他のルータに通知されます。

- 疎通確認
R1からR3 Loopback 0にpingが届くようになりました。また、R1のルーティングテーブル上にはデフォルトルートが載っています。
R1#ping 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/58/180 ms R1# R1# R1#show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 192.168.10.2 to network 0.0.0.0 <- デフォルトルート 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0 C 192.168.10.0/24 is directly connected, FastEthernet0/0 D 192.168.20.0/24 [90/30720] via 192.168.10.2, 00:11:00, FastEthernet0/0 D*EX 0.0.0.0/0 [170/158720] via 192.168.10.2, 00:01:12, FastEthernet0/0 <- デフォルトルート R1#
- 設定削除
検証1の設定を削除します。
R3(config)#no ip route 0.0.0.0 0.0.0.0 3.3.3.254 R3(config)#router eigrp 1 R3(config-router)#no redistribute connected
検証2 default-network クラスレス指定
- 事前確認
設定投入前のR3ルーティングテーブルを確認します。
R3#show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 3.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0 D 192.168.10.0/24 [90/30720] via 192.168.20.2, 00:16:18, FastEthernet1/0 C 192.168.20.0/24 is directly connected, FastEthernet1/0 R3#
- default-networkの設定
default-networkを指定します。ルーティングテーブルには3.0.0.0/8という謎のルートが載ります。デフォルトルートはルーティングテーブル上に「*」が表示されますが、テーブル上に「*」つきのエントリが見当たりません。さらに、configを見ると、謎のstatic routeが自動生成されています。
あやしさ満載の動きをします。
あやしさ満載の動きをします。
R3(config)#ip default-network 3.3.3.0 R3(config)# R3(config)# R3(config)#do show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 3.3.3.0/24 is directly connected, Loopback0 S 3.0.0.0/8 [1/0] via 3.3.3.0 D 192.168.10.0/24 [90/30720] via 192.168.20.2, 00:02:50, FastEthernet1/0 C 192.168.20.0/24 is directly connected, FastEthernet1/0 R3(config)# R3(config)# R3(config)#do show run | i ^ip route ip route 3.0.0.0 255.0.0.0 3.3.3.0
R2のルーティングテーブルを見ると、デフォルトルートは通知されていない事が読み取れます。
R2#show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 C 192.168.20.0/24 is directly connected, FastEthernet0/0 R2#
- static 再配送
ダメもとで、staticを再配送してみます。
R3(config)#router eigrp 1 R3(config-router)#redistribute static
R2のルーティングテーブルを確認します。デフォルトルートは通知されていないようです。
R2#show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Loopback0 D EX 3.0.0.0/8 [170/156160] via 192.168.20.3, 00:00:09, FastEthernet0/0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 C 192.168.20.0/24 is directly connected, FastEthernet0/0 R2#
- 設定削除
検証2の設定を削除します。
R3(config)#no ip default-network 3.3.3.0 R3(config)#router eigrp 1 R3(config-router)#no redistribute static
検証3 default-network クラスフル指定
- default-network 設定
クラスフルなnetworkアドレスでdefault-netwokrを指定します。ルーティングテーブル上には確かに「*」が見られますが、他のルータにデフォルトルートを通知する事はありませんでした。
R3(config)#ip default-network 3.0.0.0 R3(config)#interface Loopback 1 R3(config-if)#ip address 192.168.30.3 255.255.255.0 R3(config-if)#exit R3(config)#ip default-network 192.168.30.0 R3(config)# R3(config)# R3(config)#do show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 * 3.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0 C* 192.168.30.0/24 is directly connected, Loopback1 D 192.168.10.0/24 [90/30720] via 192.168.20.2, 00:07:59, FastEthernet1/0 C 192.168.20.0/24 is directly connected, FastEthernet1/0 R3(config)#
- static 再配送
以下のようにstaicを再配送します。それでも、デフォルトルートは通知されないようです。
R3(config)#router eigrp 1 R3(config-router)#redistribute static