华为路由器配置文件备份与恢复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为路由器配置文件备份与恢复相关的知识,希望对你有一定的参考价值。

技术分享图片
首先物理机通过桥接和路由器AR1联通
技术分享图片
配置AR1和AR2联通
[R1]inter g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.1.1 24

[R2]inter g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.1.2 24

[R2]ping 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms

--- 10.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/34/90 ms
在AR1上保存配置
<R1>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
此时,我们将AR1的当前配置文件稍作修改
user-interface con 0
authentication-mode password
set authentication password cipher 123

我们可以通过compare比较当前配置文件和下次启动配置文件的区别
<R1>compare configuration
The current configuration is not the same as the next startup configuration file.
====== Current configuration line 53 ======
set authentication password cipher %$%$g!_Bi;XP*Nvly73KpfP,.4iiAa#,y/7W)wc8yM%CxQV.4l,%$%$`
user-interface vty 0 4
user-interface vty 16 20
====== Configuration file line 53 ======
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
对当前配置文件进行保存,并保存为config.cfg
<R1>save config.cfg
Are you sure to save the configuration to config.cfg? (y/n)[n]:y

<R1>dir
Directory of flash:/

Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jan 30 2019 03:08:09 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 1,171 Jan 30 2019 03:51:33 config.cfg
3 -rw- 2,263 Jan 30 2019 03:46:48 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 ssl***.zip
5 -rw- 352 Jan 30 2019 03:11:53 private-data.txt
6 -rw- 591 Jan 30 2019 03:46:47 vrpcfg.zip

1,090,732 KB total (784,440 KB free)

我们将R1配置为ftp server,并从客户端将配置文件config.cfg下载下来**
[R1]ftp server enable
aaa
local-user ftp password cipher ftp123
local-user ftp privilege level 15
local-user ftp ftp-directory flash:
local-user ftp service-type ftp
物理机登陆AR1
技术分享图片
技术分享图片

技术分享图片

我们将路由器重启,不保存配置

<R1>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...

重启起来的AR1中并没有保存之前在console配置密码的配置
技术分享图片
我们通过ftp,将拷贝下来的配置文件再次上传到AR1
技术分享图片
并设置引导启动
技术分享图片
不保存配置再次重启
技术分享图片
起来后,查看console口配置,确认为config.cfg生效

技术分享图片

以上是关于华为路由器配置文件备份与恢复的主要内容,如果未能解决你的问题,请参考以下文章

用啥软件可以打开路由器上备份的配置文件后缀bin文件?

5.Cisco Packet Tracer里关于交换机或路由器配置文件和系统映像备份与恢复

路由器交换机的密码恢复与远程管理以及ISO的备份恢复升级修复

H3C交换机配置文件如何下载电脑 和如何到电脑备份的配置文件恢复到路由器?

华为 静态路由与备份实例

博科 SAN交换机配置文件备份和恢复(华为SNS系列交换机为例OEM博科)