1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 华为设备配置备份 配置文件导入导出 设备配置恢复 设备镜像上传

华为设备配置备份 配置文件导入导出 设备配置恢复 设备镜像上传

时间:2022-03-16 16:03:26

相关推荐

华为设备配置备份 配置文件导入导出 设备配置恢复 设备镜像上传

文章目录

前言一、网络拓扑二、配置需求三、备份配置操作流程1.云桥接---模拟器与设备桥接1)Cloud配置2)选择电脑中存在的虚拟网卡,并新增虚拟网卡端口3)选择端口,并增加接口4)端口增加完成后最终效果5)最后进行线路连接2.配置AR1接口IP地址,并测试本地PC与网络设备连通性1)AR12)R1配置一些自定义配置,方便验证是否配置恢复成功3)通过DIR命令查看保存的配置文件4)R1配置为FTP服务器,并设置用户名和密码5)PC作为客户端下载配置文件到本地A、进入文件夹,并复制文件夹目录B、CMD使用FTP服务连接路由器C、使用dir查看文件列表D、下载配置文件E、查看文件夹F、导出配置完成四、配置恢复操作1、删除AR1上已经配置的loopback0接口2、配置文件重命名3、将PC设置为FTP服务器,并设置FTP可访问文件夹1)此时使用3CDeamon软件搭建,大家可以自行选择,比如H3C标杆的神器也可以,类似的软件很多。2)打开FTP server3)点击Config FTP Server4)配置登入密码,用户名保持默认为admin5)设置FTP能访问的文件夹6)R1通过FTP客户端模式连接到PC搭建的FTP服务7)查看文件,并获取备份的配置4、选择开机加载的配置文件为新上传的配置文件总结

前言

此文中华为设备使用ENSP模拟器模拟,与现网设备有可能存在出入,不同产品型号所涉及命令需要根据华为官网产品文档对应,请注意查询设备产品文档,其他厂家设备原理相同,操作方式有差异

一、网络拓扑

二、配置需求

将AR1设备配置文件备份到本地,备份完成后清除AR1设备所有配置,重新配置IP地址与本地电脑连通,并导入配置文件,进行恢复配置。

三、备份配置操作流程

1.云桥接—模拟器与设备桥接

1)Cloud配置

双击Cloud1,进行新增UDP端口

2)选择电脑中存在的虚拟网卡,并新增虚拟网卡端口

PASS:如果你是真机环境,此时需要用一根网线一端接入设备接口,一端接入PC网卡接口。

3)选择端口,并增加接口

PASS:需要增加完成端口后才能进行线路连接

4)端口增加完成后最终效果

5)最后进行线路连接

2.配置AR1接口IP地址,并测试本地PC与网络设备连通性

1)AR1

代码如下(示例):

<Huawei>system-view[Huawei]sysname R1[R1]interface g0/0/0[R1-GigabitEthernet0/0/0]ip address 192.168.246.2 24

PASS:如何确定电脑与网络设备连接IP地址,也可以自行进入电脑控制面板设置IP地址。

[R1]ping 192.168.246.1PING 192.168.246.1: 56 data bytes, press CTRL_C to breakReply from 192.168.246.1: bytes=56 Sequence=1 ttl=128 time=10 msReply from 192.168.246.1: bytes=56 Sequence=2 ttl=128 time=10 msReply from 192.168.246.1: bytes=56 Sequence=3 ttl=128 time=10 msReply from 192.168.246.1: bytes=56 Sequence=4 ttl=128 time=10 msReply from 192.168.246.1: bytes=56 Sequence=5 ttl=128 time=10 ms

2)R1配置一些自定义配置,方便验证是否配置恢复成功

interface LoopBack0ip address 1.1.1.1 255.255.255.255<R1>save //保存配置The current configuration will be written to the device.Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated

3)通过DIR命令查看保存的配置文件

R1

<R1>dirDirectory of flash:/Idx AttrSize(Byte) Date Time(LMT) FileName0 drw- - Mar 21 06:14:05 dhcp1 -rw- 121,802 May 26 09:20:58 portalpage.zip2 -rw-2,263 Mar 21 06:14:00 statemach.efs3 -rw- 828,482 May 26 09:20:58 sslvpn.zip4 -rw- 267 Mar 21 06:30:06 private-data.txt5 -rw- 580 Mar 21 06:30:06 vrpcfg.zip //华为设备配置文件

4)R1配置为FTP服务器,并设置用户名和密码

R1

<R1>system-view[R1]ftp server enable[R1-aaa]local-user funnet password cipher funnet123 //创建用户名和密码[R1-aaa]local-user funnet service-type ftp//用户服务类型[R1-aaa]local-user funnet privilege level 15 //配置为管理员用户[R1-aaa]local-user funnet ftp-directory flash:/ //开放用户访问flash目录的权限<R1>saveThe current configuration will be written to the device.Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated

5)PC作为客户端下载配置文件到本地

PC打开CMD,并在桌面创建一个文件夹,并在CMD进入该目录

A、进入文件夹,并复制文件夹目录

输入CD 并粘贴刚才复制的路径

