祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 5113|回复: 1

华为路由器配置文件备份与恢复下次启动文件

[复制链接]

198

主题

211

帖子

1195

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1195
发表于 2021-3-29 00:18:22 | 显示全部楼层 |阅读模式
华为路由器配置文件备份与恢复
1、先把AR路由器上保存配置
                           
[zurkj]quit
<zurkj>saveall //保存配置
Warning: The current configuration will bewritten to the device.
Are you sure to continue?[Y/N]:y
  It will take several minutes to saveconfiguration file, please wait..................
  Configuration file had been savedsuccessfully
  Note: The configuration file will take effectafter being activated
2、对之前的保存配置进行修改
[zurkj]ippool vlan101 //创建DHCP地址池
Info:It is successful to create an IP address pool.
[zurkj-ip-pool-vlan101]return //返回
<zurkj>compareconfiguration  //对比配置
Info:The current configuration is not the same as the next startup configurationfile.
====== Current configuration line 71 ======
#
ip pool vlan101
#
aaa
authentication-scheme default
authentication-scheme radius
  authentication-mode radius
====== Configuration file line 71 ======
#
aaa
authentication-scheme default
authentication-scheme radius
  authentication-mode radius
authorization-scheme default
3、对当前配置文件进行保存,并保存为newconfig.cfg
<zurkj>savenewconfig.cfg  //保存配置文件名为:newconfig.cfg
Are you sure to save the configuration tonewconfig.cfg? (y/n):y  //Y确认
  It will take several minutes to saveconfiguration file, please wait..............
  Configuration file had been savedsuccessfully
  Note: The configuration file will take effectafter being activated
<zurkj>dir //显示文件
Directoryof flash:/
  Idx Attr     Size(Byte)  Date       Time(LMT)  FileName
    0 drw-              -  Jan 01 1970 00:00:47   shelldir
    1 -rw-        172,816  Apr 02 2017 03:41:23   webdata.db
    2 drw-              -  Apr 01 2017 23:56:45   evm
    3 drw-              -  Apr 01 2017 23:56:39   dhcp
    4 drw-              -  Apr 01 2017 23:55:43   slog
    5 -rw-         11,171  Apr 02 2017 00:02:26   default_ca.cer
    6 -rw-            200  Apr 01 2017 23:55:11   hostkey_ECC
    7 drw-              -  Apr 01 2017 23:55:56   logopath
    8 -rw-      7,254,016  Apr 02 2017 00:00:30   V200R009C00SPC500-SPH013-WEB
    9 drw-              - Jan 01 1970 00:00:45   shlogfile
   10 -rw-          2,446  Jul 06 2017 16:15:52   houp.huawei.com_local.cer
   11 -rw-          1,289  Apr 02 2017 00:02:19   default_local.cer
   12 drw-              -  Apr 02 2017 00:00:10   logfile
   13 -rw-          1,360  Jul 06 2017 16:15:52   DigiCert_CA.cer
   14 -rw-          1,912  Jul 06 2017 16:47:26   vrpcfg.zip
   15  -rw-         5,272  Jul 06 2017 17:02:52   newconfig.cfg
   16 drw-              -  Apr 01 2017 23:55:27   $_user
   17  drw-              - Jul 06 2017 16:15:41   sqlitedb
   18 -rw-             29  Jul 06 2017 16:53:33   logrotate.status
   19 -rw-          1,253  Apr 02 2017 00:01:17   local.cer
   20 -rw-            480  Jul 06 2017 17:02:54   private-data.txt
   21  drw-              - Apr 02 2017 04:10:34   localuser
   22 -rw-          1,318  Apr 02 2017 00:01:17   ca.cer
   23 drw-              -  Jul 06 2017 16:14:43   default-sdb
   24 drw-              -  Apr 01 2017 23:55:30   update
   25 -rw-    155,945,856  Jan 01 1970 00:03:09   AR100-S-V200R009C00SPC500.cc
   26 drw-              -  Jan 01 1970 00:09:31   libnetconf
   27 -rw-          5,926  Jul 06 2017 16:15:53   mon_file.txt
   28 -rw-            200  Apr 02 2017 00:02:26   ca_config.ini
   29 -rw-     12,968,832  Apr 01 2017 23:59:27   AR100-S-V200R009SPH019.pat
374,744KB total available (195,988 KB free)
<zurkj>
4、把AR路由器配置为ftp server,并从客户端将配置文件newconfig.cfg下载下来
[zurkj]ftpserver enable //开启FTP功能
[zurkj]aaa  //进入AAA视图
[zurkj-aaa]local-userftpuser password cipher admin1234 privilege level 15  //创建本地用户ftpuser密码为admin1234 特权级别为15
[zurkj-aaa]local-userftpuser service-type ftp //配置本地用户ftpuser服务类型为FTP
[zurkj-aaa]local-userftpuser ftp-directory flash: //配置本地用户ftpuser的FTP访问目录为flash:根目录
[zurkj-aaa]quit //退出
MicrosoftWindows [版本 10.0.18363.1440]
(c)2019 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>ftp100.100.100.100
连接到 100.100.100.100。
220FTP service ready.
530Please login with USER and PASS.
用户(100.100.100.100: (none)): ftpuser
331Password required for ftpuser.
密码:
230User logged in.
ftp>binary  //配置FTP传输模式为二进制
200Type set to I.
ftp>lcd d:\ //配置本地目录为D盘根
目前的本地目录 D:\。
ftp>get newconfig.cfg //下载文件
200Port command okay.
150Opening BINARY mode data connection for newconfig.cfg.
226Transfer complete.
ftp:收到 5272 字节,用时 0.07秒76.41千字节/秒。
此为D盘中保存下来的配置文件(newconfig.cfg)
5、重启路由器不保存刚才的配置
检查重启后的配置有无刚才创建的vlan101的DHCP地址池
6、上传配置文件并配置为设备下次启动时使用

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

7

主题

12

帖子

140

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
140
发表于 2021-3-29 00:29:42 | 显示全部楼层
加油!
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

扫一扫加站主微信

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-4-24 19:50 , Processed in 0.063494 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表