system-view
[Huawei]sysname R1 //配置主机名
[R1]
[R1]header login information 'Welcome to UUU' //配置登录banner,如telnet等
[R1]header shell information 'Welcome to KBXiaoWangGuan' //配置登录banner,如console
[R1]user-interface console 0 //进入console口,默认无密码
[R1-ui-console0]authentication-mode password //配置console密码,提高安全性(用户名密码登录改用aaa命令)
Please configure the login password (maximum length 16):14 //选择密码长度
[R1-ui-console0]set authentication password cipher kbxiaowangguan //配置一个密文形式密码KB小网管小写拼音
[R1-ui-console0]idle-timeout 5 //配置空闲超时为5分钟,默认10分钟
三、配置接口地址与VTY验证
[R1]display ip interface brief //查看接口状态
[R1]display interface g0/0/0 //查看接口详细信息
[R1]interface g0/0/0 //进入接口模式
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0 //配置接口IP地址(注:端口有修改就自动开启,无需手动开启)
[R1]user-interface vty 0 4 //配置用户账号和密码
[R1-ui-vty0-4]authentication-mode aaa //改为aaa用户名+密码身份验证模式
[R1-ui-vty0-4]quit
[R1]aaa
[R1-aaa]local-user JRTT password kbxiaowangguan //新建一个用户账号为JRTT密码为kbxiaowangguan
四、查看、保存、清空、重启路由器
[R1]display current-configuration //查看路由器当前配置信息
save //保存路由器当前配置信息
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
startup saved-configuration kb.zip //配置下次启动加载配置文件kb.zip
This operation will take several minutes, please wait.........
Info: Succeeded in setting the file for booting system
display startup //查看下次启动加载配置文件
MainBoard:
Startup system software: null
Next startup system software: null
Backup system software for next startup: null
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
reset saved-configuration //清空配置
This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n)[n]:y
Clear the configuration in the device successfully.
reboot //重启路由器
Info: The system is comparing the configuration, please wait.
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:n //不保存重启
System will reboot! Continue ? [y/n]:y
Info: system is rebooting ,please wait..