B、CMD使用FTP服务连接路由器

如果登入失败,重新打开CMD再重复上述步骤重新连接,当然要是会退出可以退出重新连接即可。

C、使用dir查看文件列表

D、下载配置文件

E、查看文件夹

F、导出配置完成

四、配置恢复操作

1、删除AR1上已经配置的loopback0接口

AR1

<R1>system-view[R1]undo interface LoopBack 0[R1]display ip int brief *down: administratively down^down: standby(l): loopback(s): spoofingThe number of interface that is UP in Physical is 2The number of interface that is DOWN in Physical is 2The number of interface that is UP in Protocol is 2The number of interface that is DOWN in Protocol is 2InterfaceIP Address/MaskPhysical Protocol GigabitEthernet0/0/0 192.168.246.2/24up up GigabitEthernet0/0/1 unassigned down downGigabitEthernet0/0/2 unassigned down downNULL0 unassigned up up(s)​​​​​​​

保存配置

<R1>saveThe current configuration will be written to the device.Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait......Configuration file had been saved successfullyNote: The configuration file will take effect after being activated

2、配置文件重命名

3、将PC设置为FTP服务器,并设置FTP可访问文件夹

1)此时使用3CDeamon软件搭建,大家可以自行选择,比如H3C标杆的神器也可以,类似的软件很多。

2)打开FTP server

3)点击Config FTP Server

4)配置登入密码,用户名保持默认为admin

注意此时需要输入两次密码,密码必须大于6位数,此处使用admin123作为密码,大家可以自行选择喜欢的密码;

5)设置FTP能访问的文件夹

选择我们保存配置文件的目录

点击应用并保存

结束后还会弹出,点击确定和确定即可。

6)R1通过FTP客户端模式连接到PC搭建的FTP服务

<R1>ftp 192.168.246.1Trying 192.168.246.1 ...Press CTRL+K to abortConnected to 192.168.246.1.220 3Com 3CDaemon FTP Server Version 2.0User(192.168.246.1:(none)):admin331 User name ok, need passwordEnter password: //密码输入不显示230 User logged in[R1-ftp]

7)查看文件,并获取备份的配置

[R1-ftp]dir200 PORT command successful.150 File status OK ; about to open data connectiondrwxrwxrwx 1 owner group 0 Mar 21 16:19 .drwxrwxrwx 1 owner group 0 Mar 21 16:19 ..-rwxrwxrwx 1 owner group 666 Mar 21 16:25 vrpcfg-backup.zip //文件夹下的文件226 Closing data connectionFTP: 170 byte(s) received in 0.140 second(s) 1.21Kbyte(s)/sec.[R1-ftp]get vrpcfg-backup.zip200 PORT command successful.150 File status OK ; about to open data connection226 Closing data connection; File transfer successful.FTP: 666 byte(s) received in 0.160 second(s) 4.16Kbyte(s)/sec.[R1-ftp]quit<R1>dirDirectory of flash:/Idx AttrSize(Byte) Date Time(LMT) FileName0 drw- - Mar 21 06:14:05 dhcp1 -rw- 121,802 May 26 09:20:58 portalpage.zip2 -rw- 666 Mar 21 08:56:07 vrpcfg-backup.zip //获取的配置文件3 -rw-2,263 Mar 21 06:14:00 statemach.efs4 -rw- 828,482 May 26 09:20:58 sslvpn.zip5 -rw- 267 Mar 21 06:30:06 private-data.txt6 -rw- 647 Mar 21 08:42:33 vrpcfg.zip1,090,732 KB total (784,448 KB free)

4、选择开机加载的配置文件为新上传的配置文件

<R1>startup saved-configuration vrpcfg-backup.zipThis operation will take several minutes, please wait....Info: Succeeded in setting the file for booting system<R1>rebootInfo: The system is comparing the configuration, please wait.Warning: All the configuration will be saved to the next startup configuration.Continue ? [y/n]:n //此时一定要选择nIt will take several minutes to save configuration file, please wait......Configuration file had been saved successfullyNote: The configuration file will take effect after being activatedSystem will reboot! Continue ? [y/n]:yInfo: system is rebooting ,please wait...此时可以点击模拟器设备关机后再开机即可进入设备查看配置信息<R1>display ip int brief *down: administratively down^down: standby(l): loopback(s): spoofingThe number of interface that is UP in Physical is 3The number of interface that is DOWN in Physical is 2The number of interface that is UP in Protocol is 3The number of interface that is DOWN in Protocol is 2InterfaceIP Address/MaskPhysical Protocol GigabitEthernet0/0/0 192.168.246.2/24up up GigabitEthernet0/0/1 unassigned down downGigabitEthernet0/0/2 unassigned down downLoopBack01.1.1.1/32 up up(s) NULL0 unassigned up up(s)被删除的loopback0接口又恢复了

配置恢复方法适用于设备镜像升级,传文件使用镜像文件,并更改设备启动镜像即可完成设备升级,此教程可以去B站看超有趣学网络账号传的小视频,设备升级演示。

总结

如果发现操作步骤有问题的朋友可以私信我

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。