Table of Contents
概要
ルートタグを利用した再配送時のルートフィルタについて、設定ミスの切り分けと修正を行います。
ネットワーク構成
図のネットワーク構成で、RIPドメインとEIGRP AS45ドメイン間の通信が行われないように再配送時のルートフィルタを行っています。


設定概要
各ルータのルーティングプロトコルやルートフィルタに関連する設定は次の通りです。これらの設定には、一部設定ミスがあります。
R1
interface Ethernet0/0 ip address 192.168.12.1 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.13.1 255.255.255.0 ! interface Ethernet0/2 ip address 192.168.14.1 255.255.255.0 ! router eigrp 13 redistribute rip route-map RIP2EIGRP redistribute ospf 1 route-map OSPF2EIGRP network 192.168.13.0 no auto-summary ! router ospf 1 log-adjacency-changes redistribute rip subnets route-map RIP2OSPF redistribute eigrp 13 subnets route-map EIGRP2OSPF network 192.168.14.0 0.0.0.255 area 0 ! router rip version 2 redistribute eigrp 13 route-map EIGRP2RIP redistribute ospf 1 route-map OSPF2RIP network 192.168.12.0 no auto-summary ! route-map RIP2EIGRP permit 10 set metric 10000 100 255 1 1500 ! route-map EIGRP2RIP permit 10 set metric 2 ! route-map EIGRP2OSPF permit 10 set tag 13 ! route-map OSPF2EIGRP permit 10 set metric 10000 300 255 1 1500 ! route-map RIP2OSPF permit 10 set tag 100 ! route-map OSPF2RIP deny 10 match tag 45 ! route-map OSPF2RIP permit 20 set metric 5
R2
interface Loopback0 ip address 10.2.1.2 255.255.255.0 secondary ip address 10.2.2.2 255.255.255.0 secondary ip address 10.2.3.2 255.255.255.0 secondary ip address 10.2.0.2 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.12.2 255.255.255.0 ! router rip version 2 network 10.0.0.0 network 192.168.12.0 no auto-summary
R3
interface Loopback0 ip address 10.3.1.3 255.255.255.0 secondary ip address 10.3.2.3 255.255.255.0 secondary ip address 10.3.3.3 255.255.255.0 secondary ip address 10.3.0.3 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.13.3 255.255.255.0 ! router eigrp 13 network 10.0.0.0 network 192.168.13.0 no auto-summary
R4
interface Ethernet0/0 ip address 192.168.14.4 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.45.4 255.255.255.0 ! router eigrp 45 redistribute ospf 1 metric 10000 300 1 255 1500 route-map OSPF2EIGRP network 192.168.45.0 auto-summary ! router ospf 1 log-adjacency-changes redistribute eigrp 45 subnets route-map EIGRP2OSPF network 192.168.14.0 0.0.0.255 area 0 ! route-map OSPF2EIGRP deny 10 match tag 100 ! route-map EIGRP2OSPF permit 10 set tag 45
R5
interface Loopback0 ip address 10.5.1.5 255.255.255.0 secondary ip address 10.5.2.5 255.255.255.0 secondary ip address 10.5.3.5 255.255.255.0 secondary ip address 10.5.0.5 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.45.5 255.255.255.0 ! router eigrp 45 network 10.0.0.0 network 192.168.45.0 no auto-summary
トラブルの症状
R5のルーティングテーブルをみると、RIPドメインのルートだけでなく他のルーティングドメインのルートが一切登録されていなくなりました。
R5 show ip route
R5#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
C 192.168.45.0/24 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 4 subnets
C 10.5.3.0 is directly connected, Loopback0
C 10.5.2.0 is directly connected, Loopback0
C 10.5.1.0 is directly connected, Loopback0
C 10.5.0.0 is directly connected, Loopback0
そのため、R5はEIGRP AS45ドメイン以外のネットワークとの通信ができない状態です。R5以外のルータのルーティングテーブルには正しくルートが登録されています。たとえば、R2のルーティングテーブルは次の通りです。
R2 show ip route
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
C 192.168.12.0/24 is directly connected, Ethernet0/0
R 192.168.13.0/24 [120/2] via 192.168.12.1, 00:00:16, Ethernet0/0
R 192.168.14.0/24 [120/5] via 192.168.12.1, 00:00:16, Ethernet0/0
10.0.0.0/24 is subnetted, 8 subnets
R 10.3.1.0 [120/2] via 192.168.12.1, 00:00:16, Ethernet0/0
C 10.2.0.0 is directly connected, Loopback0
R 10.3.0.0 [120/2] via 192.168.12.1, 00:00:16, Ethernet0/0
C 10.2.1.0 is directly connected, Loopback0
R 10.3.3.0 [120/2] via 192.168.12.1, 00:00:16, Ethernet0/0
C 10.2.2.0 is directly connected, Loopback0
R 10.3.2.0 [120/2] via 192.168.12.1, 00:00:16, Ethernet0/0
C 10.2.3.0 is directly connected, Loopback0
R2のルーティングテーブルには、EIGRP AS45ドメインのルートは登録されていませんが、その他のルーティングドメインのルートが正しく登録されています。R5のルーティングテーブルだけが正しくないことから、R4でのルートフィルタの設定に問題があると推測できます。そこで、R4で次のshowコマンドでルートフィルタの設定を確認しました。
- show ip protocols
- show route-map
- show ip ospf database
- show ip eigrp topology
R4 showコマンドの結果
R4#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.45.4
It is an autonomous system boundary router
Redistributing External Routes from,
eigrp 45, includes subnets in redistribution
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.14.0 0.0.0.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
192.168.14.1 110 00:54:18
Distance: (default is 110)
Routing Protocol is "eigrp 45"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: ospf 1, eigrp 45
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.45.0
Routing Information Sources:
Gateway Distance Last Update
192.168.45.5 90 01:02:24
Distance: internal 90 external 170
R4#show route-map
route-map OSPF2EIGRP, deny, sequence 10
Match clauses:
tag 100
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP2OSPF, permit, sequence 10
Match clauses:
Set clauses:
tag 45
Policy routing matches: 0 packets, 0 bytes
R4#show ip ospf database
OSPF Router with ID (192.168.45.4) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.14.1 192.168.14.1 1621 0x80000004 0x00CB77 1
192.168.45.4 192.168.45.4 1292 0x80000004 0x009566 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.14.1 192.168.14.1 1875 0x80000002 0x00999B
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.2.0.0 192.168.14.1 1621 0x80000003 0x00E3D1 100
10.2.1.0 192.168.14.1 1621 0x80000003 0x00D8DB 100
10.2.2.0 192.168.14.1 1621 0x80000003 0x00CDE5 100
10.2.3.0 192.168.14.1 1621 0x80000003 0x00C2EF 100
10.3.0.0 192.168.14.1 1621 0x80000004 0x00B159 13
10.3.1.0 192.168.14.1 1621 0x80000004 0x00A663 13
10.3.2.0 192.168.14.1 1621 0x80000004 0x009B6D 13
10.3.3.0 192.168.14.1 1621 0x80000004 0x009077 13
10.5.0.0 192.168.45.4 1292 0x80000003 0x00F1D5 45
10.5.1.0 192.168.45.4 1292 0x80000003 0x00E6DF 45
10.5.2.0 192.168.45.4 1292 0x80000003 0x00DBE9 45
10.5.3.0 192.168.45.4 1292 0x80000003 0x00D0F3 45
192.168.12.0 192.168.14.1 1621 0x80000003 0x004804 100
192.168.13.0 192.168.14.1 1621 0x80000004 0x00178A 13
192.168.45.0 192.168.45.4 1292 0x80000003 0x000E32 45
R4#show ip eigrp topology
IP-EIGRP Topology Table for AS(45)/ID(192.168.45.4)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.5.3.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.2.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.1.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.0.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 192.168.45.0/24, 1 successors, FD is 281600
via Connected, Ethernet0/1
問題
- なぜR5のルーティングテーブルに正しくルート情報が登録されていないのですか。
- R5のルーティングテーブルにRIPドメイン以外のルートが正常に登録されるようにするためには、どのように設定を修正すればよいですか。ただし、アクセスリストやプレフィクスリストを利用して、明示的にネットワークアドレスを指定したフィルタを行ってはいけません。
解答
なぜR5のルーティングテーブルに正しくルート情報が登録されていないのですか。
R4でOSPFからEIGRP AS45へ再配送する際に適用しているルートマップ「OSPF2EIGRP」が正しくない。denyのシーケンスしか設定されていないため、暗黙のdenyによって、すべてのルートが再配送の対象外になってしまっている。タグ100が付いていないOSPFルートをEIGRP AS45へ再配送するために、permitのシーケンスが必要となる。
R5のルーティングテーブルにRIPドメイン以外のルートが正常に登録されるようにするためには、どのように設定を修正すればよいですか。ただし、アクセスリストやプレフィクスリストを利用して、明示的にネットワークアドレスを指定したフィルタを行ってはいけません。
R4
route-map OSPF2EIGRP permit 1000
ワンポイント
- ルートマップの最後には暗黙のdenyがある
- denyのシーケンスだけしか設定しなければ、最終的に暗黙のdenyによってすべてdenyされる
解説
ルートマップを使ったフィルタの設定でよくありがちな設定ミスです。ルートマップを使って、再配送時やBGPルートのフィルタを行うことが出来ます。ルートマップにも、アクセスリストやプレフィクスリストのように、最後に暗黙のdenyがあることを忘れてはいけません。denyのシーケンスしか設定しなければ、最終的に暗黙のdenyによってすべてdenyされることになってしまいます。
ルートマップについて、以下の記事で詳しく解説しています。
R4でOSPFからEIGRP AS45へ再配送するときに適用しているルートマップを確認すると、denyのシーケンスしかありません。
R4 show route-map
R4#show route-map
route-map OSPF2EIGRP, deny, sequence 10
Match clauses:
tag 100
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP2OSPF, permit, sequence 10
Match clauses:
Set clauses:
tag 45
Policy routing matches: 0 packets, 0 bytes
RIPドメインのルートには、R1でタグ100が付加されているので、タグ100のルートをEIGRP AS45ドメインへ再配送しないようにと考えているわけです。でも、denyのシーケンスしかないために、本来、再配送するべきEIGRP AS13ドメインやOSPFドメインのルートも再配送されていません。

