目的

OSPFとEIGRPのネットワーク間で再配布の設定を実施し、相互に通信できることを確認します。

接続構成

redistribute20
緑色の線は、シリアル接続です。
青色の線は、イーサネット接続です。

設定

R1の設定

R1#conf t

 

R1(config)#int fa0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit

 

R1(config)#int s0/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit

 

R1(config)#router eigrp 1
R1(config-router)#net 192.168.1.0 0.0.0.255
R1(config-router)#net 192.168.2.0 0.0.0.255
R1(config-router)#exit

 

 

R2の設定

R2(config)#int s0/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit

 

R2(config)#int s0/1
R2(config-if)#ip add 172.16.1.1 255.255.0.0
R2(config-if)#no shut
R2(config-if)#

 

R2(config)#router eigrp 1
R2(config-router)#net 192.168.2.0 0.0.0.255
R2(config-router)#redistribute ospf 10 metric 100000 10 255 1 1500 ←OSPFのルート情報をEIGRPで再配送。シードメトリック(帯域幅/遅延/信頼性/負荷/MTU)も設定
R2(config-router)#exit

 

R2(config)#router ospf 10
R2(config-router)#net 172.16.1.0 0.0.255.255 area 0
R2(config-router)#redistribute eigrp 1 subnets ←EIGRPのルート情報をOSPFで再配送
R2(config-router)#exit

 

 

R3の設定

R3(config)#int s0/0
R3(config-if)#ip add 172.16.1.2 255.255.0.0
R3(config-if)#no shut
R3(config-if)#exit

 

R3(config)#int fa0/0
R3(config-if)#ip add 172.17.1.1 255.255.0.0
R3(config-if)#no shut

 

R3(config)#int lo0
R3(config-if)#ip add 10.1.1.1 255.255.255.0
R3(config-if)#no shut

 

R3(config)#router ospf 10
R3(config-router)#net 172.16.1.0 0.0.255.255 area 0
R3(config-router)#net 172.17.1.0 0.0.255.255 area 0
R3(config-router)#net 10.1.1.0 0.0.0.255 area 0
R3(config-router)#exit

設定確認

最初に、上記のConfigで赤字を入力していない状態のルーティングテーブルから見ていきます。

R1#sh ip route
・・・
Gateway of last resort is not set

 

C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0

 

R2#sh ip route
・・・
Gateway of last resort is not set

 

O 172.17.0.0/16 [110/65] via 172.16.1.2, 00:03:00, Serial0/1
C 172.16.0.0/16 is directly connected, Serial0/1
10.0.0.0/32 is subnetted, 1 subnets
O 10.1.1.1 [110/65] via 172.16.1.2, 00:03:00, Serial0/1
D 192.168.1.0/24 [90/2172416] via 192.168.2.1, 00:05:49, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/0

 

R3#sh ip route
・・・
Gateway of last resort is not set

 

C 172.17.0.0/16 is directly connected, FastEthernet0/0
C 172.16.0.0/16 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Loopback0

 

R1とR3は直接接続されたネットワークのみ把握できています。
R2は、EIGRPとOSPFの両方のネットワークに属しているので、全ネットワークを把握しています。
この状態ではPC1とPC2は通信できないので、R2に再配布の設定を追加します。

 

EIGRPからOSPFへ再配送する設定を追加します。
R2(config)#router ospf 10
R2(config-router)#redistribute eigrp 1 subnets

 

これでR1のルート情報がR2を経由してR3へ再配送されます。
R3のルーティングテーブルを確認します。

R3#sh ip route
・・・
Gateway of last resort is not set

 

C 172.17.0.0/16 is directly connected, FastEthernet0/0
C 172.16.0.0/16 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Loopback0
O E2 192.168.1.0/24 [110/20] via 172.16.1.1, 00:00:04, Serial0/0
O E2 192.168.2.0/24 [110/20] via 172.16.1.1, 00:00:04, Serial0/0

新たに2つのルート情報を得ました。
OSPFの外部ルートを表す「O E1」と「O E2」の違いは以下の通りです。

メトリックタイプ 説明
E1 OSPFネットワーク中でコストが加算される
E2 OSPFネットワーク中でコストが加算されない(デフォルト)

 

次にOSPFからEIGRPへ再配送する設定を追加します。
R2(config)#router eigrp 1
R2(config-router)#redistribute ospf 10 metric 100000 10 255 1 1500

 

これでR3のルート情報がR2を経由してR1へ再配送されます。
R1のルーティングテーブルを確認します。

R1#sh ip route
・・・
Gateway of last resort is not set

 

D EX 172.17.0.0/16 [170/2172416] via 192.168.2.2, 00:00:02, Serial0/0
D EX 172.16.0.0/16 [170/2172416] via 192.168.2.2, 00:00:02, Serial0/0
10.0.0.0/32 is subnetted, 1 subnets
D EX 10.1.1.1 [170/2172416] via 192.168.2.2, 00:00:02, Serial0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0

新たに3つのルート情報を得ました。
これでEIGRPとOSPFの相互通信が可能になりました。

動作確認

PC1からPC2へPingの疎通確認を実施します。

PC1> ping 172.17.1.100

 

84 bytes from 172.17.1.100 icmp_seq=1 ttl=61 time=71.934 ms
84 bytes from 172.17.1.100 icmp_seq=2 ttl=61 time=61.646 ms
84 bytes from 172.17.1.100 icmp_seq=3 ttl=61 time=70.682 ms
84 bytes from 172.17.1.100 icmp_seq=4 ttl=61 time=71.818 ms
84 bytes from 172.17.1.100 icmp_seq=5 ttl=61 time=101.744 ms

PC2からPC1へPingの疎通確認を実施します。

PC2> ping 192.168.1.100

 

84 bytes from 192.168.1.100 icmp_seq=1 ttl=61 time=66.177 ms
84 bytes from 192.168.1.100 icmp_seq=2 ttl=61 time=95.377 ms
84 bytes from 192.168.1.100 icmp_seq=3 ttl=61 time=65.807 ms
84 bytes from 192.168.1.100 icmp_seq=4 ttl=61 time=103.529 ms
84 bytes from 192.168.1.100 icmp_seq=5 ttl=61 time=64.289 ms

トップへ戻る