OSPFマルチエリア実装とトンネル統合ガイド

1. アドレス設計

172.16.0.0/16 を 6 ブロックに分割。3 ビット借用で /19 を各エリアに割り当てる。

エリアプレフィックス
Backbone(Area 0)172.16.0.0/19
Area 1172.16.32.0/19
Area 2172.16.64.0/19
Area 3172.16.96.0/19
Area 4172.16.128.0/19
RIP 領域172.16.160.0/19

1.1 Area 0 詳細割当

用途サブネット
MGRE トンネル172.16.0.0/29
RT05 Loopback172.16.8.0/21
RT06 Loopback172.16.16.0/21
RT07 Loopback172.16.24.0/21

1.2 その他エリア詳細

Area 1~4、RIP 領域も同様に /30 または /21 などで細分化し、ループバックとトランクリンクを割り当てる。

2. インターフェース設定例

RT01(config)# hostname RT01
RT01(config)# interface Loopback0
RT01(config-if)# ip address 172.16.40.1 255.255.248.0
RT01(config)# interface GigabitEthernet0/0
RT01(config-if)# ip address 172.16.32.1 255.255.255.248

残りルータも同様にインターフェース IP を設定。

3. MGRE トンネル構築

3.1 Hub(RT03)

RT03(config)# interface Tunnel0
RT03(config-if)# ip address 172.16.0.1 255.255.255.248
RT03(config-if)# tunnel mode gre multipoint
RT03(config-if)# tunnel source 34.0.0.1
RT03(config-if)# ip nhrp network-id 100
RT03(config-if)# ip nhrp map multicast dynamic

3.2 Spoke(RT05 例)

RT05(config)# interface Tunnel0
RT05(config-if)# ip address 172.16.0.2 255.255.255.248
RT05(config-if)# tunnel mode gre multipoint
RT05(config-if)# tunnel source Serial0/0
RT05(config-if)# ip nhrp network-id 100
RT05(config-if)# ip nhrp nhs 172.16.0.1 nbma 34.0.0.1

RT06、RT07 も同様に NHS を登録。

4. OSPF プロセス起動とエリア割当

4.1 Area 1 ルータ

RT01(config)# router ospf 1
RT01(config-router)# network 172.16.40.0 0.0.7.255 area 1
RT01(config-router)# network 172.16.32.0 0.0.0.7 area 1

4.2 ABR / ASBR 設定

RT03(config)# ip route 0.0.0.0 0.0.0.0 34.0.0.2
RT03(config)# interface Tunnel0
RT03(config-if)# ip ospf network broadcast
RT03(config)# router ospf 1
RT03(config-router)# network 172.16.0.0 0.0.0.7 area 0
RT03(config-router)# network 172.16.56.0 0.0.7.255 area 1
RT03(config-router)# network 172.16.32.0 0.0.0.7 area 1

RT05~RT07 も default-route、network 文、Tunnel の network-type を設定。

5. 再配送とサマリ

5.1 OSPF ↔ OSPF(ASBR RT09)

RT09(config)# router ospf 1
RT09(config-router)# redistribute ospf 2 subnets
RT09(config)# router ospf 2
RT09(config-router)# redistribute ospf 1 subnets

5.2 OSPF ↔ RIP(ASBR RT12)

RT12(config)# router ospf 1
RT12(config-router)# redistribute rip subnets
RT12(config)# router rip
RT12(config-router)# redistribute ospf 1 metric 5

5.3 エリアサマリ

RT03(config)# router ospf 1
RT03(config-router)# area 1 range 172.16.32.0 255.255.224.0
RT03(config)# ip route 172.16.32.0 255.255.224.0 Null0

各 ABR/ASBR で同様に range / summary-address を設定し、Null ルブラックホール)ルートを追加。

6. 特殊エリア化

RT01(config)# router ospf 1
RT01(config-router)# area 1 stub
RT03(config)# router ospf 1
RT03(config-router)# area 1 stub no-summary

Area 2、3 は nssa no-summary にし、必要に応じて完全 NSSA に変更。

7. NAT とデフォルトルート

RT03(config)# ip nat inside source list 1 interface Serial0/0 overload
RT03(config)# access-list 1 permit 172.16.0.0 0.0.255.255
RT10(config)# ip route 0.0.0.0 0.0.0.0 172.16.128.1

インターネットへのアウトバウンド NAT を RT03、RT06、RT07 に実装。

タグ: OSPF Area-design MGRE NAT Route-redistribution

7月4日 17:07 投稿