4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SRXでchassis clusterを構築

Last updated at Posted at 2019-07-04

SRXでHA構成とするためにchassis clusterを構築する時に、躓いたのでメモ。

機器情報
HW:SRX100H、SW:junos 12.3X48-D80.4-domestic

chassis clusterとは

SRXでHA構成を実現する際には、chassis clusterという冗長化方式を利用する。
(セッション同期, RTO同期が可能)
chassis clusterは、JSRP(JUNOS Services Redundancy Protocol)というプロトコルを使用することで冗長化を行って、2台のSRXで単一のコンフィグレーションを保持し仮想的に1台に見せることができる。
なお、chassis clusterを利用するには2台のSRXで機種モデル・OS・ライセンスを同じにする必要がある。

chassis clusterの構築においては2台のSRX間のコントロールリンク、ファブリックリンク(データリンク)を接続する。

コントロールリンク
ルーティングエンジン間のクラスタ状態、コンフィグ情報を伝達するためのリンク
ファブリックリンク(データリンク)
パケットフォワーディングエンジン間の実際のデータ、RTOメッセージ(セッション情報)の伝送リンク

chassis clusterの構築においてはfxp0 / fxp1 / fab の3つのI/Fを使用する。

  I/F          用途
fxp0 SRXシリーズのchassis clusterにて使用する管理用I/F
管理用I/Fとして使用することができる物理ポート番号は仕様により決まっている(1※)
fxp1 SRXシリーズのchassis clusterにて使用するコントロールリンク用I/F
コントロールリンク用I/Fとして使用することができる物理ポート番号は仕様により決まっている(1※)
fab SRXシリーズのchassis clusterにて使用するファブリックリンク(データリンク)用I/F
最大2ポートで構成することができ、ファブリックリンク用I/Fとして使用することができる物理ポートは任意で決められる

chassis clusterの構築手順

①SRXを起動し、コントロールリンクを接続

②Primary機、Secondary機で以下コマンドを実施
 *<num>*にはHAを組む機器で同じ任意の値を(ネットワーク内で一意)

Primary機
set chassis cluster cluster-id <num> node 0 reboot

root>set chassis cluster cluster-id 1 node 0 reboot

Secondary機
set chassis cluster cluster-id <num> node 1 reboot

root>set chassis cluster cluster-id 1 node 1 reboot

③機器が起動したら、以下の状態になることを確認

Primary機

{primary:node0} 
root>

Secondary機

{hold:node1}
root>

④ファブリックリンクを接続

⑤管理用I/F、コントロールリンク等の設定をPrimary機に投入

エラー

上記手順にて作業実施したが項番③にて想定とは異なる結果となった。

Primary機

{hold:node0}
root>

Secondary機

{hold:node1}
root>

機器の状態を確認しようにも、結果が出力されない。
(configは出力される)

root> show version
warning: Clustering enabled; using private edit
error: shared configuration database modified

解決方法

結論から言うと、IFにデフォルトで設定されている"family ethernet-switching"が原因であった。

set interfaces fe-0/0/0 unit 0
set interfaces fe-0/0/1 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/2 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/3 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/4 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/5 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/6 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces fe-0/0/7 unit 0 family ethernet-switching vlan members vlan-trust
set interfaces vlan unit 0 family inet address 192.168.1.1/24

ということで設定変更するためにrootパスワードを設定し、各機器で該当の設定を削除する。

{hold:node0}
root@% cli

{hold:node0}
root> configure 
warning: Clustering enabled; using private edit
warning: uncommitted changes will be discarded on exit
Entering configuration mode

{hold:node0}[edit]
root# 

{hold:node0}[edit]
root# set system root-authentication plain-text-password
New password:
Retype new password:

{hold:node0}[edit]
root# load set terminal 
[Type ^D at a new line to end input]

delete interfaces fe-0/0/1 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/2 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/3 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/4 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/5 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/6 unit 0 family ethernet-switching vlan members vlan-trust
delete interfaces fe-0/0/7 unit 0 family ethernet-switching vlan members vlan-trust

^D
load complete

hold:node0}[edit]
root# commit and-quit 
node0: 
commit complete
Exiting configuration mode

{hold:node0}
root> 

Primary機、Secondary機を再び再起動する

root> request system reboot 
Reboot the system ? [yes,no] (no) yes 

Shutdown NOW!

無事冗長構成が組めました。
(※primary、secondaryとなるまで起動後少し時間が掛かる)

Primary機

{primary:node0}
root> 

Secondary機

{hold:node1}
root> 

おまけ

先輩曰くOSバージョンが古いものであれば、
今回の設定削除しなくてもHA構成組めるとか・・・。
その辺資料は見つけられなかったので参考になれば。

  1. ※参考:SRX - HA by Chassis Cluster - interface 2

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?