◾️OSPF エリア間経路集約
【課題】・集約設定後、R2に自動インストールされたNull経路の削除する。
集約経路
◾️検証環境図
①検証環境 事前設定確認
(1)OSPFネイバー確認OSPFネイバーが正常に張れている事を確認する。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:35 192.168.12.2 Ethernet0/0
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.12.2 1 FULL/DR 00:00:32 192.168.12.1 Ethernet0/0
172.16.5.3 1 FULL/BDR 00:00:36 192.168.23.3 Ethernet0/1
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:31 192.168.23.2 Ethernet0/1
(2)OSPFインターフェース確認
エリア設定が正しい事を確認する。
R1#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 1.1.1.1/32 1 LOOP 0/0
Et0/0 1 0 192.168.12.1/24 10 DR 1/1
R2#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 2.2.2.2/32 1 LOOP 0/0
Et0/0 1 0 192.168.12.2/24 10 BDR 1/1
Et0/1 1 10 192.168.23.2/24 10 DR 1/1
R3#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 10 3.3.3.3/32 1 LOOP 0/0
Lo1 1 10 172.16.1.3/24 1 P2P 0/0
Lo2 1 10 172.16.2.3/24 1 P2P 0/0
Lo3 1 10 172.16.3.3/24 1 P2P 0/0
Lo4 1 10 172.16.4.3/24 1 P2P 0/0
Lo5 1 10 172.16.5.3/24 1 P2P 0/0
Et0/1 1 10 192.168.23.3/24 10 BDR 1/1
(3)ルーティング確認
個別経路(172.16.1.0/24~172.16.5.0/24)がない事、左記経路が集約されている事を確認する。
R1#sh ip route ospf
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 192.168.12.2, 00:44:00, Ethernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/21] via 192.168.12.2, 00:42:10, Ethernet0/0
172.16.0.0/21 is subnetted, 1 subnets
O IA 172.16.0.0 [110/21] via 192.168.12.2, 00:00:09, Ethernet0/0
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:44:00, Ethernet0/0
R2#show run | section router ospf
router ospf 1
area 10 range 172.16.0.0 255.255.248.0
集約した経路に対するNull0が自動でルーティングテーブルへインストールされてる事を
確認する。※ループ防止の為
R2#show ip route ospf
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 192.168.12.1, 00:04:15, Ethernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
O 172.16.0.0/21 is a summary, 00:04:15, Null0
O 172.16.1.0/24 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
O 172.16.2.0/24 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
O 172.16.3.0/24 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
O 172.16.4.0/24 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
O 172.16.5.0/24 [110/11] via 192.168.23.3, 00:04:15, Ethernet0/1
②設定変更1(集約の設定)
(1)R2にて自動インストールされたNull経路を削除する。
R2(config)#router ospf 1
R2(config-router)#no discard-route internal
(2)R2のルーティングテーブル上、Null経路が削除されている事を確認する。
R2#sh ip route ospf
Geteway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 192.168.12.1, 00:00:08, Ethernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1
172.16.0.0/24 is subnetted, 5 subnets
O 172.16.1.0 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1
O 172.16.2.0 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1
O 172.16.3.0 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1
O 172.16.4.0 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1
O 172.16.5.0 [110/11] via 192.168.23.3, 00:00:08, Ethernet0/1