<Huawei> //用户视图
<Huawei>display version //查看VRP系统版本信息
<Huawei>undo terminal monitor //关闭告警信息
<Huawei>system-view //进入系统视图
[Huawei]sysname switch //更改交换机名称
[Huawei]interface gigabitethernet 0/0/1 //进入接口视图
设置交换机密码:
[Huawei]user-interface console 0 //进入console 0接口模式
[Huawei-ui-console0]set authentication password simple 123
//设置明文密码
[Huawei-ui-console0]set authentication password cipher 456
//设置密文密码
[Huawei-ui-console0]authentication-mode password
//设置身份认证模式
更改自动退出时间
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 30
//用户连接超时时间为30分钟
*缺省情况下,用户连接的超时时间是10分钟*
开启/关闭接口
<Huawei>
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1]shutdown
//关闭接口
[Huawei-GigabitEthernet0/0/1]undo shutdown
//开启接口
配置交换机管理IP(网关)
<Huawei>
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface vlanif 1 //进入vlanif 1
[Huawei-Vlanif1]ip address 192.168.1.100 255.255.255.0
//配置交换机管理IP
// vlanif和vlan的区别
https://zhidao.baidu.com/question/1771576533513288220.html
远程管理
<Huawei>
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface vty 0 3 //同时远程管理终端人数
[Huawei-ui-vty0-3]user privilege level 3
//定义访问权限级别
[Huawei-ui-vty0-3]authentication-mode aaa
//启用AAA认证
[Huawei-ui-vty0-3]aaa //进入AAA认证视图
[Huawei-aaa]local-user abc password cipher 123
Info: Add a new user. //定义远程管理用户名及密码
[Huawei-aaa]local-user abc service-type telnet
//定义远程管理协议
存储配置信息
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
查看当前配置
<Huawei>display current-configuration
重启交换机
<Huawei>reboot
Info: The system is now comparing the configuration, please wait.
Info: If want to reboot with saving diagnostic information, input 'N' and then e
xecute 'reboot save diagnostic-information'.
System will reboot! Continue?[Y/N]:y
恢复出厂默认 *恢复默认后重启根据提示先输入n,在输入Y重启
<Huawei>
<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.