管理板冗余命令

命令 作用
auto-sync time-period 配置双管理板或者盒式VSU堆叠冗余时自动同步配置文件的时间间隔
redundancy 进入冗余配置模式
redundancy forceswitch 手工执行主从切换
redundancy reload 复位设备
show redundancy states 查看当前设备的冗余状态

 

 

1.1   auto-sync time-period

【命令功能】

auto-sync time-period命令用来配置双管理板或者盒式VSU堆叠冗余时自动同步配置文件的时间间隔。

no auto-sync time-period命令用来关闭双管理板或者盒式VSU堆叠自动同步。

default auto-sync time-period命令用来恢复双管理板或者盒式VSU堆叠自动同步时间间隔为默认值。

缺省情况下,自动同步功能处于开启状态。

【命令格式】

auto-sync time-period synchronization-interval-time

no auto-sync time-period

default auto-sync time-period

【参数说明】

synchronization-interval-time:自动同步的时间间隔,取值范围为1~2678400,单位为秒。缺省值为3600。

【命令模式】

冗余配置模式

【缺省级别】

14

【使用指导】

无

【配置举例】

# 配置自动同步周期为60秒。

Hostname> enable

Hostname# configure terminal

Hostname(config)# redundancy

Hostname(config-red)# auto-sync time-period 60

Redundancy auto-sync time-period: enabled (60 seconds).

Hostname(config-red)# exit

【提示信息】

无

【常见错误】

无

【平台说明】

无

【相关命令】

l  show redundancy states

1.2   redundancy

【命令功能】

redundancy命令用来进入冗余配置模式。

【命令格式】

redundancy

【参数说明】

无

【命令模式】

全局配置模式

【缺省级别】

14

【使用指导】

无

【配置举例】

# 配置进入冗余配置模式。

Hostname> enable

Hostname# config terminal

Hostname(config)# redundancy

【提示信息】

无

【常见错误】

无

【平台说明】

无

【相关命令】

无

1.3   redundancy forceswitch

【命令功能】

redundancy forceswitch命令用来手工执行主从切换。

【命令格式】

redundancy forceswitch

【参数说明】

无

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

在主设备执行本命令,主设备将被复位,从设备成为新的主设备。

该命令不建议在刷CLI命令的脚本中一起执行,即刷完CLI命令后,不立即退出到特权模式,如果立即退出,部分异步执行的配置命令可能无法同步到备机而导致主从切换后配置丢失。

执行热备切换需要同时具备以下条件:

l  在主设备上执行,且存在从设备。

l  系统中所有VSD下的热备都处于实时状态。

l  系统中所有VSD下的热备切换都未被业务实体临时禁止。

l  在系统存在多个VSD情况下,执行切换命令时,系统会先判断各个VSD下的热备是否可以进行主从切换,如果存在某个VSD不允许切换,则本命令执行失败;否则接下来将会对所有VSD下的热备进行强制的主从切换。

【配置举例】

# 配置设备进行主从切换。

Hostname> enable

Hostname# redundancy forceswitch

This operation will reload the master unit and force switchover to the slave unit. Are you sure to continue? [N/y] y

【提示信息】

# 如果切换时,从设备不存在,则提示从设备未就绪。

% Redundancy Switchover Request can only take effect while peer Supervisor is Ready.

# 如果切换时,某个VSD下主从间的热备批量未完成,则提示系统热备处于非实时状态,不能切换。

% Redundancy Switchover failed: Some VSD's redundancy state is temporarily non-realtime.

# 如果切换时,某个VSD下主从切换被禁止,则提示系统热备切换被禁止,不能切换。

% Redundancy Switchover failed: Some VSD's redundancy switchover is temporarily disabled by elements.

【常见错误】

无

【平台说明】

无

【相关命令】

无

1.4   redundancy reload

【命令功能】

redundancy reload命令用来复位设备。

【命令格式】

redundancy reload { peer | shelf [ switch-id ] }

【参数说明】

peer:仅复位从设备。

shelf:单机模式下对主从设备都进行复位。VSU模式下需指定待复位的设备号。

switch-id:VSU模式下的设备号,VSU模式下支持该参数。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

单机模式下复位设备的命令格式为redundancy reload shelf,即复位整个设备。

VSU模式下复位设备命令格式为redundancy reload shelf switchid,即复位指定设备号的设备。

