、    

 

华为S系列网管交换机堆叠配置教程

配置堆叠口
配置堆叠口就是在使用业务口组建堆叠时将业务口配置为堆叠成员口。
例如:将业务口XGE0/0/1配置为堆叠成员口。

V200R002之后的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] port interface xgigabitethernet 0/0/1 enable //将接口XGE0/0/1接口加入堆叠口,使业务口变为堆叠成员口,一次可以加入多个
Warning: Enabling stack function may cause configuration loss on the interface. Continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait…….

V200R002及之前的版本
system-view
[HUAWEI] stack port interface xgigabitethernet 0/0/1 enable //配置接口XGE0/0/1为堆叠口
Warning: This operation will clear all configurations on these interfaces, continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment…
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] port member-group interface xgigabitethernet 0/0/1 //将接口XGE0/0/1加入堆叠口
注:
交换机一共支持两个堆叠口,分别是Stack-Portn/1和Stack-Portn/2,n表示交换机的堆叠ID。
业务口配置为堆叠成员口后,仅支持堆叠相关业务功能,其他业务功能不可用。接口下与堆叠不相关的命令会被屏蔽,仅保留description(接口视图)等接口基本命令。

修改堆叠口
将逻辑堆叠口stack-port0/1中的成员端口XGE0/0/1修改为XGE0/0/3。

V200R002之后的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] shutdown interface xgigabitethernet0/0/1 //为避免环路,先将成员口设置为down
[HUAWEI-stack-port0/1] undo port interface xgigabitethernet0/0/1 enable //将原来成员端口XGE0/0/1退出堆叠口,恢复为业务口
[HUAWEI-stack-port0/1] port interface xgigabitethernet0/0/3 enable //将接口XGE0/0/3设置为堆叠口

V200R002及之前的版本
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 //将接口恢复为业务口
[HUAWEI] stack port interface xgigabitethernet 0/0/3 enable //将接口XGE0/0/3使能为堆叠口
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] port member-group interface xgigabitethernet 0/0/3 //将接口加入堆叠口

删除堆叠口
删除堆叠口就是将业务口从堆叠口中退出,恢复为正常的业务口。
例如:将堆叠成员口XGE0/0/1从堆叠口中删除。

V200R002之后的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] shutdown interface xgigabitethernet0/0/1 //为避免环路,先将成员口设置为down
[HUAWEI-stack-port0/1] undo port interface xgigabitethernet0/0/1 enable //将成员端口XGE0/0/1退出堆叠口,恢复为业务口

V200R002及之前的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] undo port member-group interface xgigabitethernet 0/0/1 //将接口XGE0/0/1从堆叠口中退出
[HUAWEI-stack-port0/1] quit
[HUAWEI] undo stack port interface xgigabitethernet 0/0/1 enable //将接口XGE0/0/1恢复为业务口

查看堆叠配置
堆叠的配置不会记录在配置文件中,所以无法通过display current-configuration查看配置。 执行命令display stack可以查看堆叠系统的信息。
执行命令display stack configurationdisplay stack current-configuration可以查看堆叠的相关配置,以V200R012C00版本为例。

如果堆叠成员端口带有*号,表示当前配置不生效,不生效的可能原因为:
1、当前配置为没有生效的配置。
2、堆叠成员端口为子卡上的接口,当前子卡不在位。
3、如果堆叠成员端口带有#号,表示当前配置是专用堆叠线缆自动生成但未执行save stack configuration或save命令把配置写入Flash。

使能和去使能堆叠
对于S5700EI和S5700SI设备,可以在系统视图下执行命令stack enableundo stack enable使能和去使能堆叠。使能和去使能堆叠都需要重启设备才生效。
对于除S5700EI和S5700SI之外支持堆叠的设备,堆叠功能默认使能,无法通过命令去使能。
可以通过删除堆叠口或拔掉堆叠线缆的方式取消堆叠。删除堆叠口的方法如下:

清除堆叠配置
对于V200R011C10及之后版本的设备,执行命令reset stack configuration可以清除堆叠相关配置。包括:交换机槽位号、堆叠优先级、堆叠保留VLAN、系统MAC切换时间、堆叠口配置、堆叠口速率配置。

