主动/被动机箱群集部署
了解主动/被动机箱群集部署
在这种情况下,集群中的单个设备用于路由所有流量,而其他设备仅在出现故障时使用(请参阅 图 1)。发生故障时,备份设备将成为主设备,并控制所有转发。

通过使用分配给同一冗余组的冗余以太网接口(reths),即可实现主动/被动 机箱群集 。如果节点中活动组中的任何接口发生故障,则表示组处于非活动状态,并且组中的所有接口都无法连接到另一个节点。
此配置最大程度地减少了通过结构链路的流量,因为群集中只有一个节点在任何给定时间转发流量。
另请参阅
示例:在 SRX5800 设备上配置主动/被动机箱群集
此示例说明如何在 SRX5800 设备上设置基本主动/被动机箱群集。
要求
开始之前:
-
您需要两个硬件配置相同的 SRX5800 服务网关,或者一台 MX240 边缘路由器和一台 EX8208 以太网交换机来发送端到端数据流量。
-
物理连接两台设备(从后至后的交换矩阵和控制端口),并确保它们是相同的型号。
-
在群集形成之前,您必须为每个设备配置控制端口,并为每个设备分配一个群集 ID 和节点 ID,然后重新启动。当系统启动时,两个节点都以群集的身份出现。
SRX5400、SRX5600 和 SRX5800 设备需要控制端口配置。
现在,这些设备是一对。从此时开始,群集配置在节点成员之间同步,两个独立的设备作为一个设备工作。
概述
此示例说明如何在 SRX 系列设备上设置基本的主动/被动机箱群集。基本主动/被动示例是最常见的机箱群集类型。
基本主动/被动机箱群集由两台设备构成:
-
一台设备主动提供路由、防火墙、NAT、VPN 和安全服务,同时保持对机箱群集的控制。
-
如果活动设备处于非活动状态,另一台设备将被动维护其群集故障切换功能状态。
SRX5800 服务网关的此主动/被动模式示例不会详细描述其他配置,例如如何配置 NAT、安全策略或 VPN。它们与独立配置基本相同。但是,如果您在机箱群集配置中执行代理 ARP,则必须将代理 ARP 配置应用到 reth 接口,而不是成员接口,因为 RETH 接口具有逻辑配置。请参阅 为 NAT 配置代理 ARP(CLI 过程)。您也可使用 SRX5800 服务网关中的 VLAN 和中继接口配置单独的逻辑接口配置。这些配置类似于使用 VLAN 和中继接口的独立实施。
图 2 显示了此示例中使用的拓扑。

