华为交换机维护堆叠

来自Linux78|wiki
Bob讨论 | 贡献2020年1月2日 (四) 12:31的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

监控堆叠状态

display stack,查看堆叠成员交换机的堆叠信息。
display stack peers,查看堆叠成员交换机的邻居信息。
display stack port [ brief | slot slot-id ],查看堆叠端口信息。
display stack configuration [ slot slot-id ],查看堆叠系统当前配置的堆叠命令信息。
display stack channel [ all | slot slot-id ],查看堆叠链路的连线及状态信息。

使能和去使能堆叠

对于S5700-EI和S5700-SI设备,可以在系统视图下执行命令stack enable和undo stack enable使能和去使能堆叠。使能和去使能堆叠都需要重启设备才生效。

对于除S5700-EI和S5700-SI之外支持堆叠的设备,堆叠功能默认使能,可以通过下面两种方法去使能堆叠。

方法一:在诊断视图下执行命令,stack enable和undo stack enable使能和去使能堆叠。使能和去使能堆叠都需要重启设备才生效。

[HUAWEI] diagnose
[HUAWEI-diagnose] stack enable  //使能堆叠
Warning: All the configurations related to the slot ID will be lost after the stack function is enabled. Continue?[Y/N]: y
Info: Stack configuration has been changed, need reboot to take effect.
<HUAWEI> system-view
[HUAWEI] diagnose
[HUAWEI-diagnose] undo stack enable  //去使能堆叠
Warning: All the configurations related to the slot ID will be lost after the stack function is disabled. Continue?[Y/N]: y
Info: Stack configuration has been changed, need reboot to take effect.

方法二:无法执行诊断命令时,可以通过删除堆叠口或拔掉堆叠线缆的方式取消堆叠。删除堆叠口的方法请参见删除堆叠口

删除堆叠口

操作步骤(V200R002之后的版本)

system-view,进入系统视图。
interface stack-port member-id/port-id,进入逻辑堆叠端口视图。
shutdown interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10>,将堆叠成员端口状态设置为Down。
undo port interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> enable,将成员端口从堆叠口中退出,恢复为业务口。
  1. 将堆叠成员口XGE0/0/1从堆叠口中删除。
<HUAWEI> system-view
[HUAWEI] interface stack-port 0/1  
[HUAWEI-stack-port0/1] shutdown interface xgigabitethernet0/0/1
[HUAWEI-stack-port0/1] undo port interface xgigabitethernet0/0/1 enable

操作步骤(V200R002及之前的版本)

system-view,进入系统视图。
interface stack-port member-id/port-id,进入逻辑堆叠端口视图。
undo port member-group interface interface-type interface-number,将堆叠成员端口从逻辑堆叠口中退出。
quit,退回到系统视图。
undo stack port interface { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> enable,将接口恢复为业务口。

将堆叠成员口XGE0/0/1从堆叠口中删除。

<HUAWEI> system-view
[HUAWEI] interface stack-port 0/1  
[HUAWEI-stack-port0/1] undo port member-group interface xgigabitethernet 0/0/1
[HUAWEI-stack-port0/1] quit  
[HUAWEI] undo stack port interface xgigabitethernet 0/0/1 enable

清除堆叠配置

方法一:

reset stack configuration 清除堆叠相关配置。包括:交换机槽位号、堆叠优先级、堆叠保留VLAN、系统MAC切换时间、堆叠口配置、堆叠口速率配置。例如:
<HUAWEI> system-view
[HUAWEI] reset stack configuration
Warning: This operation will clear all stack configurations and may lead to the loss of the slot ID configuration and cause the device to reset immediately. Are you 
sure you want to continue? [Y/N]:y 

执行该命令后会导致原有堆叠系统分裂,设备重启。

方法二:

不支持命令reset stack configuration,只能使用配置命令分别进行清除。清除配置需要重启设备才生效。

恢复堆叠优先级:

<HUAWEI> system-view
[HUAWEI] stack slot 2 priority 100  //将2槽位号的优先级恢复为缺省值100

恢复槽位号:

<HUAWEI> system-view
[HUAWEI] stack slot 2 renumber 0  //将设备槽位号修改为0

恢复堆叠保留VLAN:

<HUAWEI> system-view
[HUAWEI] stack reserved-vlan 4093  //将堆叠保留VLAN恢复到缺省值4093

恢复系统MAC切换时间:

<HUAWEI> system-view
[HUAWEI] undo stack timer mac-address switch-delay

重启堆叠成员交换机

reset slot slot-id复位堆叠系统中某一台成员设备,slot-id表示成员设备的堆叠ID。

堆叠主备倒换

原来的备交换机升为主交换机。

新主交换机重新指定备交换机。

原来的主交换机重启后重新加入堆叠系统,并被选举为从交换机。 操作步骤

(可选)执行命令display switchover state,查看堆叠系统是否满足主备倒换的条件。
system-view,进入系统视图。
slave switchover enable,使能堆叠主备倒换功能。

缺省情况下,主备倒换功能处于使能状态。

slave switchover,执行堆叠主备倒换。