对于V200R011C10之前版本的设备及,需要根据配置分别删除,配置删除后需要重启设备才生效。
恢复堆叠优先级:
system-view
[HUAWEI] stack slot 2 priority 100 //将2槽位号的优先级恢复为缺省值100
恢复槽位号:
system-view
[HUAWEI] stack slot 2 renumber 0 //将设备槽位号修改为0
恢复堆叠保留VLAN:
system-view
[HUAWEI] stack reserved-vlan 4093 //将堆叠保留VLAN恢复到缺省值4093
恢复系统MAC切换时间:
system-view
[HUAWEI] undo stack timer mac-address switch-delay
删除堆叠口
V200R002之后的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] shutdown interface xgigabitethernet0/0/1 //为避免环路,先将成员口设置为down
[HUAWEI-stack-port0/1] undo port interface xgigabitethernet0/0/1 enable //将成员端口XGE0/0/1退出堆叠口,恢复为业务口

V200R002及之前的版本
system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] undo port member-group interface xgigabitethernet 0/0/1 //将接口XGE0/0/1从堆叠口中退出
[HUAWEI-stack-port0/1] quit
[HUAWEI] undo stack port interface xgigabitethernet 0/0/1 enable //将接口XGE0/0/1恢复为业务口

华为S系列网管交换机配置通过STelnet登录设备

以登录用户界面的验证方式为AAA授权验证,用户名为admin123,密码为Huawei@123为例,配置如下。

在服务器端生成本地密钥对。
system-view
[HUAWEI] dsa local-key-pair create
Info: The key name will be: HUAWEI_Host_DSA.
Info: The key modulus can be any one of the following : 1024, 2048.
Info: If the key modulus is greater than 512, it may take a few minutes.
Please input the modulus [default=2048]:
Info: Generating keys…
Info: Succeeded in creating the DSA host keys.

配置VTY用户界面。
[HUAWEI] user-interface vty 0 4
[HUAWEI-ui-vty0-4] authentication-mode aaa
[HUAWEI-ui-vty0-4] protocol inbound ssh
[HUAWEI-ui-vty0-4] quit
注:如果设备中已经配置了VTY 0~VTY 4界面支持的协议为Telnet方式,如果将其修改为SSH方式,退出当前登录界面后,不能再使用Telnet方式登录设备。此时建议用户先配置VTY 0~VTY 4界面支持的协议为all,即支持所有的协议。在成功配置STelnet后可以再执行protocol inbound ssh命令配置VTY 0~VTY 4界面支持的协议为SSH。

新建用户名为admin123的SSH用户,且认证方式为Password。
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user admin123 service-type ssh
[HUAWEI-aaa] local-user admin123 privilege level 15
[HUAWEI-aaa] quit
[HUAWEI] ssh user admin123 authentication-type password

设备开启STelnet服务功能。
[HUAWEI] stelnet server enable

配置SSH用户admin123的服务方式为STelnet。
[HUAWEI] ssh user admin123 service-type stelnet

通过第三方软件(例如PuTTY)登录设备,输入设备的IP地址,选择协议类型为SSH,输入用户名和密码STelnet登录设备。
配置STelnet是否成功的测试方法:配置完成后在系统视图下执行ssh client first-time enable和stelnet 127.0.0.1命令登录设备本身。如果出现登录界面,则代表配置成功,否则配置失败。

华为S系列网管交换机使用基本ACL规则限制用户登录

通过STelnet/Telnet登录设备后,用户可以配置ACL规则限制用户登录的源地址,只允许特定IP的用户或者网段登录设备。
注:本操作中假设用户已经使用STelnet/Telnet登录设备。

配置ACL 2005规则,限制VTY 0~VTY 4界面只允许IP地址为192.168.1.5的用户和10.10.5.0/24网段的用户登录设备,配置如下。
system-view
[HUAWEI] acl 2005
[HUAWEI-acl-basic-2005] rule permit source 192.168.1.5 0 //允许IP地址为192.168.1.5的用户登录设备。
[HUAWEI-acl-basic-2005] rule permit source 10.10.5.0 0.0.0.255 //允许10.10.5.0/24网段的用户登录设备。
[HUAWEI-acl-basic-2005] quit
[HUAWEI] user-interface vty 0 4
[HUAWEI-ui-vty0-4] acl 2005 inbound
[HUAWEI-ui-vty0-4] quit

华为S系列网管交换机配置用户级别

当用户的认证方式为密码认证(password)或不验证(none)时,可以采用以下方式配置用户级别(以VTY用户界面为例):
system-view
[HUAWEI] user-interface vty 0
[HUAWEI-ui-vty0] user privilege level 15 //配置VTY 0用户界面下用户级别为15

