H3C配置管理实验

实验拓扑

image.png

实验需求

1.按照图示连接到真机,并配置IP地址(真机IP地址配置到VirtualBox Host-Only Ethernet Adapter网卡)
2.R1保存当前配置
3.在R1上开启FTP服务
4.使用真机访问FTP服务,把R1的配置文件拷贝到本地
5.在R1上清空配置,重启R1,确认已配置为空配状态
6.再次在R1开启FTP服务,并把真机拷贝的配置文件还原到路由器
7.更改R1的启动配置文件名
8.再次重启R1,确认配置已还原

实验解法

1.配置IP地址部分略
2.R1保存当前配置,并确认,命令如下

[R1]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Configuration is saved to device successfully.

3.R1上开启FTP服务,创建用户wangdaye,密码123
步骤1:开启FTP服务

[R1]ftp server enable

步骤2:创建用于FTP身份验证的用户,配置密码,并设置用户权限级别和服务类型

[R1]local-user wangdaye class manage 
New local user added.
[R1-luser-manage-wangdaye]password simple 123456
[R1-luser-manage-wangdaye]authorization-attribute user-role level-15
[R1-luser-manage-wangdaye]service-type ftp

4.使用真机访问FTP服务,备份R1的配置文件

步骤1:使用资源管理器访问FTP服务,如图1-2所示


image.png

步骤2:输入用户名和密码,如图1-3所示


image.png

步骤3:复制R1的配置文件,如图1-4所示
image.png

5.在R1上清空配置,命令如下

分析:此时R1的配置已经备份到PC上,现在把R1的配置清空,再测试还原备份的配置是否有效

<R1>reset saved-configuration 
The saved configuration file will be erased. Are you sure? [Y/N]:y
Configuration file in flash: is being cleared.  
Please wait ...
Configuration file is cleared.

6.重启R1,命令如下

注意:重启设备时,第一次确认提示是设备检测到配置被清空,询问是否要重新保存当前配置。此次询问需要输入n来否定;第二次确认提示才是询问是否确认要重启,应该输入y

<R1>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:n
This command will reboot the device. Continue? [Y/N]:y
Now rebooting, please wait...

7.查看R1配置,发现R1的配置已经变成空配状态

<H3C>display current-configuration 
#
 version 7.1.075, Alpha 7571
#
 sysname H3C
#
system-working-mode standard
xbar load-single
password-recovery enable
lpu-type f-series
#
vlan 1   

8.再次把R1的g0/0口配置IP地址,并开启FTP,命令略

9.把真机上的配置文件还原到路由器,过程略

10.更改R1的启动配置文件名,命令如下

<H3C>startup saved-configuration startup.cfg 
Please wait...... Done.

11.重启R1,确认配置已经还原到清空前的状态

<R1>display cu
<R1>display current-configuration 
#
 version 7.1.075, Alpha 7571
#
 sysname R1
#
 system-working-mode standard
 xbar load-single
 password-recovery enable
 lpu-type f-series
#
vlan 1
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。