三、基本命令行配置
1、<Huawei>用户视图。进入命令行之后的默认视图
2、[Huawei]系统视图。<Huawei>system-view
3、[Huawei-GigabitEthernet0/0/1] 接口视图
[Huawei]interface GigabitEthernet 0/0/1
4、quit 返回上一视图 / return和Ctrl+Z 返回用户视图
5、基本配置命令
(1)<Huawei>display version 查看版本
(2)[Huawei]sysname Switch 给交换机起名
(3)配置登录simple密码:
[Switch1]user-interface console 0
[Switch1-ui-console0]authentication-mode password
[Switch1-ui-console0]set authentication password simple 123
(4)查看配置信息,可以看到simple密码
[Switch1]display current-configuration
(5)配置登录cipher密码:
[Switch1]user-interface console 0
[Switch1-ui-console0]authentication-mode password
[Switch1-ui-console0]set authentication password cipher 456
(6)关闭打断命令输入
[Switch1]undo terminal monitor
(7)保存配置信息 <Huawei>save
(8)重启 <Huawei>reboot
(9)恢复出厂设置 <Huawei>reset saved-configuration
(10)关闭接口 shutdown
[Swithc]interface GigabitEthernet 0/0/2
[Swithc-GigabitEthernet0/0/2] shutdown 关闭接口
[Swithc-GigabitEthernet0/0/2] undo shutdown 重新打开
(11)配置管理地址:交换机这Vlanif 1上配置
[Huawei]interface Vlanif 1
[Huawei-Vlanif1]ip address 192.168.1.100 255.255.255.0
[Huawei-Vlanif1]undo shutdown 激活