监控机箱群集中的节点
要监控群集,您需要发现冗余组。在机箱群集模式下初始化设备时,系统会创建一个冗余组,在本主题中称为冗余组 0。冗余组 0 管理群集每个节点上路由引擎之间的首要地位和故障切换。与所有冗余组一样,冗余组 0 一次只能在一个节点上为主。冗余组 0 为主节点确定群集中哪个路由引擎处于活动状态。如果节点的路由引擎是活动节点,则该节点被视为群集的主节点。您可以配置一个或多个编号为 1 到 128 的冗余组,在本节中称为冗余组 x。最大冗余组数等于您配置的冗余以太网接口数 +1。每个冗余组 x 充当故障转移的独立单元,一次仅在一个节点上为主冗余组。没有可用于检索此信息的 MIBS。
使用 Junos OS XML 管理协议或 NETCONF XML 管理协议
get-configuration
使用远程过程调用 (RPC) 获取设备上存在的冗余配置和冗余组。这将提供配置的冗余组。
用于配置检索的 XML RPC
<rpc> <get-configuration inherit="inherit" database="committed"> <configuration> <chassis> <cluster> </cluster> </chassis> </configuration> </get-configuration> </rpc>
响应:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/10.4I0/junos"> <configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm" junos:commit-seconds="1277806450" junos:commit-localtime="2010-06-29 03:14:10 PDT" junos:commit-user="regress"> <chassis> <cluster> <reth-count>10</reth-count> <control-ports> <fpc>4</fpc> <port>0</port> </control-ports> <control-ports> <fpc>10</fpc> <port>0</port> </control-ports> <redundancy-group> <name>0</name> <node> <name>0</name> <priority>254</priority> </node> <node> <name>1</name> <priority>1</priority> </node> </redundancy-group> <redundancy-group> <name>1</name> <node> <name>0</name> <priority>100</priority> </node> <node> <name>1</name> <priority>1</priority> </node> </redundancy-group> </cluster> </chassis> </configuration> </rpc-reply> ]]>]]>
机箱群集冗余以太网接口
冗余以太网接口是一种伪接口,至少包含一个来自群集每个节点的物理接口。冗余以太网接口在配置命令中称为 reth。以下示例输出显示存在并配置了两个冗余组。
使用 Junos OS XML 管理协议或 NETCONF XML 管理协议
get-chassis-cluster-interfaces
使用远程过程调用 (RPC) 获取接口详细信息。以下示例输出显示了配置的四个 reth 接口:机箱群集接口的 XML RPC
user@host>
show chassis cluster interfaces |display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/11.4R5/junos"> <chassis-cluster-interface-statistics> <control-interface-status>Up</control-interface-status> <control-link-interfaces> <control-information> <control-link-interface-index>0</control-link-interface-index> <control-link-interface-name>em0</control-link-interface-name> <control-link-interface-status>Up</control-link-interface-status> </control-information> <control-information> <control-link-interface-index>1</control-link-interface-index> <control-link-interface-name>em1</control-link-interface-name> <control-link-interface-status>Down</control-link-interface-status> </control-information> </control-link-interfaces> <dataplane-interface-status>Up</dataplane-interface-status> <dataplane-interfaces> <fabric-information> <fabric-interface-index>0</fabric-interface-index> <fabric-child-interface-name>ge-6/0/15</fabric-child-interface-name> <fabric-child-interface-status>Up</fabric-child-interface-status> <fabric-interface-index>0</fabric-interface-index> </fabric-information> <fabric-information> <fabric-interface-index>1</fabric-interface-index> <fabric-child-interface-name>ge-19/0/15</fabric-child-interface-name> <fabric-child-interface-status>Up</fabric-child-interface-status> <fabric-interface-index>1</fabric-interface-index> </fabric-information> </dataplane-interfaces> <reth> <reth-name>reth0</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth1</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>Not configured</redundancy-group-id-for-reth> <reth-name>reth2</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth3</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>Not configured</redundancy-group-id-for-reth> <reth-name>reth4</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth5</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth6</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth7</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth8</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth9</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth10</reth-name> <reth-status>Up</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth11</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth12</reth-name> <reth-status>Down</reth-status> <redundancy-group-id-for-reth>Not configured</redundancy-group-id-for-reth> <reth-name>reth13</reth-name> <reth-status>Up</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth14</reth-name> <reth-status>Up</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth15</reth-name> <reth-status>Up</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> <reth-name>reth16</reth-name> <reth-status>Up</reth-status> <redundancy-group-id-for-reth>1</redundancy-group-id-for-reth> </reth> <interface-monitoring> </interface-monitoring> </chassis-cluster-interface-statistics> <cli> <banner>{secondary:node0}</banner> </cli> </rpc-reply> user@host>show chassis cluster interfaces
Control link status: Up Control interfaces: Index Interface Status 0 em0 Up 1 em1 Down Fabric link status: Up Fabric interfaces: Name Child-interface Status fab0 ge-6/0/15 Up fab0 fab1 ge-19/0/15 Up fab1 Redundant-ethernet Information: Name Status Redundancy-group reth0 Down 1 reth1 Down Not configured reth2 Down 1 reth3 Down Not configured reth4 Down 1 reth5 Down 1 reth6 Down 1 reth7 Down 1 reth8 Down 1 reth9 Down 1 reth10 Up 1 reth11 Down 1 reth12 Down Not configured reth13 Up 1 reth14 Up 1 reth15 Up 1 reth16 Up 1 {secondary:node0}get-interface-information
使用远程过程调用 (RPC) 显示 reth 接口详细信息并标识设备上的 reth 接口。此 RPC 还显示哪些千兆以太网或快速以太网接口属于哪个 reth 接口,如以下示例输出所示:用于接口信息的 XML RPC
<rpc> <get-interface-information> <terse/> <interface-name>reth0</interface-name> </get-interface-information> </rpc><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/10.4I0/junos"> <interface-information xmlns="http://xml.juniper.net/junos/10.4I0/junos-interface" junos:style="terse"> <physical-interface> <name> reth0 </name> <admin-status> up </admin-status> <oper-status> up </oper-status> <logical-interface> <name> reth0.0 </name> <admin-status> up </admin-status> <oper-status> up </oper-status> <filter-information> </filter-information> <address-family> <address-family-name> inet </address-family-name> <interface-address> <ifa-local junos:emit="emit"> 192.168.29.2/24 </ifa-local> </interface-address> </address-family> <address-family> <address-family-name> multiservice </address-family-name> </address-family> </logical-interface> </physical-interface> </interface-information> Now, the interface that belongs to this. Extracting only the relevant information <rpc> <get-interface-information> <terse/> </get-interface-information> </rpc><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/10.4I0/junos"> <interface-information xmlns="http://xml.juniper.net/junos/10.4I0/junos-interface" junos:style="terse"> <physical-interface> <name> ge-5/1/1 </name> <admin-status> up </admin-status> <oper-status> up </oper-status> <logical-interface> <name> ge-5/1/1.0 </name> <admin-status> up </admin-status> <oper-status> up </oper-status> <filter-information> </filter-information> <address-family> <address-family-name> aenet </address-family-name> <ae-bundle-name> reth0.0 </ae-bundle-name> </address-family> </logical-interface> </physical-interface> </interface-information>
在示例输出中,
ae-bundle-name
标记标识它所属的 reth 接口。
使用 SNMP
ifTable MIB 表报告所有接口。
使用 ifStackStatus MIB 表将 reth 接口映射到主节点和辅助节点上的底层接口。reth 接口是高层接口,两个节点的单个接口显示为较低层索引。
Reth 接口详细信息的示例 SNMP 数据
在以下示例中,ge-5/1/1 和 ge-11/1/1 属于 reth0:
{primary:node0} user@host>
show interfaces terse | grep reth0
ge-5/1/1.0 up up aenet --> reth0.0 ge-11/1/1.0 up up aenet --> reth0.0 reth0 up up reth0.0 up up inet 192.168.29.2/24从 ifTable 中查找所有接口的索引。以下信息显示了此示例中所需的接口索引:
{primary:node0} user@host>
show snmp mib walk ifDescr | grep reth0
ifDescr.503 = reth0.0 ifDescr.528 = reth0现在,在 ifStackStatus 表中搜索 reth0 的索引。在下面的示例输出中,reth0 索引 503 是较高层索引,索引 522 和 552 是较低层索引。索引 522 和 552 分别表示接口 ge-5/1/1.0 和 ge-11/1/1.0。
{primary:node0} user@host>
show snmp mib walk ifStackStatus | grep 503
ifStackStatus.0.503 = 1 ifStackStatus.503.522 = 1 ifStackStatus.503.552 = 1 {primary:node0} user@host>show snmp mib walk ifDescr | grep 522
ifDescr.522 = ge-5/1/1.0 {primary:node0} user@host>show snmp mib walk ifDescr | grep 552
ifDescr.552 = ge-11/1/1.0
使用控制平面
控制平面软件在主动/备份模式下运行,是群集主节点上处于活动状态的 Junos OS 不可或缺的一部分。它通过将状态、配置和其他信息传送给辅助节点上的非活动路由引擎来实现冗余。如果主路由引擎发生故障,辅助路由引擎已准备好接管控制权。以下方法可用于发现控制端口信息。
使用 Junos OS XML 管理协议或 NETCONF XML 管理协议
get-configuration
使用远程过程调用 (RPC) 获取控制端口配置,如以下示例输出所示。
用于冗余组配置的 XML RPC
<rpc> <get-configuration inherit="inherit" database="committed"> <configuration> <chassis> <cluster> </cluster> </chassis> </configuration> </get-configuration> </rpc>
使用数据平面
数据平面软件在主动/主动模式下运行,管理流处理和会话状态冗余,并处理传输流量。属于特定会话的所有数据包都在同一节点上处理,以确保对其应用相同的安全处理。系统识别会话处于活动状态的节点,并将其数据包转发到该节点进行处理。数据链路称为结构接口。集群的数据包转发引擎使用它来传输传输流量并同步数据平面软件的动态运行时状态。当系统创建结构接口时,软件会为其分配一个内部派生的 IP 地址,用于数据包传输。交换矩阵是群集的两个节点之间的物理连接,通过背对背连接一对以太网接口(每个节点一个)而形成。以下方法可用于确定数据平面接口。
使用 Junos OS XML 管理协议或 NETCONF XML 管理协议
get-chassis-cluster-data-plane-interfaces
使用远程过程调用 (RPC) 获取数据平面接口,如以下示例输出所示。
群集数据平面接口的 XML RPC 详细信息
<rpc> <get-chassis-cluster-data-plane-interfaces> </get-chassis-cluster-data-plane-interfaces> </rpc><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/10.4I0/junos"> <chassis-cluster-dataplane-interfaces> <fabric-interface-index>0</fabric-interface-index> <fabric-information> <child-interface-name>xe-5/0/0</child-interface-name> <child-interface-status>up</child-interface-status> </fabric-information> <fabric-interface-index>1</fabric-interface-index> <fabric-information> <child-interface-name>xe-11/0/0</child-interface-name> <child-interface-status>up</child-interface-status> </fabric-information> </chassis-cluster-dataplane-interfaces>
使用 SNMP
ifTable MIB 表报告结构 (fab) 接口和链路接口。但是,无法使用 SNMP 确定底层接口和结构接口之间的关系。
置备机箱群集节点
使用 NETCONF XML 管理协议来配置和调配 SRX 系列设备和一般的 Junos OS 设备。我们建议使用组来配置 SRX 系列机箱群集。对节点之间通用的所有配置使用全局组。
Junos OS 提交脚本可用于根据需要自定义配置。
Junos OS 提交脚本包括:
在提交时运行
检查传入配置
执行的操作包括:
提交失败(自卫)
修改配置(自我更正)
提交脚本可以:
生成自定义错误/警告/系统日志消息
对配置进行更改或更正
提交脚本可让您更好地控制如何配置设备以强制执行:
您的设计规则
您的实施详细信息
100% 的设计标准