某工程师需要为公司配置路由器,需求如下:
- 路由器与PC互通,地址规划如图:
- 公司其他人员可以通过PC远程登陆访问路由器,密码是huawei123,但是只能查看配置不能随意修改配置命令。
- 将当前配置保存为huawei.zip文件,并配置系统下次启动时使用该配置文件。
配置接口地址
AR1
<AR1>system-view #进入系统视图
[Huawei]sysname AR1 #修改路由器名字
[AR1]interface GigabitEthernet 0/0/1 #进入接口
[AR1-GigabitEthernet0/0/1]ip add 192.168.1.1 24 #配置接口IP地址
[AR1]quit #退出
配置用户权限和用户认证
RA1
[AR1]user-interface vty 0 4 #远程登录要使用VTY来配置, 0 4 表示可以有5个人登录
[AR1-ui-vty0-4]authentication-mode password #采用密码认证
Please configure the login password (maximum length 16):huawei123 #设置密码
[AR1-ui-vty0-4]user privilege level 1 #同时设置通过此界面登录的权限级别,level 1 表示只能看不能修改
[AR1-ui-vty0-4]quit
配置系统下次启动文件
<AR1>save huawei.zip
Are you sure to save the configuration to huawei.zip? (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
<AR1>startup saved-configuration huawei.zip #下次启动使用huawei.zip文件
This operation will take several minutes, please wait....
Info: Succeeded in setting the file for booting system
<AR1>dis startup #查看文件
本文章纯属个人笔记,如有不当,请大佬指教!