FortiGate HA構成 - ぶやかー

FortiGateのHA構成

HAはActive-Passive,Active-Activeが可能。だけど、メーカーもAct-Actは推奨してない。それにFGへのIngressのトラフィックが分散されるわけではないのであんまり意味ない。
とりあえず、Active-Passive構成してみる。
ちなみに、Vdomごとのクラスタ構成も可能

FGのHA構成ではノードごとにホスト名変えられる。
同じホスト名でもPrimary/Scondaryや01/02などの識別子をつけておくと運用上わかりやすくなるので推奨。

HAグループ名はグループごとに設定する。グループ名が同じだと同じHAクラスタグループに参加することになる。

FortiGateのHA構成の優先度

デフォルトでは以下のようになる。
1. 生きてるモニタポート数が多い
2. Uptimeが長い(差が5分以内の場合は無視)
3. Priorityが高い
4. シリアル番号が大きい
注意: Uptime差分が5分以内だと自動フェイルバックみたいな振る舞いが発生する。

Priorityが高いほうを優先する場合’set override’をenableにする。
VRRPなどのPreemptっぽい動作になる。
1. 生きてるモニタポート数が多い
2. Priorityが高い
3. Uptimeが長い(差が5分以内の場合は無視)
4. シリアル番号が大きい

Primary

config system global
    set alias "FG60F-Primary"
    set hostname "FG60F-Primary"
end
config system ha
    set group-id 1
    set group-name "HA-Gr-1"
    set mode a-p
    set hbdev "wan1" 100 "wan2" 50
    set session-pickup enable
    set session-pickup-connectionless enable
    set override disable
    set priority 200
end

Secondary

config system global
    set alias "FG60F-Secondary"
    set hostname "FG60F-Secondary"
end
config system ha
    set group-id 1
    set group-name "HA-Gr-1"
    set mode a-p
    set hbdev "wan1" 100 "wan2" 50
    set session-pickup enable
    set session-pickup-connectionless enable
    set override disable
    set priority 100
end

セカンダリ側のコンソールで以下のようなメッセージが出る。
// 多分バージョンやモデル、環境によって出力は変わるので参考程度に
通常であればlogout all admin usersのメッセージ後5~10分ぐらいでHA sync状態になる。

secondary's external files are not in sync with the primary's, sequence:0. (type CERT_LOCAL)
secondary's external files are not in sync with the primary's, sequence:1. (type CERT_LOCAL)
secondary's external files are not in sync with the primary's, sequence:2. (type CERT_LOCAL)
secondary's external files are not in sync with the primary's, sequence:3. (type CERT_LOCAL)
secondary's external files are not in sync with the primary's, sequence:4. (type CERT_LOCAL)
secondary succeeded to sync external files with primary
secondary's configuration is not in sync with the primary's, sequence:0
secondary's configuration is not in sync with the primary's, sequence:1
secondary's configuration is not in sync with the primary's, sequence:2
secondary's configuration is not in sync with the primary's, sequence:3
secondary's configuration is not in sync with the primary's, sequence:4
secondary starts to sync with primary
logout all admin users

syncしない場合
1. マニュアルで頑張ってみる
デバッグしつつHA Syncプロセスを再起動

diag debug reset
diag debug enable
execute ha synchronize stop
diag debug console timestamp enable
diag debug application hasync -1
diag debug application hatalk -1
execute ha synchronize start

終了したらデバッグを止める

diag debug disable
diag debug reset

自動切り戻し

set override enable
vrrpのpreemptとほぼ同様。自動切り戻ししたい場合はPriorityの高いノードにset override enableを設定しておく。

補足

モデルによるけど、FGはサービストラフィック用に使わないほうがよいポートがある。
FG100FならMGMTとDMZ、FG60FならWAN1とWAN2。こういった場合はそのポートを管理用、HA用に割り当てるなどモデルごと考慮したほうがよい。

FTNT公式ドキュメントのHardware Accelerationを確認してポートアサインを決めたほうがよい。
https://docs.fortinet.com/document/fortigate/7.2.0/hardware-acceleration/448300/hardware-acceleration

トラブルシュート

syncしてないところを探す

diagnose sys ha checksum recalculate
diagnose sys ha checksum cluster

それでもだめなら・・・
1. Secondary用コンフィグ手動で作ってSecondaryノードをリストア
2. Secondaryノードを初期化してHA設定のみ投入

この記事を書いた人 Wrote this article

kmatsunuma@admin

TOP