タグ100が付加されていないルートをEIGRP AS45ドメインへ再配送するために、permitのシーケンスを追加します。
R4
route-map OSPF2EIGRP permit 1000
ルートマップ「OSPF2EIGRP」にpermitのシーケンスを追加すると、EIGRPトポロジテーブルが次のようになります。
R4 show ip eigrp topology
R4#show ip eigrp topology
IP-EIGRP Topology Table for AS(45)/ID(192.168.45.4)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.3.1.0/24, 1 successors, FD is 332800, tag is 13
via Redistributed (332800/0)
P 10.3.0.0/24, 1 successors, FD is 332800, tag is 13
via Redistributed (332800/0)
P 10.3.3.0/24, 1 successors, FD is 332800, tag is 13
via Redistributed (332800/0)
P 10.3.2.0/24, 1 successors, FD is 332800, tag is 13
via Redistributed (332800/0)
P 10.5.3.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.2.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.1.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 10.5.0.0/24, 1 successors, FD is 409600
via 192.168.45.5 (409600/128256), Ethernet0/1
P 192.168.45.0/24, 1 successors, FD is 281600
via Connected, Ethernet0/1
P 192.168.13.0/24, 1 successors, FD is 332800, tag is 13
via Redistributed (332800/0)
P 192.168.14.0/24, 1 successors, FD is 332800
via Redistributed (332800/0)
ルートマップを修正したことで、EIGRP AS13ドメイン、OSPFドメインのルートがEIGRP AS45ドメインに再配送されるようになったことがわかります。そして、このルートがR5へとアドバタイズされ、R5のルーティングテーブルは次のようになります。
R5 show ip route
R5#show ip route
~省略~
Gateway of last resort is not set
D EX 192.168.13.0/24 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
D EX 192.168.14.0/24 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
C 192.168.45.0/24 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 8 subnets
D EX 10.3.1.0 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
D EX 10.3.0.0 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
D EX 10.3.3.0 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
D EX 10.3.2.0 [170/358400] via 192.168.45.4, 00:02:21, Ethernet0/0
C 10.5.3.0 is directly connected, Loopback0
C 10.5.2.0 is directly connected, Loopback0
C 10.5.1.0 is directly connected, Loopback0
C 10.5.0.0 is directly connected, Loopback0
R5からの通信を確認すると、EIGRP AS45ドメインからEIGRP AS13ドメインおよびOSPFドメインへの通信が正常にできることがわかります。
R5 通信確認
R5#ping 10.3.0.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.3.0.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/26/44 ms R5#ping 192.168.14.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.14.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/68 ms
IPルーティング応用
- DNSラウンドロビン方式の負荷分散
- 負荷分散装置(ロードバランサ)の仕組み
- ルーティングプロセス ~実行中のルーティングプロトコル用のプログラム~
- 複数のルーティングプロトコルの利用
- 再配送(再配布) ~ルーティングドメイン境界で必須の設定~
- Cisco再配送(再配布)の設定 ~redistributeコマンド~
- Cisco 再配送の設定例 ~OSPFとRIPの双方向再配送~
- 再配送 設定ミスの切り分けと修正 Part1
- 再配送 設定ミスの切り分けと修正 Part2
- 再配送 設定ミスの切り分けと修正 Part3
- 再配送 設定ミスの切り分けと修正 Part4
- 再配送 設定ミスの切り分けと修正 Part5
- 再配送 設定ミスの切り分けと修正 Part6
- オフセットリスト(offset-list) ~ルート情報のメトリックを加算~
- オフセットリストの設定例 RIP
- オフセットリストの設定例 EIGRP
- ルートフィルタの概要
- ルートフィルタのポイント
- ディストリビュートリストによるルートフィルタの設定
- Ciscoディストリビュートリストによるルートフィルタの設定例
- プレフィクスリスト(prefix-list)によるルートフィルタの設定
- Ciscoプレフィクスリストによるルートフィルタの設定例
- Ciscoルートマップ(route-map)の概要 ~何をどう処理するか~
- Ciscoルートマップの設定
- Ciscoルートマップ(route-map)設定のポイント
- Ciscoルートマップによる再配送時のルート制御の設定例
- ポリシーベースルーティングの設定例
- GREトンネルインタフェース ~仮想的なポイントツーポイント接続~
- GREトンネルインタフェースの設定例
- GREトンネルの注意点 ~フラッピングしないように~
- オーバーレイネットワークとアンダーレイネットワーク
- ルート制御 ケーススタディ Part1
- ルート制御 ケーススタディ Part2
- ルート制御 ケーススタディ Part3
- VRF/VRF-Liteの概要 ~仮想的にルータを分割する~
- VRFの設定と確認コマンド [Cisco]
- VRF-Liteによるレイヤ3VPNの設定例 [Cisco]
- VRFルートリーク(スタティックルート)
- VRFルートリーク(スタティックルート)の設定例
- VRFルートリーク(MP-BGP)
- VRFルートリーク(MP-BGP)の設定例
- [FVRFの仕組み] FVRF(Front door VRF)とは
- [FVRFの仕組み] ポイントツーポイントGREトンネル:FVRFなし
- [FVRFの仕組み] ポイントツーポイントGREトンネル : FVRFあり(tunnel vrfコマンド)
- [FVRFの仕組み] IPSec VTI : FRVRFあり
- [FVRFの仕組み] IPSec VTI : FVRFあり 設定例
- [FVRFの仕組み] DMVPN : FVRFあり
- [FVRFの仕組み] DMVPN : FVRFあり 設定例 Part1
- [FVRFの仕組み] DMVPN : FVRFあり 設定例 Part2
- tunnel vrfコマンド
- tunnel vrfコマンドの設定例
- [演習] ルーティングループの防止
- [演習] 企業ネットワーク構築演習 Part1:拠点1の構築
- [演習] 企業ネットワーク構築演習 Part2:拠点2/拠点3の構築
- [演習] 企業ネットワーク構築演習 Part3:広域イーサネットの接続
- [演習] 企業ネットワーク構築演習 Part4:インターネット(AS1/AS2)の構築
- [演習] 企業ネットワーク構築演習 Part5:インターネットへの接続
- [演習] 企業ネットワーク構築演習 Part6:インターネットVPNの構築



