🏡
FRR実践④ OSPFv2基本 マルチエリア Config編
マルチエリアの動作が分かる構成を作ってみる。
まずは作ってみます。構成はこちら。
このようなネットワーク構成はありがちなマルチエリア構成になると思います。
マルチエリアにする利点は障害発生時の影響範囲の極小化など大規模ネットワークになる場合に使われることが多いです。
Config
5台のルーターのConfigはこちら。
Router_AとRouter_Bを上位ルーターに見立ててRouter_C、D、Eをエリア1、2、3に分割して接続する構成にしています。
Router_A
Router_A# show running-config
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
hostname frr
hostname Router_A
service integrated-vtysh-config
!
interface eth1
ip address 172.16.0.1/30
ip ospf 1 area 0
ip ospf network point-to-point
exit
!
interface eth2
ip address 172.16.0.5/30
ip ospf 1 area 1
ip ospf cost 15
exit
!
interface eth3
ip address 172.16.0.9/30
ip ospf 1 area 2
ip ospf cost 15
exit
!
interface eth4
ip address 172.16.0.13/30
ip ospf 1 area 3
ip ospf cost 15
exit
!
interface lo
ip address 10.0.0.1/32
exit
!
router ospf 1
ospf router-id 10.0.0.1
exit
!
end
Router_B
Router_B# show running-config
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
hostname frr
hostname Router_B
service integrated-vtysh-config
!
interface eth1
ip address 172.16.0.2/30
ip ospf 1 area 0
ip ospf network point-to-point
exit
!
interface eth2
ip address 172.16.0.17/30
ip ospf 1 area 1
exit
!
interface eth3
ip address 172.16.0.21/30
ip ospf 1 area 2
exit
!
interface eth4
ip address 172.16.0.25/30
ip ospf 1 area 3
exit
!
interface lo
ip address 10.0.0.2/32
exit
!
router ospf 1
ospf router-id 10.0.0.2
exit
!
end
Router_C
Router_C# show running-config
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
hostname frr
hostname Router_C
service integrated-vtysh-config
!
interface eth1
ip address 192.168.1.254/24
ip ospf 1 area 1
ip ospf passive
exit
!
interface eth6
ip address 172.16.0.6/30
ip ospf 1 area 1
ip ospf cost 15
exit
!
interface eth7
ip address 172.16.0.18/30
ip ospf 1 area 1
exit
!
interface lo
ip address 10.0.0.3/32
exit
!
router ospf 1
ospf router-id 10.0.0.3
exit
!
end
Router_D
Router_D# show running-config
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
hostname frr
hostname Router_D
service integrated-vtysh-config
!
interface eth1
ip address 192.168.2.254/24
ip ospf 1 area 2
ip ospf passive
exit
!
interface eth6
ip address 172.16.0.10/30
ip ospf 1 area 2
ip ospf cost 15
exit
!
interface eth7
ip address 172.16.0.22/30
ip ospf 1 area 2
exit
!
interface lo
ip address 10.0.0.4/32
exit
!
router ospf 1
ospf router-id 10.0.0.4
exit
!
end
Router_E
Router_E# show running-config
Building configuration...
Current configuration:
!
frr version 8.2.2
frr defaults traditional
hostname frr
hostname Router_E
service integrated-vtysh-config
!
interface eth1
ip address 192.168.3.254/24
ip ospf 1 area 3
ip ospf passive
exit
!
interface eth6
ip address 172.16.0.14/30
ip ospf 1 area 3
ip ospf cost 15
exit
!
interface eth7
ip address 172.16.0.26/30
ip ospf 1 area 3
exit
!
interface lo
ip address 10.0.0.5/32
exit
!
router ospf 1
ospf router-id 10.0.0.5
exit
!
end
Network Typeを入れてみた。(マルチエリアとは関係ない)
今回はRouter_AとRouter_B間(Area 0)にip ospf network point-to-pointを入れています。
これはNetwork Typeと言います。ルーター間が直接接続されている場合にはDR/BDRの選出は意味をなさないため、選出動作をしない設定となります。OSPFは古くからあるプロトコルのためシリアル接続など1対1接続のIFの場合に使われてきました。何も設定してない場合のNetwork TypeはBroadcastになります。Network Typeの一覧はこちら。
Network Type | DR/BDR選出 | ネイバー検出動作 | Hello/Dead間隔 |
---|---|---|---|
broadcast | する | 自動 | 10/40 |
point-to-point | しない | 自動 | 10/40 |
point-to-multipoint | しない | 自動 | 10/40 |
non-broadcast | する | 手動 | 30/120 |
point-to-multipoint(non-broadcast) | しない | 手動 | 30/120 |
ただし、FRRにはpoint-to-multipoint(non-broadcast)の実装はないと思います。
Costを入れてみた。(マルチエリアとは関係ない)
今回は通信経路を指定したかったのでCostの設定を入れています。コスト値は大きくなるほどに帯域幅が低いリンクであると認識されますので15と設定することでしていないIFが優先されるようになります。
つまりこの構成ではRouter_Bを経由した通信になります。
構成の確認、解説は次項に続きます。
Discussion