Juniper SRX240でHA構成
JuniperのSRX240でHAを組む機会がありましたが
ひどくはまったので、組むための概略をざっくりと記載します。
0.はじめに
#で始まる行はconfigureモード
>はマネジメントモード
このあたりの部分は省略します。
1.2台のSRX240のRootパスワードを設定する。
※パスワードをセットしないとコンフィグのcommitができません。
# set system root-authentication plain-text-password
2.2台のSRX240のvlan.0とuntrust zoneのインタフェースを全部けす。そして設定をcommit
※SRX240は最初からTrustはvlanが組まれているのでそれを全部削除します。
# delete interfaces vlan
# delete interfaces interface-range interfaces-trust
※うまくいかない場合は interfaceごとに消す。
# delete security zones security-zone trust interfaces
# delete security zones security-zone untrust interfaces
# commit
3.HAで利用する固有ポートを削除しておく。
# delete interfaces ge-0/0/0 (fxp0:マネージメントポートで利用)
# delete interfaces ge-0/0/1 (fxp1:コントロールに利用)
4.fabで利用するポートのUnitを削除しておく。
# delete interfaces ge-0/0/2 unit 0
※ge-0/0/2以降を利用。ここではge-0/0/2を利用する。
5.ここまでの設定を確定し、マネージメントモードに降りる。
# commit
# exit
6.マネージメントモードでクラスタ設定を有効にする。
> set chassis cluster cluster-id node reboot
※クラスタIDは0は無効化なので1以上を設定、2台とも同じ数字にする。
※nodeは2台で別の数字を入れる。
※ここからはnode0(Primary側)で作業する。
7.とりあえずマシン名を設定する。
# set group node0 system host-name
# set group node1 system host-name
8.マネジメントポート(fxp0)のIPを設定する
# set group node0 interfaces fxp0 unit 0 family inet address
# set group node1 interfaces fxp0 unit 0 family inet address
# set apply-group ”${NODE}”
※個人的に、ここはクラスタ運用するポートのネットワークとは別にしておくことを推奨します。IPによってはこちらがネットワークのルーティングポートになってしまい、VPNなどで不具合を起こすことがあるため。
※最後の行は表示の関係上全角にしていますが、入力時は他の行同様にすべて半角です。
9.fabリンクの作成
# set interfaces fab0 fabric-options member-interfaces ge-0/0/2
# set interfaces fab1 fabric-options member-interfaces ge-5/0/2
※SRX240の場合、node1のポートはge-5/0/xとなる。
10.クラスタのグルーピングを作る
# set chassis cluster redundancy-group 0 node 0 priority 100
# set chassis cluster redundancy-group 0 node 1 priority 1
# set chassis cluster redundancy-group 1 node 0 priority 100
# set chassis cluster redundancy-group 1 node 1 priority 1
※group0は設定用。group1はポートに利用。
11.実際使うポートのクラスタ設定をする。
※実際使う分だけ設定をする。今回の例では3つ(ge-0/0/4~ge-0/0/6)
(1)設定するポートのUnitを削除(node0の分のみでよい)
# delete interfaces ge-0/0/4 unit 0
# delete interfaces ge-0/0/5 unit 0
# delete interfaces ge-0/0/6 unit 0
(2)ポートのモニタリング設定をする。
# set chassis cluster redundancy-group 1 interface-monitor ge-0/0/4 weight 255
# set chassis cluster redundancy-group 1 interface-monitor ge-5/0/4 weight 255
# set chassis cluster redundancy-group 1 interface-monitor ge-0/0/5 weight 255
# set chassis cluster redundancy-group 1 interface-monitor ge-5/0/5 weight 255
# set chassis cluster redundancy-group 1 interface-monitor ge-0/0/6 weight 255
# set chassis cluster redundancy-group 1 interface-monitor ge-5/0/6 weight 255
(3)クラスタの数の設定
# set chassis cluster reth-count 3
※作るクラスタ用ポートの数を入れる
(4)クラスタポートの設定
# set interfaces ge-0/0/4 gigether-options redundant-parent reth0
# set interfaces ge-5/0/4 gigether-options redundant-parent reth0
※node0,node1でペアにするポートを設定し、仮想ifを設定。
# set interfaces reth0 redundant-ether-options redundancy-group 1
※redundancy-groupを設定する。この際0は利用してはいけない。
# set interfaces reth0.0 family inet address
※作ったポートにIPを設定
# set security zones security-zone {zone} interfaces reth0.0
※zoneの設定。({zone} を設定したいzoneに置き換える)
# set interfaces ge-0/0/5 gigether-options redundant-parent reth1
# set interfaces ge-5/0/5 gigether-options redundant-parent reth1
# set interfaces reth1 redundant-ether-options redundancy-group 1
# set interfaces reth1.0 family inet address
# set security zones security-zone {zone} interfaces reth1.0
# set interfaces ge-0/0/6 gigether-options redundant-parent reth2
# set interfaces ge-5/0/6 gigether-options redundant-parent reth2
# set interfaces reth2 redundant-ether-options redundancy-group 1
# set interfaces reth2.0 family inet address
# set security zones security-zone {zone} interfaces reth2.0
12.設定の有効化
# commit
後は、普通どおりにZoneやVPNなどが設定できます。