作業環境
- 型番:FortiGate 60E
- ファームウェアバージョン:v6.0.9
OSPF コンフィグについて
コンフィグ構造
config router ospf
#OSPF グローバル設定--------------
set ...
#------------------------------
#エリア設定-------------------
config area
edit x.x.x.x
next
end
#------------------------------
#インターフェース設定----------------
config ospf-interface
edit "xxxx"
set ...
next
end
#------------------------------
#ネットワーク設定----------------
config network
edit 1
set prefix x.x.x.x x.x.x.x
next
end
#------------------------------
#再配送設定---------------------
config redistribute "connected"
set ...
end
config redistribute "static"
end
config redistribute "rip"
end
config redistribute "bgp"
end
config redistribute "isis"
end
#------------------------------
#オプションの config 設定--------
#------------------------------
end
#config のオプション
FGT (ospf) # config
area OSPF area configuration.
ospf-interface OSPF interface configuration.
network OSPF network configuration.
neighbor OSPF neighbor configuration are used when OSPF runs on non-broadcast media
summary-address IP address summary configuration.
distribute-list Distribute list configuration.
redistribute Redistribute configuration.
ルータ ID の設定
ルータ ID はグローバルで設定。
#ルータ ID を 1.2.3.4 に設定する場合
config router ospf
set router-id 1.2.3.4
end
#ヘルプ
*router-id Router ID.
プライオリティの設定
プライオリティは config ospf-interface で実施。
#wan1 のプライオリティを 10 に設定する場合
config router ospf
config ospf-interface
edit "wan1"
set priority 10
next
end
end
#ヘルプ
priority Priority.
passive-interface の設定
ルーティングアップデートや Hello パケットの送信を止める passive-interface の設定はグローバルで設定。
#wan2 を passive-interface に設定する場合
config router ospf
set passive-interface "wan2"
end
#ヘルプ
passive-interface Passive interface configuration.
等コストパスの最大数の設定
当コストパスの最大数の設定は OSPF の設定でなく config system setting で実施。
#当コストパスの最大数を 10 に設定する場合
config system settings
set ecmp-max-paths 10
end
#ヘルプ
ecmp-max-paths Maximum number of Equal Cost Multi-Path (ECMP) next-hops. Set to 1 to disable ECMP
ecmp-max-paths Enter an integer value from <1> to <255> (default = <255>).
エリアタイプの設定
エリアタイプの設定は config area で設定。
#エリア 0.0.0.1 のタイプを stub に設定する場合
config router ospf
config area
edit 0.0.0.1
set type stub
next
end
end
#ヘルプ
type Area type setting.
# set type
regular Regular.
nssa NSSA.
stub Stub.
スタブタイプの設定
#エリア 0.0.0.1 の stub タイプを summary に設定する場合
config router ospf
config area
edit 0.0.0.1
set stub-type summary
next
end
end
#ヘルプ
stub-type Stub summary setting.
# set stub-type
no-summary No summary.
summary Summary.
デフォルトルートのコストの設定
■ スタブまたは NSSA エリアにアドバタイズするデフォルトルートのコストの設定
#エリア 0.0.0.1 に配布するデフォルトルートのコストを 10 に設定する場合
config router ospf
config area
edit 0.0.0.1
set default-cost 10
next
end
end
#ヘルプ
default-cost Summary default cost of stub or NSSA area.
default-cost Enter an integer value from <0> to <4294967295> (default = <10>).
NSSA エリアに関する設定
■ デフォルトルート配布(LSAタイプ7)の設定
#デフォルトルート配布の有効化、メトリック 10、メトリックタイプ 2 と設定する場合
config router ospf
config area
edit 0.0.0.1
set nssa-default-information-originate enable
set nssa-default-information-originate-metric 10
set nssa-default-information-originate-metric-type 2
next
end
end
#ヘルプ
nssa-default-information-originate Redistribute, advertise, or do not originate Type-7 default route into NSSA area.
nssa-default-information-originate-metric OSPF default metric.
nssa-default-information-originate-metric-type OSPF metric type for default routes.
# set nssa-default-information-originate
enable Redistribute Type-7 default route from routing table.
always Advertise a self-originated Type-7 default route.
disable Do not advertise Type-7 default route.
nssa-default-information-originate always とするとルーティングテーブルにデフォルトルートが存在しなくても自身をデフォルトルートとして配布。
ネットワークタイプの設定
ネットワークタイプの設定は config ospf-interface で実施。
#wan1 のネットワークタイプを broadcast に設定する場合
config router ospf
config ospf-interface
edit "wan1"
set network-type broadcast
next
end
end
#ヘルプ
network-type Network type.
# set network-type
broadcast Broadcast.
non-broadcast Non-broadcast.
point-to-point Point-to-point.
point-to-multipoint Point-to-multipoint.
point-to-multipoint-non-broadcast Point-to-multipoint and non-broadcast.
Helloインターバル、Deadインターバルの値
Helloインターバル、Deadインターバルの値は config ospf-interface で実施。
#wan1 のHelloインターバルを 10、Deadインターバルを 40 に設定する場合
config router ospf
config ospf-interface
edit "wan1"
set dead-interval 40
set hello-interval 10
next
end
end
#ヘルプ
dead-interval Dead interval.
dead-interval Enter an integer value from <0> to <65535>.
hello-interval Hello interval.
hello-interval Enter an integer value from <0> to <65535>.
※Dead インターバルは Hello インターバルの 4 倍にする
※Dead インターバルと Hello インターバルはネイバーと一致させる
経路集約の設定
設定対象ルータタイプ | ABR | ASBR |
設定箇所 | config area > edit > config range | config summary-address |
集約対象ルート | エリア間のルート | OSPF 外のルート |
対象 LSA | LSAタイプ 3 | LSAタイプ 5 |
ABR での経路集約
ABR での経路集約は config area の中の config range で設定。
#エリア 0.0.0.2 の経路を 10.100.0.0 255.255.240.0 に集約する場合
config router ospf
config area
edit 0.0.0.2
config range
edit 1
set prefix 10.100.0.0 255.255.240.0
next
end
next
end
end
ASBR での経路集約
ASBR での経路集約は config summary-address で設定。
#外部の経路を 10.100.0.0 255.255.240.0 に集約する場合
config router ospf
config summary-address
edit 1
set prefix 10.100.0.0 255.255.240.0
next
end
end
デフォルトルート配布の設定
デフォルトルート配布の設定はグローバルで実施。
#デフォルトルート配布の有効化、メトリック 10、メトリックタイプ 2 と設定する場合
config router ospf
set default-information-originate enable
set default-information-metric 10
set default-information-metric-type 2
end
#ヘルプ
default-information-originate Enable/disable generation of default route.
default-information-metric Default information metric.
default-information-metric-type Default information metric type.
# set default-information-originate
enable Enable setting.
always Always advertise the default router.
disable Disable setting.
default-information-originate always とするとルーティングテーブルにデフォルトルートが存在しなくても自身をデフォルトルートとして配布。
MD5 認証の設定
インターフェースでの認証
#wan1 について md5 認証を有効化、md5 キーを 1、パスワードを password と設定する場合
config router ospf
config ospf-interface
edit "wan1"
set authentication md5
set md5-key 1 password
next
end
end
#ヘルプ
authentication Authentication type.
md5-key MD5 key.
# set authentication
none None.
text Text.
md5 MD5.
エリアでの認証
config area > edit > set authentication md5 で md5 認証の有効化設定が可能だが、結局上の config ospf-interface の中でも md5 認証の有効化をしないとパスワードの設定ができなそう。このことから config ospf-interface の中で認証設定をすることが正解?
参考ページ
―――――――――――――