配置
配置控制端口并启用群集模式
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,将命令复制并粘贴到层级的 CLI 中 [edit]
,然后从配置模式进入 commit
。
在 {primary:Node0} 上
[edit] set groups re0 system host-name hostA set groups re0 system backup-router 10.204.191.254 set groups re0 system backup-router destination 10.0.0.0/8 set groups re0 system backup-router destination 172.16.0.0/16 set groups re0 system backup-router destination 192.168.0.0/16 set groups re0 interfaces fxp0 unit 0 family inet address 10.204.149.140/18 set apply-groups re0 set groups re0 system host-name hostB set groups re0 system backup-router 10.204.191.254 set groups re0 system backup-router destination 10.0.0.0/8 set groups re0 system backup-router destination 172.16.0.0/16 set groups re0 system backup-router destination 192.168.0.0/16 set groups re0 interfaces fxp0 unit 0 family inet address 10.204.149.142/18 set apply-groups re0 set groups node0 system host-name hostA set groups node0 system backup-router 10.204.191.254 set groups node0 system backup-router destination 10.0.0.0/8 set groups node0 system backup-router destination 172.16.0.0/16 set groups node0 system backup-router destination 192.168.0.0/16 set groups node0 interfaces fxp0 unit 0 family inet address 10.204.149.140/18 set groups node1 system host-name hostB set groups node1 system backup-router 10.204.191.254 set groups node1 system backup-router destination 10.0.0.0/8 set groups node1 system backup-router destination 172.16.0.0/16 set groups node1 system backup-router destination 192.168.0.0/16 set groups node1 interfaces fxp0 unit 0 family inet address 10.204.149.142/18 set chassis cluster control-ports fpc 1 port 0 set chassis cluster control-ports fpc 13 port 0 set chassis cluster cluster-id 1 node 0 reboot set chassis cluster cluster-id 1 node 1 reboot delete apply-groups re0 set apply-groups “${node}” set chassis cluster reth-count 2 set chassis cluster redundancy-group 0 node 0 priority 254 set chassis cluster redundancy-group 0 node 1 priority 1 set chassis cluster redundancy-group 1 node 0 priority 254 set chassis cluster redundancy-group 1 node 1 priority 1 set interfaces fab0 fabric-options member-interfaces ge-3/2/8 set interfaces fab1 fabric-options member-interfaces ge-15/2/8
(可选)要快速配置 EX8208 核心交换机,请复制以下命令,将其粘贴到文本文件中,删除任何换行符,更改与网络配置匹配所需的任何详细信息,将命令复制粘贴到层次结构级别的 CLI 中 [edit]
,然后从配置模式进入 commit
。
在 {primary:Node0} 上
[edit] set interfaces xe-1/0/0 unit 0 family ethernet-switching port-mode access vlan members SRX5800 set interfaces xe-2/0/0 unit 0 family ethernet-switching port-mode access vlan members SRX5800 set interfaces vlan unit 50 family inet address 10.2.2.254/24 set vlans SRX5800 vlan-id 50 set vlans SRX5800 l3-interface vlan.50 set routing-options static route 0.0.0.0/0 next-hop 10.2.2.1/24
(可选)要快速配置 MX240 边缘路由器,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,将命令复制粘贴到层级的 CLI 中 [edit]
,然后从配置模式进入 commit
。
在 {primary:Node0} 上
[edit] set interfaces xe-1/0/0 encapsulation ethernet-bridge unit 0 family ethernet-switching set interfaces xe-2/0/0 encapsulation ethernet-bridge unit 0 family ethernet-switching set interfaces irb unit 0 family inet address 10.1.1.254/24 set routing-options static route 10.0.0.0/8 next-hop 10.1.1.1 set routing-options static route 0.0.0.0/0 next-hop (upstream router) set vlans SRX5800 vlan-id X (could be set to “none”) set vlans SRX5800 domain-type bridge routing-interface irb.0 set vlans SRX5800 domain-type bridge interface xe-1/0/0 set vlans SRX5800 domain-type bridge interface xe-2/0/0
逐步过程
以下示例要求您在配置层次结构中导航各个级别。
要在 SRX 系列设备上配置机箱群集:
在群集模式下,当您执行 commit
命令时,配置将通过节点之间的控制链路同步。无论从哪个设备配置了命令,所有命令都将应用于这两个节点。
-
使用备份路由器目标配置配置配置两个独立设备,以便在设备处于群集模式下后,在备份节点上提供管理访问。通过主节点上的路由启用对主节点的访问。
user@hostA# set groups re0 system host-name hostA user@hostA# set groups re0 system backup-router 10.204.191.254 user@hostA# set groups re0 system backup-router destination 10.0.0.0/8 user@hostA# set groups re0 system backup-router destination 172.16.0.0/16 user@hostA# set groups re0 system backup-router destination 192.168.0.0/16 user@hostA# set groups re0 interfaces fxp0 unit 0 family inet address 10.204.149.140/18 user@hostA# set apply-groups re0
user@hostB# set groups re0 system host-name hostB user@hostB# set groups re0 system backup-router 10.204.191.254 user@hostB# set groups re0 system backup-router destination 10.0.0.0/8 user@hostB# set groups re0 system backup-router destination 172.16.0.0/16 user@hostB# set groups re0 system backup-router destination 192.168.0.0/16 user@hostB# set groups re0 interfaces fxp0 unit 0 family inet address 10.204.149.142/18 user@hostB# set apply-groups re0
-
由于 SRX5000 系列服务网关机箱群集配置包含在单个通用配置中,因此要仅将配置的某些元素分配给特定成员,您必须使用称为组的 Junos OS 节点特定配置方法。命令
set apply-groups ${node}
使用节点变量来定义如何将组应用到节点;每个节点均可识别其编号并相应地接受配置。您还必须在 SRX5000 系列服务网关的 fxp0 接口上配置带外管理,为集群的各个控制平面使用单独的 IP 地址。不允许将备份路由器目标地址配置为 x.x.x.0/0。
user@hostA# set groups node0 system host-name hostA user@hostA# set groups node0 system backup-router 10.204.191.254 user@hostA# set groups node0 system backup-router destination 10.0.0.0/8 user@hostA# set groups node0 system backup-router destination 172.16.0.0/16 user@hostA# set groups node0 system backup-router destination 192.168.0.0/16 user@hostA# set groups node0 interfaces fxp0 unit 0 family inet address 10.204.149.140/18
user@hostB# set groups node1 system host-name hostB user@hostB# set groups node1 system backup-router 10.204.191.254 user@hostB# set groups node1 system backup-router destination 10.0.0.0/8 user@hostB# set groups node1 system backup-router destination 172.16.0.0/16 user@hostB# set groups node1 system backup-router destination 192.168.0.0/16 user@hostB# set groups node1 interfaces fxp0 unit 0 family inet address 10.204.149.142/18
上述组节点0 和节点 1 配置已提交,但未应用。设备在集群中运行后,这些命令将使用
set apply-groups “${node}”
。 -
配置每个设备的控制端口,然后提交配置。
确保根据配置在两个节点上的 SPC 卡之间建立物理控制链路连接。
控制端口基于机箱中的 SPC 位置派生,而偏移值则基于平台。在下面的示例中,SPC 存在于收入插槽 1 中,由于 SRX5800 抵消了 12,因此控制端口为 1、13。您可以使用
“jwhoami -c”
shell 模式中的命令查看特定平台的偏移值。您必须在两台设备上输入以下命令。例如:-
在节点 0 上:
user@hostA# set chassis cluster control-ports fpc 1 port 0 user@hostA# set chassis cluster control-ports fpc 13 port 0 user@hostA# commit
-
在节点 1 上:
user@hostB# set chassis cluster control-ports fpc 1 port 0 user@hostB# set chassis cluster control-ports fpc 13 port 0 user@hostB# commit
-
-
将两台设备设置为群集模式。设置集群 ID 和节点 ID 后,需要重新启动才能进入群集模式。您可以将参数包括
reboot
在 CLI 命令行中,从而导致系统自动启动。您必须在两台设备上输入操作模式命令。例如:-
在节点 0 上:
user@hostA> set chassis cluster cluster-id 1 node 0 reboot
-
在节点 1 上:
user@hostB> set chassis cluster cluster-id 1 node 1 reboot
集群中两台设备的群集 ID 必须相同,但是节点 ID 必须不同,因为一台设备为节点 0,另一台设备为节点 1。群集 ID 的范围为 1 到 255。将群集 ID 设置为 0 等同于禁用群集。但是建议使用
set chassis cluster disable
它来打破群集的节点。 -
-
使用以下命令配置节点 0(主节点 0)。节点 1 在提交节点配置之前是无法到达的。节点 0 将通过控制端口自动同步配置到节点 1,并且无需显式配置节点 1。
user@hostA# delete apply-groups re0 user@hostA# set apply-groups “${node}”
-
为机箱集群配置冗余组。每个节点在冗余组中都有接口,其中接口在活动冗余组中处于活动状态(多个活动接口可存在于一个冗余组中)。冗余组 0 控制控制平面,冗余组 1+ 控制数据平面,并包括数据平面端口。对于此主动/被动模式示例,每次只有一个机箱群集成员处于活动状态,因此您只需定义冗余组 0 和 1。除了冗余组,您还必须定义:
-
冗余以太网组 — 配置设备上有多少冗余以太网接口(成员链路)处于活动状态,以便系统可以为其分配相应的资源。
-
控制平面和数据平面的优先级 — 定义控制平面的优先级(机箱群集,优先级高,优先级高),以及哪个设备优先用于数据平面。
-
在主动/被动或主动/主动模式下,控制平面(冗余组 0)可以在不同于数据平面(冗余组 1+ 和组)机箱的机箱上处于活动状态。但是,对于此示例,我们建议在同一个机箱成员中同时保持控制平面和数据平面活动。当信息流通过结构链路进入另一个成员节点时,将引入延迟(z 线路模式信息流)。
-
在 SRX 系列设备(SRX5000 系列)上,活动/主动机箱群集配置(即存在多个 RG1+ 冗余组时)不支持 IPsec VPN。
-
user@hostA# set chassis cluster reth-count 2 user@hostA# set chassis cluster redundancy-group 1 node 0 priority 254 user@hostA# set chassis cluster redundancy-group 1 node 1 priority 1 user@hostA# set chassis cluster redundancy-group 0 node 0 priority 254 user@hostA# set chassis cluster redundancy-group 0 node 1 priority 1
-
-
配置集群的结构(数据)端口,用于在主动/被动模式下通过 RTO。例如,使用一个营收端口。定义两个结构接口(每个机箱上一个)以将它们连接在一起。
配置平台上的数据接口,以便在发生数据平面故障转移时,其他机箱群集成员可以无缝接管连接。如果出现数据平面故障转移,将无缝过渡到新的活动节点。如果控制平面故障转移,所有守护程序都会在新节点上重新启动,从而能够平稳重新启动,以避免失去与对等方(ospf、bgp)的邻接关系。这可促进无缝过渡到新节点,而不会造成任何数据包丢失。
您必须定义以下项:
-
定义成员接口到 reth 接口的成员信息。
-
定义 reth 接口是其中的哪个冗余组。对于此主动/被动示例,始终为 1。
-
定义 reth 接口信息,例如接口的 IP 地址。
{primary:node0}[edit]
user@hostA# set interfaces fab0 fabric-options member-interfaces ge-3/2/8 user@hostA# set interfaces fab1 fabric-options member-interfaces ge-15/2/8 -
-
(可选)在发生故障时配置机箱群集行为。对于 SRX5800 服务网关,故障转移阈值设置为 255。您可以更改重量以确定对机箱故障转移的影响。您还必须配置控制链路恢复。如果控制链路出现故障,恢复会自动导致辅助节点重新启动,然后返回联机。在节点 0 上输入这些命令。
{primary:node0}[edit]
user@hostA# set chassis cluster redundancy-group 1 interface-monitor xe-6/0/0 weight 255 user@hostA# set chassis cluster redundancy-group 1 interface-monitor xe-6/1/0 weight 255 user@hostA# set chassis cluster redundancy-group 1 interface-monitor xe-18/0/0 weight 255 user@hostA# set chassis cluster redundancy-group 1 interface-monitor xe-18/1/0 weight 255 user@hostA# set chassis cluster control-link-recovery此步骤将完成 SRX5800 服务网关主动/被动模式示例中的机箱群集配置部分。本过程的其余部分介绍如何配置区域、虚拟路由器、路由、EX8208 核心交换机和 MX240 边缘路由器以完成部署场景。
-
(可选)配置 reth 接口并将其连接到相应的区域和虚拟路由器。例如,将 reth0 和 reth1 接口保留在默认虚拟路由器 inet.0 中,不需要任何其他配置。
{primary:node0}[edit]
user@hostA# set security zones security-zone untrust interfaces reth0.0 user@hostA# set security zones security-zone trust interfaces reth1.0 -
(可选)对于这个主动/被动模式示例,由于网络架构简单,使用静态路由来定义如何路由到其他网络设备。
{primary:node0}[edit]
user@hostA# set routing-options static route 0.0.0.0/0 next-hop 10.1.1.254 user@hostA# set routing-options static route 10.0.0.0/8 next-hop 10.2.2.254 -
(可选)对于 EX8208 以太网交换机,以下命令仅提供与 SRX5800 服务网关的此主动/被动模式示例有关的适用配置概述;最明显的是 VLAN、路由和接口配置。
{primary:node0}[edit]
user@hostA# set interfaces xe-1/0/0 unit 0 family ethernet-switching port-mode access vlan members SRX5800 user@hostA# set interfaces xe-2/0/0 unit 0 family ethernet-switching port-mode access vlan members SRX5800 user@hostA# set interfaces vlan unit 50 family inet address 10.2.2.254/24 user@hostA# set vlans SRX5800 vlan-id 50 user@hostA# set vlans SRX5800 l3-interface vlan.50 user@hostA# set routing-options static route 0.0.0.0/0 next-hop 10.2.2.1/24 -
(可选)对于 MX240 边缘路由器,以下命令仅提供与 SRX5800 服务网关的此主动/被动模式示例有关的适用配置概述;最值得注意的是,您必须在交换机上的虚拟交换机实例中使用 IRB 接口。
{primary:node0}[edit]
user@hostA# set interfaces xe-1/0/0 encapsulation ethernet-bridge unit 0 family ethernet-switching user@hostA# set interfaces xe-2/0/0 encapsulation ethernet-bridge unit 0 family ethernet-switching user@hostA# set interfaces irb unit 0 family inet address 10.1.1.254/24 user@hostA# set routing-options static route 10.0.0.0/8 next-hop 10.1.1.1 user@hostA# set routing-options static route 0.0.0.0/0 next-hop (upstream router) user@hostA# set vlans SRX5800 vlan-id X (could be set to “none”) user@hostA# set vlans SRX5800 domain-type bridge routing-interface irb.0 user@hostA# set vlans SRX5800 domain-type bridge interface xe-1/0/0 user@hostA# set vlans SRX5800 domain-type bridge interface xe-2/0/0
验证
确认配置工作正常。
验证机箱群集状态
目的
验证机箱群集状态、故障切换状态和冗余组信息。
行动
在操作模式下,输入 show chassis cluster status
命令。
{primary:node0} show chassis cluster status Monitor Failure codes: CS Cold Sync monitoring FL Fabric Connection monitoring GR GRES monitoring HW Hardware monitoring IF Interface monitoring IP IP monitoring LB Loopback monitoring MB Mbuf monitoring NH Nexthop monitoring NP NPC monitoring SP SPU monitoring SM Schedule monitoring CF Config Sync monitoring RE Relinquish monitoring Cluster ID: 1 Node Priority Status Preempt Manual Monitor-failures Redundancy group: 0 , Failover count: 1 node0 254 primary no no None node1 1 secondary no no None Redundancy group: 1 , Failover count: 1 node0 254 primary no no None node1 1 secondary no no None
验证机箱群集接口
目的
验证有关机箱群集接口的信息。
行动
在操作模式下,输入 show chassis cluster interfaces
命令。
{primary:node0} user@host> show chassis cluster interfaces Control link status: Up Control interfaces: Index Interface Monitored-Status Internal-SA 0 em0 Up Disabled 1 em1 Down Disabled Fabric link status: Up Fabric interfaces: Name Child-interface Status (Physical/Monitored) fab0 ge-3/2/8 Up / Up fab0 fab1 ge-15/2/8 Up / Up fab1 Redundant-ethernet Information: Name Status Redundancy-group reth0 Down Not configured reth1 Down Not configured Redundant-pseudo-interface Information: Name Status Redundancy-group lo0 Up 0
验证机箱群集统计信息
目的
验证有关机箱群集服务和控制链路统计信息(发送和接收的心跳)、结构链路统计信息(发送和接收的探查)以及为服务发送和接收的 RTO 数量的信息。
行动
在操作模式下,输入 show chassis cluster statistics
命令。
{primary:node0} user@host> show chassis cluster statistics Control link statistics: Control link 0: Heartbeat packets sent: 16275 Heartbeat packets received: 16072 Heartbeat packet errors: 0 Control link 1: Heartbeat packets sent: 0 Heartbeat packets received: 0 Heartbeat packet errors: 0 Fabric link statistics: Child link 0 Probes sent: 30690 Probes received: 9390 Child link 1 Probes sent: 0 Probes received: 0 Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 0 0 DS-LITE create 0 0 Session create 0 0 IPv6 session create 0 0 Session close 0 0 IPv6 session close 0 0 Session change 0 0 IPv6 session change 0 0 ALG Support Library 0 0 Gate create 0 0 Session ageout refresh requests 0 0 IPv6 session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPv6 session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 JSF PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0 GPRS SCTP 0 0 GPRS FRAMEWORK 0 0 JSF RTSP ALG 0 0 JSF SUNRPC MAP 0 0 JSF MSRPC MAP 0 0 DS-LITE delete 0 0 JSF SLB 0 0 APPID 0 0 JSF MGCP MAP 0 0 JSF H323 ALG 0 0 JSF RAS ALG 0 0 JSF SCCP MAP 0 0 JSF SIP MAP 0 0 PST_NAT_CREATE 0 0 PST_NAT_CLOSE 0 0 PST_NAT_UPDATE 0 0 JSF TCP STACK 0 0 JSF IKE ALG 0 0
验证机箱群集控制平面统计信息
目的
验证有关机箱群集控制平面统计信息(发送和接收的心跳)和结构链路统计信息(发送和接收的探查)的信息。
行动
在操作模式下,输入 show chassis cluster control-plane statistics
命令。
{primary:node0} user@host> show chassis cluster control-plane statistics Control link statistics: Control link 0: Heartbeat packets sent: 16315 Heartbeat packets received: 16113 Heartbeat packet errors: 0 Control link 1: Heartbeat packets sent: 0 Heartbeat packets received: 0 Heartbeat packet errors: 0 Fabric link statistics: Child link 0 Probes sent: 30772 Probes received: 9472 Child link 1 Probes sent: 0 Probes received: 0
验证机箱群集数据平面统计信息
目的
验证有关为服务发送和接收的 RTO 数量的信息。
行动
在操作模式下,输入 show chassis cluster data-plane statistics
命令。
{primary:node0} user@host> show chassis cluster data-plane statistics Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 0 0 DS-LITE create 0 0 Session create 0 0 IPv6 session create 0 0 Session close 0 0 IPv6 session close 0 0 Session change 0 0 IPv6 session change 0 0 ALG Support Library 0 0 Gate create 0 0 Session ageout refresh requests 0 0 IPv6 session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPv6 session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 JSF PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0 GPRS SCTP 0 0 GPRS FRAMEWORK 0 0 JSF RTSP ALG 0 0 JSF SUNRPC MAP 0 0 JSF MSRPC MAP 0 0 DS-LITE delete 0 0 JSF SLB 0 0 APPID 0 0 JSF MGCP MAP 0 0 JSF H323 ALG 0 0 JSF RAS ALG 0 0 JSF SCCP MAP 0 0 JSF SIP MAP 0 0 PST_NAT_CREATE 0 0 PST_NAT_CLOSE 0 0 PST_NAT_UPDATE 0 0 JSF TCP STACK 0 0 JSF IKE ALG 0 0
验证机箱群集冗余组状态
目的
验证群集中两个节点的状态和优先级,以及有关主节点是否已被抢占或是否存在手动故障转移的信息。
行动
在操作模式下,输入 chassis cluster status redundancy-group
命令。
{primary:node0} user@host> show chassis cluster status redundancy-group 1 Monitor Failure codes: CS Cold Sync monitoring FL Fabric Connection monitoring GR GRES monitoring HW Hardware monitoring IF Interface monitoring IP IP monitoring LB Loopback monitoring MB Mbuf monitoring NH Nexthop monitoring NP NPC monitoring SP SPU monitoring SM Schedule monitoring CF Config Sync monitoring RE Relinquish monitoring Cluster ID: 1 Node Priority Status Preempt Manual Monitor-failures Redundancy group: 1 , Failover count: 1 node0 254 primary no no None node1 1 secondary no no None
示例:配置主动/被动机箱群集对 (SRX1500)
此示例说明如何为 SRX1500 设备配置主动/被动机箱群集。
要求
开始之前:
将一对设备物理连接在一起,确保它们是相同的型号。
通过将一台设备上的千兆以太网接口连接到另一台设备上的另一个千兆位以太网接口,创建结构链路。
通过连接两台 SRX1500 设备的控制端口来创建控制链路。
使用控制台端口连接到其中一台设备。(这是形成群集的节点。)并设置群集 ID 和节点编号
user@host> set chassis cluster cluster-id 1 node 0 reboot
使用控制台端口连接到其他设备,然后设置群集 ID 和节点编号。
user@host> set chassis cluster cluster-id 1 node 1 reboot
概述
在此示例中,集群中的单个设备用于路由所有流量,而另一台设备仅在发生故障时使用。(请参阅 图 3。)发生故障时,备份设备将成为主设备,并控制所有转发。

