DynagenでCCIEを目指す
20100415 EIGRP stub
最終更新:
it_certification
-
view
目的
- EIGRP stubの設定方法を確認します。
- stubにより、不要なqueryが転送されなくなる事を確認します。
構成
- 設定概要
- EIGRPによってルーティングします。
- 構成図

- netファイル
ghostios = True sparsemem = True model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 256 [[ROUTER R1]] e0/0 = R2 e0/0 [[ROUTER R2]] f1/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.255 ! interface Ethernet0/0 ip address 192.168.0.1 255.255.255.0 full-duplex ! interface Ethernet0/1 ip address 192.168.1.1 255.255.255.0 full-duplex no keepalive ! interface Ethernet0/2 ip address 192.168.2.1 255.255.255.0 full-duplex no keepalive ! interface Ethernet0/3 ip address 192.168.3.1 255.255.255.0 full-duplex no keepalive ! router eigrp 1 network 1.1.1.1 0.0.0.0 network 192.168.0.0 network 192.168.1.0 network 192.168.2.0 network 192.168.3.0 no 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.255 ! interface Ethernet0/0 ip address 192.168.0.2 255.255.255.0 full-duplex ! interface Ethernet0/1 no ip address shutdown half-duplex ! interface Ethernet0/2 no ip address shutdown half-duplex ! interface Ethernet0/3 no ip address shutdown half-duplex ! interface FastEthernet1/0 ip address 192.168.10.2 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 2.2.2.2 0.0.0.0 network 192.168.0.0 network 192.168.10.0 no 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.255 ! interface FastEthernet1/0 ip address 192.168.10.3 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 3.3.3.3 0.0.0.0 network 192.168.10.0 no auto-summary ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 stubの設定確認
- デバッグの有効化
R2で以下のデバッグを予め有効にしておきます。
R2#debug eigrp packets stub EIGRP Packets debugging is on (STUB) R2#
- stubの設定
R1にstubの設定を投入します。
R1(config)#router eigrp 1 R1(config-router)#eigrp stub R1(config-router)#
- デバッグメッセージの確認
R2を見ると、neighborを切断した後に、stubとしてneighborを再確立しています。
(恐らく、updateかhelloにR1がstubである事を表すメッセージが含まれていると思われるのですが、パケットキャプチャの結果からは確認できませんでした。もし、知っている方がいらっしゃいましたら、情報提供お願い致します。)
(恐らく、updateかhelloにR1がstubである事を表すメッセージが含まれていると思われるのですが、パケットキャプチャの結果からは確認できませんでした。もし、知っている方がいらっしゃいましたら、情報提供お願い致します。)
R2# *Mar 1 00:03:36.315: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.0.1 (Ethernet0/0) is down: Interface Goodbye received *Mar 1 00:03:40.987: EIGRP: Adding stub (1 Peers, 1 Stubs) *Mar 1 00:03:40.991: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.0.1 (Ethernet0/0) is up: new adjacency R2#
- stubの確認
show ip eigrp neighbors detailでR1がstubとして設定されている事が確認できます。
R2#show ip eigrp neighbors detail IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.0.1 Et0/0 13 00:03:30 208 1248 0 5 Version 12.3/1.2, Retrans: 1, Retries: 0 Stub Peer Advertising ( CONNECTED SUMMARY ) Routes <- Stubである事が分かります。 Suppressing queries 1 192.168.10.3 Fa1/0 13 00:06:46 124 744 0 4 Version 12.3/1.2, Retrans: 2, Retries: 0 R2#
- stubの設定削除
検証2のために、stubの設定を削除します。
R1(config)#router eigrp 1 R1(config-router)#no eigrp stub
検証2 queryの確認
- デバッグの有効化
R2で以下のデバッグを予め有効にしておきます。
R2#debug eigrp packets query EIGRP Packets debugging is on (QUERY) R2#
- 通常時のquery
stubが設定されていない状態でのqueryパケットを確認します。
R2 1/0をshut, no shutします。その過程で、R1に対してqueryを送信した事が確認できます。
R2 1/0をshut, no shutします。その過程で、R1に対してqueryを送信した事が確認できます。
R2(config)#interface FastEthernet 1/0 R2(config-if)#shutdown R2(config-if)# *Mar 1 00:24:26.215: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.10.3 (FastEthernet1/0) is down: interface down *Mar 1 00:24:26.231: EIGRP: Enqueueing QUERY on Ethernet0/0 iidbQ un/rely 0/1 serno 33-34 *Mar 1 00:24:26.235: EIGRP: Sending QUERY on Ethernet0/0 <- R1にqueryを送信 *Mar 1 00:24:26.239: AS 1, Flags 0x0, Seq 18/0 idbQ 0/0 iidbQ un/rely 0/0 serno 33-34 *Mar 1 00:24:28.171: %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to administratively down *Mar 1 00:24:29.171: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down R2(config-if)#no shutdown
- stubの設定
R1にstubの設定を投入します。
R1(config)#router eigrp 1 R1(config-router)#eigrp stub
- stubの場合のquery
R2 1/0をshut, no shutします。さき程と異なり、R1に対してqueryを送信していません。
R2(config-if)#shutdown R2(config-if)# *Mar 1 00:26:17.935: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 192.168.10.3 (FastEthernet1/0) is down: interface down *Mar 1 00:26:18.359: EIGRP: Received QUERY on Ethernet0/0 nbr 192.168.0.1 *Mar 1 00:26:18.363: AS 1, Flags 0x0, Seq 15/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0 *Mar 1 00:26:19.895: %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to administratively down *Mar 1 00:26:20.895: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down R2(config-if)#no shutdown
検証3 summaryのみ通知
- デフォルト設定の確認
stubのデフォルトの設定を再確認します。show ip eigrp neighbors detailコマンドを入力すると、CONNECTED SUMMARYとの表記が見られます。stubが設定されているルータは、connectedとsummaryのルートのみをadvertiseするという意味です。
R2#show ip eigrp neighbors detail IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 192.168.10.3 Fa1/0 11 00:00:13 100 600 0 14 Version 12.3/1.2, Retrans: 1, Retries: 0 0 192.168.0.1 Et0/0 13 00:01:55 339 2034 0 17 Version 12.3/1.2, Retrans: 0, Retries: 0 Stub Peer Advertising ( CONNECTED SUMMARY ) Routes Suppressing queries
R2のルーティングテーブルは以下のようになります。R1 e0/1, 0/2, 0/3へのルートがあります。
R2#show ip route - 略 - 1.0.0.0/32 is subnetted, 1 subnets D 1.1.1.1 [90/409600] via 192.168.0.1, 00:02:46, Ethernet0/0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/156160] via 192.168.10.3, 00:01:03, FastEthernet1/0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 C 192.168.0.0/24 is directly connected, Ethernet0/0 D 192.168.1.0/24 [90/307200] via 192.168.0.1, 00:02:46, Ethernet0/0 <- R1 e0/1へ D 192.168.2.0/24 [90/307200] via 192.168.0.1, 00:02:46, Ethernet0/0 <- R1 e0/2へ D 192.168.3.0/24 [90/307200] via 192.168.0.1, 00:02:46, Ethernet0/0 <- R1 e0/3へ R2#
- summaryのみの通知
R1でe0/2, e0/3の集約ルートを定義し、さらにsummaryのみ通知するように設定します。
R1(config)#interface Ethernet 0/0 R1(config-if)#ip summary-address eigrp 1 192.168.2.0 255.255.254.0 R1(config-if)#exit R1(config)#router eigrp 1 R1(config-router)#eigrp stub summary
R2では、stubがsummaryのみ通知している事を確認できます。
R2#show ip eigrp neighbors detail IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.0.1 Et0/0 12 00:00:11 8 200 0 25 Version 12.3/1.2, Retrans: 1, Retries: 0 Stub Peer Advertising ( SUMMARY ) Routes <- summaryのみ通知 Suppressing queries 1 192.168.10.3 Fa1/0 13 00:06:31 129 774 0 20 Version 12.3/1.2, Retrans: 1, Retries: 0 R2#
ルーティングテーブルを見ると、R1から集約ルートが通知され、R1 e0/1へのエントリ(192.168.1.0/24)が消えている事が分かります。
R2#show ip route - 略 - 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/156160] via 192.168.10.3, 00:06:31, FastEthernet1/0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 C 192.168.0.0/24 is directly connected, Ethernet0/0 D 192.168.2.0/23 [90/307200] via 192.168.0.1, 00:00:10, Ethernet0/0 <- 集約ルート
補足1 staticの通知(検証失敗)
- static通知の設定
stubルータがstaticを通知する設定も検証しました。が、うまくいきませんでした。実際に行った操作は以下の通りです。
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254 R1(config)#ip route 10.0.0.0 255.0.0.0 192.168.1.254 R1(config)#router eigrp 1 R1(config-router)#eigrp stub summary static
- ルーティングテーブルの確認
R2のshowコマンドの出力結果は以下の通りです。staticルートが通知されませんでした。原因が分かったら、検証内容を修正したいと思います。
R2#show ip eigrp neighbors detail IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.0.1 Et0/0 14 00:01:05 1075 5000 0 27 Version 12.3/1.2, Retrans: 0, Retries: 0 Stub Peer Advertising ( STATIC SUMMARY ) Routes Suppressing queries 1 192.168.10.3 Fa1/0 13 00:09:09 155 930 0 22 Version 12.3/1.2, Retrans: 1, Retries: 0 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/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/156160] via 192.168.10.3, 00:09:13, FastEthernet1/0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 C 192.168.0.0/24 is directly connected, Ethernet0/0 D 192.168.2.0/23 [90/307200] via 192.168.0.1, 00:01:09, Ethernet0/0
ログを取り忘れましたが、以下のようなstatic指定もうまくいきませんでした。
R1(config)#ip route 1.1.1.1 255.255.255.255 loopback 0
補足2 redistributeの通知
- 再配送の設定
staticをEIGRPに再配送し、再配送されたルートを通知するようにします。
R1(config)#router eigrp 1 R1(config-router)#redistribute static R1(config-router)#eigrp stub summary static redistributed
- ルーティングテーブルの確認
再配送の通知はうまくいきました。
R2#show ip eigrp neighbors detail IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.0.1 Et0/0 10 00:00:32 879 5000 0 30 Version 12.3/1.2, Retrans: 0, Retries: 0 Stub Peer Advertising ( STATIC SUMMARY REDISTRIBUTED ) Routes Suppressing queries 1 192.168.10.3 Fa1/0 12 00:11:07 162 972 0 25 Version 12.3/1.2, Retrans: 1, Retries: 0 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 192.168.0.1 to network 0.0.0.0 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 3.0.0.0/32 is subnetted, 1 subnets D 3.3.3.3 [90/156160] via 192.168.10.3, 00:11:07, FastEthernet1/0 C 192.168.10.0/24 is directly connected, FastEthernet1/0 D EX 10.0.0.0/8 [170/307200] via 192.168.0.1, 00:00:32, Ethernet0/0 C 192.168.0.0/24 is directly connected, Ethernet0/0 D*EX 0.0.0.0/0 [170/307200] via 192.168.0.1, 00:00:32, Ethernet0/0 D 192.168.2.0/23 [90/307200] via 192.168.0.1, 00:00:32, Ethernet0/0 R2#
添付ファイル