l  如果复位的是主设备,且系统热备还未达到实时状态,则将导致整个VSU系统复位。

l  如果仅复位从设备不会影响数据转发,在从设备复位期间不会产生转发中断或用户会话信息的丢失。

【配置举例】

# 配置VSU模式下,复位编号为2的设备。

Hostname> enable

Hostname# redundancy reload shelf 2

This operation will reload the device 2. Are you sure to continue? [N/y] y

Preparing to reload device 2!

【提示信息】

# 如果仅存在单设备则复位从设备失败。

% Privileged command reload peer can only execute in Duplex Supervisor mode.

【常见错误】

无

【平台说明】

无

【相关命令】

无

1.5   show redundancy states

【命令功能】

show redundancy states命令用来查看当前设备的冗余状态。

【命令格式】

show redundancy states

【参数说明】

无

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

目前在VSU模式下仅支持1:1的热备关系(全局主设备和全局从设备进行热备),其余设备作为候选角色,不参与热备。

如果系统有配置其它VSD,则在全局主从设备VSD 0下会显示其它VSD的热备状态。

【配置举例】

# 查看当前主设备冗余状态。

Hostname> enable

Hostname# show redundancy states

Redundancy switching function: enabled

Redundancy role: master

Redundancy state: realtime

Auto-sync time-period: 3600 s

Redundancy management role: master

Redundancy control role: active

Redundancy control state: realtime

Auto-sync time-period: 3600 s

# 查看当前从设备冗余状态。

Hostname-STANDBY> enable

Hostname-STANDBY# show redundancy states

Redundancy role: slave

Redundancy state: realtime

Redundancy management role: slave

Redundancy control role: standby

Redundancy control state: realtime

Data backup state: NA

# 查看当前候选设备冗余状态。

Hostname-Candidate> enable

Hostname-Candidate# show redundancy states

Redundancy role: candidate

Redundancy state: none

Redundancy management role: candidate

Redundancy control role: standby

Redundancy control state: realtime

# 配置vsd1,vsd2情况下,查看当前主设备冗余状态。

Hostname> enable

Hostname# show redundancy states

Redundancy switching function: enabled

Redundancy role: master

Redundancy state: realtime

Auto-sync time-period: 3600 s

Redundancy management role: master

Redundancy control role: active

Redundancy control state: realtime

Auto-sync time-period: 3600 s

VSD vsd1 redundancy state: realtime

VSD vsd2 redundancy state: realtime

表1-1   show redundancy states命令输出信息描述表

字段 描述
Redundancy switching function 设备冗余强制切换功能,该字段取值为:

●    enabled:设备启动冗余强制切换功能

●    disabled:设备禁用冗余强制切换功能

Redundancy role 本设备的冗余角色,该字段取值为:

●    master:本设备是全局主

●    slave:本设备是全局从

●    candidate:本设备是全局候选

Redundancy state 本设备的冗余状态,该字段取值为:

●    alone:单独状态,系统中只有一个设备在运行,或者是主从切换还未完成,新的主设备和新的从设备之间还未建立冗余备份

●    batch:批量备份状态。主从设备之间建立冗余备份,正在进行批量备份

●    realtime:实时备份状态。主从设备批量备份结束后,进入此状态,主从之间进行实时备份,只有处于该状态才能够执行手工切换

Auto-sync time-period 仅在主设备上显示,配置文件自动同步时间间隔,如果显示为disabled,表示不自动定时同步
Redundancy management role 本设备的冗余管理面角色,该字段取值为:

●    master:本设备是全局主

●    slave:本设备是全局从

●    candidate:本设备是全局候选

Redundancy control role 本设备的冗余控制面角色,该字段取值为:

●    active:本设备是活动角色

●    standby:本设备是备用角色

Redundancy control state 本设备的冗余控制面状态,包含alone、batch和realtime,状态解释和Redundancy state相同
VSD <vsd name> redundancy state 仅在主从设备的VSD 0下显示对应VSD的冗余状态,包含alone、batch和realtime,状态解释和Redundancy state相同

 

【提示信息】

无

【常见错误】

无

【平台说明】

无

【相关命令】

无

上一篇 华为防火墙-CLI举例:虚拟系统双机热备(主备备份),防火墙上下行连接交换机
下一篇 [OpenClaw 文档]工具--技能