您可通过配置所有分配给相同冗余组的冗余以太网接口(reths)来创建主动/被动机箱群集。此配置最大程度地减少了通过结构链路的流量,因为群集中只有一个节点在任何给定时间转发流量。
在此示例中,您将配置组(使用 命令应用配置 apply-groups
)和机箱群集信息。然后配置安全区域和安全策略。请参阅 表 1 到 表 4。
特征 |
名字 |
配置参数 |
---|---|---|
组 |
节点0 |
|
|
节点 1 |
|
特征 |
名字 |
配置参数 |
---|---|---|
交换矩阵链路 |
fab0 |
接口:ge-0/0/1 |
|
fab1 |
接口:ge-7/0/1 |
心跳间隔 |
– |
1000 |
心跳阈值 |
– |
3 |
冗余组 |
0 |
|
|
1 |
|
|
|
接口监控
|
冗余以太网接口数 |
– |
2 |
接口 |
ge-0/0/4 |
冗余家长:reth0 |
ge-7/0/4 |
冗余家长:reth0 |
|
ge-0/0/5 |
冗余家长:reth1 |
|
ge-7/0/5 |
冗余家长:reth1 |
|
reth0 |
冗余组:1 |
|
|
||
reth1 |
冗余组:1 |
|
|
名字 |
配置参数 |
---|---|
信任 |
reth1.0 接口绑定到此区域。 |
不信任 |
reth0.0 接口绑定到此区域。 |
目的 |
名字 |
配置参数 |
---|---|---|
此安全策略允许从信任区域到不信任区域的流量。 |
任何 |
|
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,将命令复制并粘贴到层级的 CLI 中 [edit]
,然后从配置模式进入 commit
。
[edit] set groups node0 system host-name srx1500-A set groups node0 interfaces fxp0 unit 0 family inet address 192.0.2.110/24 set groups node1 system host-name srx1500-B set groups node1 interfaces fxp0 unit 0 family inet address 192.0.2.111/24 set apply-groups “${node}” set interfaces fab0 fabric-options member-interfaces ge-0/0/1 set interfaces fab1 fabric-options member-interfaces ge-7/0/1 set chassis cluster heartbeat-interval 1000 set chassis cluster heartbeat-threshold 3 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 set chassis cluster redundancy-group 1 interface-monitor ge-0/0/4 weight 255 set chassis cluster redundancy-group 1 interface-monitor ge-7/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-7/0/5 weight 255 set chassis cluster reth-count 2 set interfaces ge-0/0/5 gigether-options redundant-parent reth1 set interfaces ge-7/0/5 gigether-options redundant-parent reth1 set interfaces ge-0/0/4 gigether-options redundant-parent reth0 set interfaces ge-7/0/4 gigether-options redundant-parent reth0 set interfaces reth0 redundant-ether-options redundancy-group 1 set interfaces reth0 unit 0 family inet address 198.51.100.1/24 set interfaces reth1 redundant-ether-options redundancy-group 1 set interfaces reth1 unit 0 family inet address 203.0.113.233/24 set security zones security-zone untrust interfaces reth1.0 set security zones security-zone trust interfaces reth0.0 set security policies from-zone trust to-zone untrust policy ANY match source-address any set security policies from-zone trust to-zone untrust policy ANY match destination-address any set security policies from-zone trust to-zone untrust policy ANY match application any set security policies from-zone trust to-zone untrust policy ANY then permit
逐步过程
要配置主动/被动机箱群集:
配置管理接口。
{primary:node0}[edit] user@host# set groups node0 system host-name srx1500-A user@host# set groups node0 interfaces fxp0 unit 0 family inet address 192.0.2.110/24 user@host# set groups node1 system host-name srx1500-B user@host# set groups node1 interfaces fxp0 unit 0 family inet address 192.0.2.111/24 user@host# set apply-groups “${node}”
配置结构接口。
{primary:node0}[edit] user@host# set interfaces fab0 fabric-options member-interfaces ge-0/0/1 user@host# set interfaces fab1 fabric-options member-interfaces ge-7/0/1
配置心跳设置。
{primary:node0}[edit] user@host# set chassis cluster heartbeat-interval 1000 user@host# set chassis cluster heartbeat-threshold 3
配置冗余组。
{primary:node0}[edit] user@host# set chassis cluster redundancy-group 0 node 0 priority 100 user@host# set chassis cluster redundancy-group 0 node 1 priority 1 user@host# set chassis cluster redundancy-group 1 node 0 priority 100 user@host# set chassis cluster redundancy-group 1 node 1 priority 1 user@host# set chassis cluster redundancy-group 1 interface-monitor ge-0/0/4 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor ge-7/0/4 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor ge-0/0/5 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor ge-7/0/5 weight 255
配置冗余以太网接口。
{primary:node0}[edit] user@host# set chassis cluster reth-count 2 user@host# set interfaces ge-0/0/5 gigether-options redundant-parent reth1 user@host# set interfaces ge-7/0/5 gigether-options redundant-parent reth1 user@host# set interfaces ge-0/0/4 gigether-options redundant-parent reth0 user@host# set interfaces ge-7/0/4 gigether-options redundant-parent reth0 user@host# set interfaces reth0 redundant-ether-options redundancy-group 1 user@host# set interfaces reth0 unit 0 family inet address 198.51.100.1/24 user@host# set interfaces reth1 redundant-ether-options redundancy-group 1 user@host# set interfaces reth1 unit 0 family inet address 203.0.113.233/24
配置安全区域。
{primary:node0}[edit] user@host# set security zones security-zone untrust interfaces reth1.0 user@host# set security zones security-zone trust interfaces reth0.0
配置安全策略。
{primary:node0}[edit] user@host# set security policies from-zone trust to-zone untrust policy ANY match source-address any user@host# set security policies from-zone trust to-zone untrust policy ANY match destination-address any user@host# set security policies from-zone trust to-zone untrust policy ANY match application any user@host# set security policies from-zone trust to-zone untrust policy ANY then permit
结果
在配置模式下,输入 show configuration
命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以将其更正。
简洁性,此 show
命令输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
user@host> show configuration version x.xx.x; groups { node0 { system { host-name srx1500-A; } interfaces { fxp0 { unit 0 { family inet { address 192.0.2.110/24; } } } } } node1 { system { host-name srx1500-B; interfaces { fxp0 { unit 0 { family inet { address 192.0.2.110/24; } } } } } } apply-groups "${node}"; chassis { cluster { reth-count 2; heartbeat-interval 1000; heartbeat-threshold 3; redundancy-group 0 { node 0 priority 100; node 1 priority 1; } redundancy-group 1 { node 0 priority 100; node 1 priority 1; interface-monitor { ge–0/0/4 weight 255; ge–7/0/4 weight 255; ge–0/0/5 weight 255; ge–7/0/5 weight 255; } } } } interfaces { ge–0/0/4 { gigether–options { redundant–parent reth0; } } ge–7/0/4{ gigether–options { redundant–parent reth0; } } ge–0/0/5 { gigether–options { redundant–parent reth1; } } ge–7/0/5 { gigether–options { redundant–parent reth1; } } fab0 { fabric–options { member–interfaces { ge–0/0/1; } } } fab1 { fabric–options { member–interfaces { ge–7/0/1; } } } reth0 { redundant–ether–options { redundancy–group 1; } unit 0 { family inet { address 198.51.100.1/24; } } } reth1 { redundant–ether–options { redundancy–group 1; } unit 0 { family inet { address 203.0.113.233/24; } } } } ... security { zones { security–zone untrust { interfaces { reth1.0; } } security–zone trust { interfaces { reth0.0; } } } policies { from-zone trust to-zone untrust { policy ANY { match { source-address any; destination-address any; application any; } then { permit; } } } } }
如果完成设备配置,请在配置模式下输入 commit
。
验证
确认配置工作正常。
验证机箱群集状态
目的
验证机箱群集状态、故障切换状态和冗余组信息。
行动
在操作模式下,输入 show chassis cluster status
命令。
{primary:node0} user@host> show chassis cluster status Cluster ID: 1 Node Priority Status Preempt Manual failover Redundancy group: 0 , Failover count: 1 node0 100 primary no no node1 1 secondary no no Redundancy group: 1 , Failover count: 1 node0 100 primary no no node1 1 secondary no no
验证机箱群集接口
目的
验证有关机箱群集接口的信息。
行动
在操作模式下,输入 show chassis cluster interfaces
命令。
{primary:node0} user@host> show chassis cluster interfaces Control link status: Up Control interfaces: Index Interface Monitored-Status Security 0 em0 Up Disabled 1 em1 Down Disabled Fabric link status: Up Fabric interfaces: Name Child-interface Status Security fab0 ge-0/0/1 Up Disabled fab0 fab1 ge-7/0/1 Up Disabled fab1 Redundant-ethernet Information: Name Status Redundancy-group reth0 Up 1 reth1 Up 1 Redundant-pseudo-interface Information: Name Status Redundancy-group lo0 Up 1 Interface Monitoring: Interface Weight Status Redundancy-group ge-0/0/4 255 Up 1 ge-7/0/4 255 Up 1 ge-0/0/5 255 Up 1 ge-7/0/5 255 Up 1
验证机箱群集统计信息
目的
验证有关要同步的不同对象的统计信息、结构和控制接口 hello 以及集群中受监控接口的状态的信息。
行动
在操作模式下,输入 show chassis cluster statistics
命令。
{primary:node0} user@host> show chassis cluster statistics Control link statistics: Control link 0: Heartbeat packets sent: 2276 Heartbeat packets received: 2280 Heartbeat packets errors: 0 Fabric link statistics: Child link 0 Probes sent: 2272 Probes received: 597 Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 6 0 Session create 161 0 Session close 148 0 Session change 0 0 Gate create 0 0 Session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0
验证机箱群集控制平面统计信息
目的
验证有关机箱群集控制平面统计信息(发送和接收的心跳)和结构链路统计信息(发送和接收的探查)的信息。
行动
在操作模式下,输入 show chassis cluster control-plane statistics
命令。
{primary:node0} user@host> show chassis cluster control-plane statistics Control link statistics: Control link 0: Heartbeat packets sent: 258689 Heartbeat packets received: 258684 Heartbeat packets errors: 0 Fabric link statistics: Child link 0 Probes sent: 258681 Probes received: 258681
验证机箱群集数据平面统计信息
目的
验证有关为服务发送和接收的 RTO 数量的信息。
行动
在操作模式下,输入 show chassis cluster data-plane statistics
命令。
{primary:node0} user@host> show chassis cluster data-plane statistics Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 6 0 Session create 161 0 Session close 148 0 Session change 0 0 Gate create 0 0 Session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0
验证机箱群集冗余组状态
目的
验证群集中两个节点的状态和优先级,以及有关主节点是否已被抢占或是否存在手动故障转移的信息。
行动
在操作模式下,输入 chassis cluster status redundancy-group
命令。
{primary:node0} user@host> show chassis cluster status redundancy-group 1 Cluster ID: 1 Node Priority Status Preempt Manual failover Redundancy-Group: 1, Failover count: 1 node0 100 primary no no node1 1 secondary no no
示例:配置主动/被动机箱群集对 (J-Web)
启用群集。请参阅示例中的步骤 1 :配置主动/被动机箱群集对 (CLI)。
配置管理接口。请参阅示例中的步骤 2 :配置主动/被动机箱群集对 (CLI)。
配置结构接口。请参阅示例中的步骤 3 :配置主动/被动机箱群集对 (CLI)。
配置冗余组。
选择
Configure>Chassis Cluster
。输入以下信息,然后单击
Apply
:冗余以太接口计数:
2
心跳间隔:
1000
心跳阈值:
3
节点:
0
组号:
0
优先 级:
100
输入以下信息,然后单击
Apply
:节点:
0
组号:
1
优先 级:
1
输入以下信息,然后单击
Apply
:节点:
1
组号:
0
优先 级:
100
配置冗余以太网接口。
选择
Configure>Chassis Cluster
。选择
ge-0/0/4
。在“冗余家长”框中输入
reth1
。单击
Apply
。选择
ge-7/0/4
。在“冗余家长”框中输入
reth1
。单击
Apply
。选择
ge-0/0/5
。在“冗余家长”框中输入
reth0
。单击
Apply
。选择
ge-7/0/5
。在“冗余家长”框中输入
reth0
。单击
Apply
。请参阅示例中的步骤 5:为最后四个配置设置 配置主动/被动机箱群集对 (CLI) 。
配置安全区域。请参阅示例中的步骤 6 :配置主动/被动机箱群集对 (CLI)。
配置安全策略。请参阅示例中的步骤 7 :配置主动/被动机箱群集对 (CLI)。
单击
OK
以检查您的配置并将其保存为候选配置,然后单击Commit Options
>Commit
。
另请参阅
了解使用 IPsec 隧道的主动/被动机箱群集部署
在这种情况下,集群中的单个设备在 IPsec 隧道中终止,用于处理所有流量,而另一台设备仅在发生故障时使用(请参阅 图 4)。发生故障时,备份设备将成为主设备,并控制所有转发。

通过使用分配给同一冗余组的冗余以太网接口(reths),即可实现主动/被动 机箱群集 。如果节点中活动组中的任何接口发生故障,则表示组处于非活动状态,并且组中的所有接口都无法连接到另一个节点。
此配置为站点到站点 IPsec 隧道提供了一种方法,以便在主动/被动群集中终止,其中冗余以太网接口用作隧道端点。如果出现故障,备份 SRX 系列设备中的冗余以太网接口将处于活动状态,从而迫使隧道更改端点以在新活动 SRX 系列设备中终止。由于隧道密钥和会话信息在机箱群集成员之间同步,因此故障转移不需要重新协商隧道并维护所有已建立的会话。
如果 RG0(路由引擎)发生故障,路由协议需要在新主节点上重新建立。如果配置了 VPN 监控或死对等检测,并且其计时器在新 RG0 主设备上的路由重新交互之前到期,则 VPN 隧道将被关闭并重新协商。
动态隧道无法跨不同 SPC 实现负载平衡。
另请参阅
示例:使用 IPsec 隧道配置主动/被动机箱群集对
此示例说明如何使用适用于 SRX 系列设备的 IPsec 隧道配置主动/被动机箱群集。
要求
开始之前:
获取两个硬件配置相同的 SRX5000 型号、一台 SRX1500 设备和四台 EX 系列以太网交换机。
物理连接两台设备(从后至后的交换矩阵和控制端口),并确保它们是相同的型号。您可以配置 SRX5000 系列上的结构和控制端口。
将两台设备设置为群集模式并重新启动设备。您必须在两台设备上输入以下操作模式命令,例如:
在节点 0 上:
user@host> set chassis cluster cluster-id 1 node 0 reboot
在节点 1 上:
user@host> set chassis cluster cluster-id 1 node 1 reboot
两台设备上的群集 ID 相同,但节点 ID 必须不同,因为一台设备为节点 0,另一台设备为节点 1。群集 ID 的范围为 1 到 255。将群集 ID 设置为 0 等同于禁用群集。
只有当交换矩阵和控制链路接口从后至后连接时,才能设置大于 15 的群集 ID。
获取两个硬件配置相同的 SRX5000 型号、一台 SRX1500 边缘路由器和四台 EX 系列以太网交换机。
物理连接两台设备(从后至后的交换矩阵和控制端口),并确保它们是相同的型号。您可以配置 SRX5000 系列上的结构和控制端口。
从此时开始,群集配置在节点成员之间同步,两个独立的设备作为一个设备工作。使用配置组输入成员特定配置(例如每个成员的管理端口的 IP 地址)。
概述
在此示例中,集群中的单个设备在 IPsec 隧道中终止,用于处理所有流量,另一台设备仅在发生故障时使用。(请参阅 图 5.)发生故障时,备份设备将成为主设备,并控制所有转发。

在此示例中,您将配置组(使用 命令应用配置 apply-groups
)和机箱群集信息。然后配置 IKE、IPsec、静态路由、安全区域和安全策略参数。请参阅 表 5 到 表 11。
特征 |
名字 |
配置参数 |
---|---|---|
组 |
节点0 |
|
|
节点 1 |
|
特征 |
名字 |
配置参数 |
---|---|---|
交换矩阵链路 |
fab0 |
接口:xe-5/3/0 |
|
fab1 |
接口:xe-17/3/0 |
冗余以太网接口数 |
– |
2 |
心跳间隔 |
– |
1000 |
心跳阈值 |
– |
3 |
冗余组 |
0 |
|
|
1 |
|
|
|
接口监控
|
接口 |
xe-5/1/0 |
冗余家长:reth1 |
|
xe-5/1/0 |
冗余家长:reth1 |
|
xe-5/0/0 |
冗余家长:reth0 |
|
xe-17/0/0 |
冗余家长:reth0 |
|
reth0 |
冗余组:1 |
|
|
|
|
reth1 |
冗余组:1 |
|
|
|
|
st0 |
|
|
|
|
特征 |
名字 |
配置参数 |
---|---|---|
建议 |
提议设定标准 |
- |
政策 |
预共享 |
|
网关 |
SRX1500-1 |
注意:
在 SRX 机箱群集中,IKE 外部接口配置仅支持 reth 和 lo0 接口。可以配置其他接口类型,但 IPsec VPN 可能不起作用。如果 lo0 逻辑接口用作 IKE 网关外部接口,则无法使用 RG0 配置。 |
特征 |
名字 |
配置参数 |
---|---|---|
建议 |
提议设定标准 |
– |
政策 |
性病 |
– |
VPN |
SRX1500-1 |
注意:
手动 VPN 名称和站点到站点网关名称不能相同。 |
名字 |
配置参数 |
---|---|
0.0.0.0/0 |
下一跳:10.2.1.1 |
10.3.0.0/16 |
下一跳:10.10.1.2 |
名字 |
配置参数 |
---|---|
信任 |
|
不信任 |
|
Vpn |
|
目的 |
名字 |
配置参数 |
---|---|---|
此安全策略允许从信任区域到不信任区域的流量。 |
任何 |
|
此安全策略允许从信任区域到 vpn 区域的流量。 |
vpn-any |
|
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除任何换行符,更改与网络配置匹配所需的任何详细信息,将命令复制并粘贴到层级的 CLI 中 [edit]
,然后从配置模式进入 commit
。
{primary:node0}[edit] set chassis cluster control-ports fpc 2 port 0 set chassis cluster control-ports fpc 14 port 0 set groups node0 system host-name SRX5800-1 set groups node0 interfaces fxp0 unit 0 family inet address 172.19.100.50/24 set groups node1 system host-name SRX5800-2 set groups node1 interfaces fxp0 unit 0 family inet address 172.19.100.51/24 set apply-groups “${node}” set interfaces fab0 fabric-options member-interfaces xe-5/3/0 set interfaces fab1 fabric-options member-interfaces xe-17/3/0 set chassis cluster reth-count 2 set chassis cluster heartbeat-interval 1000 set chassis cluster heartbeat-threshold 3 set chassis cluster node 0 set chassis cluster node 1 set chassis cluster redundancy-group 0 node 0 priority 254 set chassis cluster redundancy-group 0 node 1 priority 1 set chassis cluster redundancy-group 1 node 0 priority 254 set chassis cluster redundancy-group 1 node 1 priority 1 set chassis cluster redundancy-group 1 preempt set chassis cluster redundancy-group 1 interface-monitor xe-5/0/0 weight 255 set chassis cluster redundancy-group 1 interface-monitor xe-5/1/0 weight 255 set chassis cluster redundancy-group 1 interface-monitor xe-17/0/0 weight 255 set chassis cluster redundancy-group 1 interface-monitor xe-17/1/0 weight 255 set interfaces xe-5/1/0 gigether-options redundant-parent reth1 set interfaces xe-17/1/0 gigether-options redundant-parent reth1 set interfaces xe-5/0/0 gigether-options redundant-parent reth0 set interfaces xe-17/0/0 gigether-options redundant-parent reth0 set interfaces reth0 redundant-ether-options redundancy-group 1 set interfaces reth0 unit 0 family inet address 10.1.1.60/16 set interfaces reth1 redundant-ether-options redundancy-group 1 set interfaces reth1 unit 0 family inet address 10.2.1.60/16 set interfaces st0 unit 0 multipoint family inet address 10.10.1.1/30 set security ike policy preShared mode main set security ike policy preShared proposal-set standard set security ike policy preShared pre-shared-key ascii-text "$ABC123"## Encrypted password set security ike gateway SRX1500-1 ike-policy preShared set security ike gateway SRX1500-1 address 10.1.1.90 set security ike gateway SRX1500-1 external-interface reth0.0 set security ipsec policy std proposal-set standard set security ipsec vpn SRX1500-1 bind-interface st0.0 set security ipsec vpn SRX1500-1 vpn-monitor optimized set security ipsec vpn SRX1500-1 ike gateway SRX1500-1 set security ipsec vpn SRX1500-1 ike ipsec-policy std set security ipsec vpn SRX1500-1 establish-tunnels immediately set routing-options static route 0.0.0.0/0 next-hop 10.2.1.1 set routing-options static route 10.3.0.0/16 next-hop 10.10.1.2 set security zones security-zone untrust host-inbound-traffic system-services all set security zones security-zone untrust host-inbound-traffic protocols all set security zones security-zone untrust interfaces reth1.0 set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces reth0.0 set security zones security-zone vpn host-inbound-traffic system-services all 144 set security zones security-zone vpn host-inbound-traffic protocols all set security zones security-zone vpn interfaces st0.0 set security policies from-zone trust to-zone untrust policy ANY match source-address any set security policies from-zone trust to-zone untrust policy ANY match destination-address any set security policies from-zone trust to-zone untrust policy ANY match application any set security policies from-zone trust to-zone vpn policy vpn-any then permit
逐步过程
要使用 IPsec 隧道配置主动/被动机箱群集对:
配置控制端口。
{primary:node0}[edit] user@host# set chassis cluster control-ports fpc 2 port 0 user@host# set chassis cluster control-ports fpc 14 port 0
配置管理接口。
{primary:node0}[edit] user@host# set groups node0 system host-name SRX5800-1 user@host# set groups node0 interfaces fxp0 unit 0 family inet address 172.19.100.50/24 user@host#set groups node1 system host-name SRX5800-2 user@host# set groups node1 interfaces fxp0 unit 0 family inet address 172.19.100.51/24 user@host# set apply-groups “${node}”
配置结构接口。
{primary:node0}[edit] user@host# set interfaces fab0 fabric-options member-interfaces xe-5/3/0 user@host# set interfaces fab1 fabric-options member-interfaces xe-17/3/0
配置冗余组。
{primary:node0}[edit] user@host# set chassis cluster reth-count 2 user@host# set chassis cluster heartbeat-interval 1000 user@host# set chassis cluster heartbeat-threshold 3 user@host# set chassis cluster node 0 user@host# set chassis cluster node 1 user@host# set chassis cluster redundancy-group 0 node 0 priority 254 user@host# set chassis cluster redundancy-group 0 node 1 priority 1 user@host# set chassis cluster redundancy-group 1 node 0 priority 254 user@host# set chassis cluster redundancy-group 1 node 1 priority 1 user@host# set chassis cluster redundancy-group 1 preempt user@host# set chassis cluster redundancy-group 1 interface-monitor xe-5/0/0 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor xe-5/1/0 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor xe-17/0/0 weight 255 user@host# set chassis cluster redundancy-group 1 interface-monitor xe-17/1/0 weight 255
配置冗余以太网接口。
{primary:node0}[edit] user@host# set interfaces xe-5/1/0 gigether-options redundant-parent reth1 user@host# set interfaces xe-17/1/0 gigether-options redundant-parent reth1 user@host# set interfaces xe-5/0/0 gigether-options redundant-parent reth0 user@host# set interfaces xe-17/0/0 gigether-options redundant-parent reth0 user@host# set interfaces reth0 redundant-ether-options redundancy-group 1 user@host# set interfaces reth0 unit 0 family inet address 10.1.1.60/16 user@host# set interfaces reth1 redundant-ether-options redundancy-group 1 user@host# set interfaces reth1 unit 0 family inet address 10.2.1.60/16
配置 IPsec 参数。
{primary:node0}[edit] user@host# set interfaces st0 unit 0 multipoint family inet address 10.10.1.1/30 user@host# set security ike policy preShared mode main user@host# set security ike policy preShared proposal-set standard user@host# set security ike policy preShared pre-shared-key ascii-text "$ABC123"## Encrypted password user@host# set security ike gateway SRX1500-1 ike-policy preShared user@host# set security ike gateway SRX1500-1 address 10.1.1.90 user@host# set security ike gateway SRX1500-1 external-interface reth0.0 user@host# set security ipsec policy std proposal-set standard user@host# set security ipsec vpn SRX1500-1 bind-interface st0.0 user@host# set security ipsec vpn SRX1500-1 vpn-monitor optimized user@host# set security ipsec vpn SRX1500-1 ike gateway SRX1500-1 user@host# set security ipsec vpn SRX1500-1 ike ipsec-policy std user@host# set security ipsec vpn SRX1500-1 establish-tunnels immediately
配置静态路由。
{primary:node0}[edit] user@host# set routing-options static route 0.0.0.0/0 next-hop 10.2.1.1 user@host# set routing-options static route 10.3.0.0/16 next-hop 10.10.1.2
配置安全区域。
{primary:node0}[edit] user@host# set security zones security-zone untrust host-inbound-traffic system-services all user@host# set security zones security-zone untrust host-inbound-traffic protocols all user@host# set security zones security-zone untrust interfaces reth1.0 user@host# set security zones security-zone trust host-inbound-traffic system-services all user@host# set security zones security-zone trust host-inbound-traffic protocols all user@host# set security zones security-zone trust interfaces reth0.0 user@host# set security zones security-zone vpn host-inbound-traffic system-services all user@host# set security zones security-zone vpn host-inbound-traffic protocols all user@host# set security zones security-zone vpn interfaces st0.0
配置安全策略。
{primary:node0}[edit] user@host# set security policies from-zone trust to-zone untrust policy ANY match source-address any user@host# set security policies from-zone trust to-zone untrust policy ANY match destination-address any user@host# set security policies from-zone trust to-zone untrust policy ANY match application any user@host# set security policies from-zone trust to-zone vpn policy vpn-any then permit
结果
在操作模式下,输入 show configuration
命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以将其更正。
简洁性,此 show
命令输出仅包含与此示例相关的配置。系统上的任何其他配置都已替换为椭圆 (...)。
user@host> show configuration version x.xx.x; groups { node0 { system { host-name SRX58001; } interfaces { fxp0 { unit 0 { family inet { address 172.19.100.50/24; } } } } } node1 { system { host-name SRX58002; } interfaces { fxp0 { unit 0 { family inet { address 172.19.100.51/24; } } } } } } apply-groups "${node}"; system { root-authentication { encrypted-password "$ABC123"; } } chassis { cluster { reth-count 2; heartbeat-interval 1000; heartbeat-threshold 3; control-ports { fpc 2 port 0; fpc 14 port 0; } redundancy-group 0 { node 0 priority 254; node 1 priority 1; } redundancy-group 1 { node 0 priority 254; node 1 priority 1; preempt; interface-monitor { xe–6/0/0 weight 255; xe–6/1/0 weight 255; xe–18/0/0 weight 255; xe–18/1/0 weight 255; } } } } interfaces { xe–5/0/0 { gigether–options { redundant–parent reth0; } } xe–5/1/0 { gigether–options { redundant–parent reth1; } } xe–17/0/0 { gigether–options { redundant–parent reth0; } } xe–17/1/0 { gigether–options { redundant–parent reth1; } } fab0 { fabric–options { member–interfaces { xe–5/3/0; } } } fab1 { fabric–options { member–interfaces { xe–17/3/0; } } } reth0 { redundant–ether–options { redundancy–group 1; } unit 0 { family inet { address 10.1.1.60/16; } } } reth1 { redundant–ether–options { redundancy–group 1; } unit 0 { family inet { address 10.2.1.60/16; } } } st0 { unit 0 { multipoint; family inet { address 5.4.3.2/32; } } } } routing–options { static { route 0.0.0.0/0 { next–hop 10.2.1.1; } route 10.3.0.0/16 { next–hop 10.10.1.2; } } } security { zones { security–zone trust { host–inbound–traffic { system–services { all; } } interfaces { reth0.0; } } security–zone untrust host-inbound-traffic { system-services { all; } } protocols { all; } interfaces { reth1.0; } } security-zone vpn { host-inbound-traffic { system-services { all; } } protocols { all; } interfaces { st0.0; } } } policies { from–zone trust to–zone untrust { policy ANY { match { source–address any; destination–address any; application any; } then { permit; } } } from–zone trust to–zone vpn { policy vpn { match { source–address any; destination–address any; application any; } then { permit; } } } } }
如果完成设备配置,请在配置模式下输入 commit
。
验证
确认配置工作正常。
验证机箱群集状态
目的
验证机箱群集状态、故障切换状态和冗余组信息。
行动
在操作模式下,输入 show chassis cluster status
命令。
{primary:node0} show chassis cluster status Cluster ID: 1 Node Priority Status Preempt Manual failover Redundancy group: 0 , Failover count: 1 node0 1 primary no no node1 254 secondary no no Redundancy group: 1 , Failover count: 1 node0 1 primary yes no node1 254 secondary yes no
验证机箱群集接口
目的
验证机箱群集接口。
行动
在操作模式下,输入 show chassis cluster interfaces
命令。
{primary:node0} user@host> show chassis cluster interfaces Control link name: fxp1 Redundant-ethernet Information: Name Status Redundancy-group reth0 Up 1 reth1 Up 1 Interface Monitoring: Interface Weight Status Redundancy-group xe-5/0/0 255 Up 1 xe-5/1/0 255 Up 1 xe-17/0/0 255 Up 1 xe-17/1/0 255 Up 1
验证机箱群集统计信息
目的
验证有关机箱群集服务和控制链路统计信息(发送和接收的心跳)、结构链路统计信息(发送和接收的探查)以及为服务发送和接收的 RTO 数量的信息。
行动
在操作模式下,输入 show chassis cluster statistics
命令。
{primary:node0} user@host> show chassis cluster statistics Control link statistics: Control link 0: Heartbeat packets sent: 258689 Heartbeat packets received: 258684 Heartbeat packets errors: 0 Fabric link statistics: Child link 0 Probes sent: 258681 Probes received: 258681 Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 6 0 Session create 161 0 Session close 148 0 Session change 0 0 Gate create 0 0 Session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0
验证机箱群集控制平面统计信息
目的
验证有关机箱群集控制平面统计信息(发送和接收的心跳)和结构链路统计信息(发送和接收的探查)的信息。
行动
在操作模式下,输入 show chassis cluster control-panel statistics
命令。
{primary:node0} user@host> show chassis cluster control-plane statistics Control link statistics: Control link 0: Heartbeat packets sent: 258689 Heartbeat packets received: 258684 Heartbeat packets errors: 0 Fabric link statistics: Child link 0 Probes sent: 258681 Probes received: 258681
验证机箱群集数据平面统计信息
目的
验证有关为服务发送和接收的 RTO 数量的信息。
行动
在操作模式下,输入 show chassis cluster data-plane statistics
命令。
{primary:node0} user@host> show chassis cluster data-plane statistics Services Synchronized: Service name RTOs sent RTOs received Translation context 0 0 Incoming NAT 0 0 Resource manager 6 0 Session create 161 0 Session close 148 0 Session change 0 0 Gate create 0 0 Session ageout refresh requests 0 0 Session ageout refresh replies 0 0 IPSec VPN 0 0 Firewall user authentication 0 0 MGCP ALG 0 0 H323 ALG 0 0 SIP ALG 0 0 SCCP ALG 0 0 PPTP ALG 0 0 RPC ALG 0 0 RTSP ALG 0 0 RAS ALG 0 0 MAC address learning 0 0 GPRS GTP 0 0
验证机箱群集冗余组状态
目的
验证群集中两个节点的状态和优先级,以及有关主节点是否已被抢占或是否存在手动故障转移的信息。
行动
在操作模式下,输入 chassis cluster status redundancy-group
命令。
{primary:node0} user@host> show chassis cluster status redundancy-group 1 Cluster ID: 1 Node Priority Status Preempt Manual failover Redundancy-Group: 1, Failover count: 1 node0 0 primary yes no node1 254 secondary yes no
示例:使用 IPsec 隧道配置主动/被动机箱群集对 (J-Web)
启用群集。请参阅示例中的步骤 1 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置管理接口。请参阅示例中的步骤 2 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置结构接口。请参阅示例中的步骤 3 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置冗余组。
选择
Configure>System Properties>Chassis Cluster
。输入以下信息,然后单击
Apply
:冗余以太接口计数:
2
心跳间隔:
1000
心跳阈值:
3
节点:
0
组号:
0
优先 级:
254
输入以下信息,然后单击
Apply
:节点:
0
组号:
1
优先 级:
254
输入以下信息,然后单击
Apply
:节点:
1
组号:
0
优先 级:
1
输入以下信息,然后单击
Apply
:节点:
1
组号:
1
优先 级:
1
抢先:选择复选框。
接口监控 — 接口:
xe-5/0/0
接口监控器 — 重量:
255
接口监控 — 接口:
xe-5/1/0
接口监控器 — 重量:
255
接口监控 — 接口:
xe-17/0/0
接口监控器 — 重量:
255
接口监控 — 接口:
xe-17/1/0
接口监控器 — 重量:
255
配置冗余以太网接口。
选择
Configure>System Properties>Chassis Cluster
。选择
xe-5/1/0
。在“冗余家长”框中输入
reth1
。单击
Apply
。选择
xe-17/1/0
。在“冗余家长”框中输入
reth1
。单击
Apply
。选择
xe-5/0/0
。在“冗余家长”框中输入
reth0
。单击
Apply
。选择
xe-17/0/0
。在“冗余家长”框中输入
reth0
。单击
Apply
。请参阅示例中的步骤 5 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置 IPsec 配置。请参阅示例中的步骤 6 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置静态路由。
选择
Configure>Routing>Static Routing
。单击
Add
。输入以下信息,然后单击
Apply
:静态路由地址:
0.0.0.0/0
下一跳地址:
10.2.1.1
输入以下信息,然后单击
Apply
:静态路由地址:
10.3.0.0/16
下一跳地址:
10.10.1.2
配置安全区域。请参阅示例中的步骤 8 :使用 IPsec 隧道配置主动/被动机箱群集对。
配置安全策略。请参阅示例中的步骤 9 :使用 IPsec 隧道配置主动/被动机箱群集对。
单击
OK
以检查您的配置并将其保存为候选配置,然后单击Commit Options
>Commit
。