当用户的认证方式为AAA本地认证时,可以采用以下方式配置用户级别(以VTY用户界面为例),优先级由上到下依次降低:
配置某个用户的用户级别。
system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user user1 privilege level 15 //配置用户user1的用户级别为15

配置某个域下所有用户的用户级别。
system-view
[HUAWEI] aaa
[HUAWEI-aaa] service-scheme sch1
[HUAWEI-aaa-service-sch1] admin-user privilege level 15 //配置用户级别为15
[HUAWEI-aaa-service-sch1] quit
[HUAWEI-aaa] domain domain1
[HUAWEI-aaa-domain-domain1] service-scheme sch1 //在域domain1下绑定业务方案sch1

配置从某个用户界面登录的所有用户的用户级别。
system-view
[HUAWEI] user-interface maximum-vty 15 //配置VTY用户界面最大数目为15
[HUAWEI] user-interface vty 0 14 //进入0~14的VTY用户界面视图
[HUAWEI-ui-vty0-14] user privilege level 15 //配置VTY 0~VTY 14用户界面下用户级别为15

华为S系列网管交换机配置Telnet类型的本地用户

以登录用户界面的验证方式为AAA授权验证,用户名为admin123,密码为Huawei@123为例,配置如下。
本操作的前置条件是设备已经使能了Telnet服务器功能。
system-view
[HUAWEI] user-interface vty 0
[HUAWEI-ui-vty0] protocol inbound telnet //注:V200R006及之前版本缺省使用的协议为Telnet协议,可以不配置该项;V200R007及之后版本缺省使用的协议为SSH协议,必须配置。
[HUAWEI-ui-vty0] authentication-mode aaa
[HUAWEI-ui-vty0] quit
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user admin123 service-type telnet
[HUAWEI-aaa] local-user admin123 privilege level 15
[HUAWEI-aaa] return
save

华为S系列网管交换机清空配置文件命令

如果需要清除配置,恢复成出厂配置,请执行命令reset saved-configuration,清除设备下次启动时使用的配置文件信息,然后重启设备,重启时如果提示保存配置,请选择“N”不保存。

<HUAWEI> reset saved-configuration
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y
Warning: Now clearing the configuration in the device.
Info: Succeeded in clearing the configuration in the device.
<HUAWEI> reboot
Info: The system is now comparing the configuration, please wait.
Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file flash:/vrpcfg.zip. Continue? [Y/N]:n //此处请选择“N”
Info: If want to reboot with saving diagnostic information, input ‘N’ and then execute ‘reboot save diagnostic-information’.
System will reboot! Continue?[Y/N]:y

华为S系列交换机忘记BootROM 登录密码的解决方法

如果忘记了BootROM密码,用户可以在登录交换机后在用户视图执行命令reset boot password重置BootROM菜单的密码为缺省值。

出厂时,盒式交换机在V100R006C03之前的版本,BootROM默认密码为huawei;在V100R006C03及之后的版本,默认密码为Admin@huawei.com。

框式交换机在V100R006及之前的版本,BootROM默认密码为9300;在V100R006之后的版本,默认密码为Admin@huawei.com。

华为S系列交换机忘记Web 登录密码的解决方法

如果忘记了Web登录密码,用户可以通过Console口、Telnet或STelnet方式登录交换机后设置新的Web登录密码。

注:Telnet协议存在安全风险,建议用户通过Console口或STelnet方式登录设备。

以用户名为admin123,密码为Huawei@123为例,配置如下。
system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user admin123 service-type http
[HUAWEI-aaa] local-user admin123 privilege level 15
[HUAWEI-aaa] return
save

华为S系列交换机忘记Telnet登录密码的解决方法

如果忘记了Telnet登录密码,用户可以通过Console口登录交换机后设置新的Telnet登录密码。

注:以下涉及的命令行以V200R008C00版本的S7700交换机为例。

通过Console口登录设备。

将Console通信电缆的DB9(孔)插头插入PC机的串口(COM)中,再将RJ-45插头端插入设备的Console口中。
在PC上打开终端仿真软件,新建连接,设置连接的接口,配置通信参数如下:
波特率:9600
数据位:8
停止位:1
奇偶校验位:无
流控:无
单击“Connect”,根据提示输入或配置登录密码,完成登录。


