配置管理实验
拓扑图
实验步骤
1.配置路由器ip地址
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]sysname R1
[R1]int g0/0
[R1-GigabitEthernet0/0]ip address 192.168.54.1 24
[R1-GigabitEthernet0/0]dis this
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 192.168.54.1 255.255.255.0
#
return
2.配置FTP服务
[R1]ftp server enable
[R1]local-user jya class manage
[R1-luser-manage-jya]password simple qwer123456
[R1-luser-manage-jya]authorization-attribute user-role level-15
3.到用户视图dir查看配置文件
<R1>dir
Directory of flash: (VFAT)
0 drw- - Aug 14 2022 00:27:27 diagfile
1 -rw- 43136 Aug 14 2022 00:27:27 licbackup
2 -rw- 43136 Aug 14 2022 00:27:27 licnormal
3 drw- - Aug 14 2022 00:27:27 logfile
4 -rw- 0 Aug 14 2022 00:27:26 msr36-cmw710-boot-r0424p22.bin
5 -rw- 0 Aug 14 2022 00:27:26 msr36-cmw710-system-r0424p22.bin
6 drw- - Aug 14 2022 00:27:27 seclog
1046512 KB total (1046408 KB free)
<R1>
4.save——Y——回车,保存之前的配置,再dir查看,可以看到多了startup.cfg和mdb两个配置文件
<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.
<R1>dir
Directory of flash: (VFAT)
0 drw- - Aug 14 2022 00:27:27 diagfile
1 -rw- 252 Aug 14 2022 00:44:04 ifindex.dat
2 -rw- 43136 Aug 14 2022 00:27:27 licbackup
3 -rw- 43136 Aug 14 2022 00:27:27 licnormal
4 drw- - Aug 14 2022 00:27:27 logfile
5 -rw- 0 Aug 14 2022 00:27:26 msr36-cmw710-boot-r0424p22.bin
6 -rw- 0 Aug 14 2022 00:27:26 msr36-cmw710-system-r0424p22.bin
7 drw- - Aug 14 2022 00:27:27 seclog
8 -rw- 2621 Aug 14 2022 00:44:04 startup.cfg
9 -rw- 44691 Aug 14 2022 00:44:04 startup.mdb
1046512 KB total (1046352 KB free)
<R1>
5.打开计算机输入ftp://192.168.54.1,将文件保存到本地
6.重置路由器,reboot——先N——后Y
7.打开ftp服务,在用户视图下startup saved-configuration startup.cfg
8.再reboot后发现之前的配置又回来了。