華爲路由器配置文件備份與恢復

華爲路由器配置文件備份與恢復
首先物理機通過橋接和路由器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生效

華爲路由器配置文件備份與恢復

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章