以登录VTY0的验证方式为密码验证,密码为Huawei@123为例,配置如下。
system-view
[HUAWEI] user-interface vty 0
[HUAWEI-ui-vty0] protocol inbound telnet //V200R006及之前版本缺省使用的协议为Telnet协议,可以不配置该项;V200R007及之后版本缺省使用的协议为SSH协议,必须配置。
[HUAWEI-ui-vty0] authentication-mode password
[HUAWEI-ui-vty0] set authentication password cipher Huawei@123
[HUAWEI-ui-vty0] user privilege level 15
[HUAWEI-ui-vty0] return
save

以登录VTY0的验证方式为AAA授权验证,用户名为admin123,密码为Huawei@123为例,配置如下。
system-view
[HUAWEI] user-interface vty 0
[HUAWEI-ui-vty0] protocol inbound telnet //V200R006及之前版本缺省使用的协议为Telnet协议,可以不配置该项;V200R007及之后版本缺省使用的协议为SSH协议,必须配置。
[HUAWEI-ui-vty0] authentication-mode aaa
[HUAWEI-ui-vty0] quit
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user admin123 service-type telnet
[HUAWEI-aaa] local-user admin123 privilege level 15
[HUAWEI-aaa] return
save

华为S系列交换机忘记Console口登录密码的解决方法

如果忘记了Console口登录密码,用户可以通过以下两种方式来设置新的Console口登录密码。

1、通过STelnet/Telnet登录交换机设置新的Console口登录密码
注:使用Telnet协议存在安全风险,建议用户使用STelnet V2登录设备。

这种方法的前提是:用户拥有STelnet/Telnet账号并且具有管理员的权限。以下涉及的命令行及回显信息以STelnet登录设备修改Console口密码为例。用户通过STelnet账号登录交换机后,请按照如下步骤进行配置。

以登录用户界面的认证方式为密码认证,密码为Huawei@123为例,配置如下。
system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password cipher Huawei@123
[HUAWEI-ui-console0] return
save

以登录用户界面的认证方式为AAA认证,用户名为admin123,密码为Huawei@123为例,配置如下。
system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode aaa
[HUAWEI-ui-console0] quit
[HUAWEI] aaa
[HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user admin123 service-type terminal
[HUAWEI-aaa] return
save

2、通过BootROM/BootLoad清除Console口登录密码
交换机的BootROM/BootLoad提供了清除Console口登录密码的功能,用户可以在交换机启动后修改Console口登录密码,然后保存配置。

注:如果交换机是双主控,则需要在执行以下操作前将备用主控板拔下,待执行完以下操作后,再插上备用主控板,执行save命令以保证主用主控板和备用主控板配置一致。

交换机的BootROM/BootLoad提供了清除Console口登录密码的功能,用户可以在交换机启动后修改Console口登录密码,然后保存配置。请按照如下步骤进行配置。

以BootROM菜单为例,请按照如下步骤进行配置。
1、通过Console口连接交换机,并重启交换机。当界面出现以下打印信息时,及时按下快捷键“Ctrl+B”并输入BootROM密码,进入BootROM主菜单。

框式交换机打印信息:
Press Ctrl+B to enter boot menu … 1
Password: //输入BootROM密码
盒式交换机打印信息:
Press Ctrl+B or Ctrl+E to enter BootROM menu … 2
password: //输入BootROM密码

注:
.盒式交换机的某些款型支持使用快捷键“Ctrl+E”进入BootROM主菜单,请根据设备的界面提示操作。
.盒式交换机在V100R006C03之前的版本,BootROM默认密码为huawei;在V100R006C03及之后的版本,默认密码为Admin@huawei.com。
.框式交换机在V100R006及之前的版本,BootROM默认密码为9300;在V100R006之后的版本,默认密码为Admin@huawei.com。
.不同版本和不同形态的设备回显有差异,请以实际设备显示为准。

2、在BootROM主菜单下选择“Clear password for console user”清除Console口登录密码。
根据交换机的提示,在BootROM主菜单下选择“Boot with default mode”启动设备。
注:此处不要选择“Reboot”选项,否则此次清除密码将失效。

3、完成系统启动后,通过Console口登录时不需要认证,登录后按照系统提示配置验证密码。(V200R009及之后版本,完成系统启动后,通过Console口登录时认证方式为None,系统启动后不会提示配置验证密码。)

4、登录交换机后,用户可以根据需要配置Console用户界面的认证方式及密码。具体配置与通过STelnet/Telnet登录交换机设置新的Console口登录密码类似,不再赘述。

ICP备案号:晋ICP备18007549号-1