将两台设备设置为集群模式(在操作模式>下),集群id,节点,配置后制动重启
set chassis cluster cluster-id 1 node 0 reboot 主设备配置
set chassis cluster cluster-id 1 node 1 reboot 备设备配置
设置主机名 set groups node0 system host-name ET_TEST_A_SRX01
set groups node1 system host-name ET_TEST_A_SRX02
配置管理接口fxp0的ip set groups node0 interfaces fxp0 unit 0 family inet address 192.168.249.1/24
set groups node1 interfaces fxp0 unit 0 family inet address 192.168.249.2/24
set apply-groups "${node}":配置集群必须的,该命令确保跟节点相关的命令,如配置主机名,只在对应的节点上执行。
配置数据接口fab0、fab1划入物理接口 set interfaces fab0 fabric-options member-interfaces ge-0/0/2
set interfaces fab1 fabric-options member-interfaces ge-1/0/2
配置reth接口将物理接口划分到reth set chassis cluster reth-count 10
set interfaces ge-0/0/3 gigether-options redundant-parent reth0
set interfaces ge-0/0/4 gigether-options redundant-parent reth1
set interfaces ge-1/0/3 gigether-options redundant-parent reth0
set interfaces ge-1/0/4 gigether-options redundant-parent reth1
配置reth接口ip set interfaces reth0 unit 0 family inet address 192.168.10.1/24
set interfaces reth1 unit 0 family inet address 10.10.10.1/24
配置reth#到group set interfaces reth0 redundant-ether-options redundancy-group 1
set interfaces reth1 redundant-ether-options redundancy-group 1
配置node #优先级 set chassis cluster control-link-recovery #当其中一个心跳线坏了,备会disable,自动进行reboot
set chassis cluster heartbeat-interval 1000 检测心跳时间间隔1000ms
set chassis cluster heartbeat-threshold 3 检测心跳次数,3次后将不再检测
set chassis cluster redundancy-group 0 node 0 priority 200 为group配置优先级,值越大越优先 set chassis cluster redundancy-group 0 node 1 priority 100 默认初始group 0,代表contol plane set chassis cluster redundancy-group 1 node 0 priority 200 group 1 代表data plane
set chassis cluster redundancy-group 1 node 1 priority 100
set chassis cluster redundancy-group 1 preempt 设置抢占 配置group的监控端口 set chassis cluster redundancy-group 1 interface-monitor ge-0/0/3 weight 255
set chassis cluster redundancy-group 1 interface-monitor ge-1/0/3 weight 255
set chassis cluster redundancy-group 1 interface-monitor ge-0/0/4 weight 255
set chassis cluster redundancy-group 1 interface-monitor ge-1/0/4 weight 255
request chassis cluster failover redundancy-group 0 node 0