使用ftp备份以及恢复路由器配置

拓扑图如下:

设置ensp模拟软件和本机桥接:

  1、在cloud1上添加截图,设置完如下图所示,对比添加下就行不再一步一步列出:

2、在RTB连接cloud1的接口上配置IP地址:

    interface GigabitEthernet0/0/1

 ip address 192.168.199.222 255.255.255.0

3、从本机测试互通:

RTB上配置ftp服务,然后通过cloud1和本机桥接,下载和上传配置文件。

1、  搭建FTP服务:

[RTB]ftp server enable

Info: Succeeded in starting the FTP server

[RTB-aaa]local-user ftp password cipher huawei privilege level 15

Info: Add a new user.

[RTB-aaa]local-user ftp service-type ftp

[RTB-aaa]local-user ftp ftp-directory flash:

2、  测试ftp连接:

    3、备份路由器配置文件:

 4、 恢复备份文件时需要设置下次启动时使用哪个配置文件,先上传配置文件在设置,如下图所示,为了方便区分,给最新的配置文件重命名了一下:

设置下次启动使用的配置文件:

<RTB>startup saved-configuration vrpcfg1.zip

 operation will take several minutes, please wait…

Info: Succeeded in setting the file for booting system

<RTB>dis startup

MainBoard:

       Startup system software:                   null

Next startup system software:              null

Backup system software for next startup:   null

Startup saved-configuration file:          flash:/vrpcfg.zip

        Next startup saved-configuration file:     flash:/vrpcfg1.zip

        Startup license file:                      null

        Next startup license file:                 null

        Startup patch package:                     null

        Next startup patch package:                null

        Startup voice-files:                       null

        Next startup voice-files:                  null

此时可以看到下次启动时使用的是vrpcfg1.zip配置文件:

<RTB>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…

第一个选择n,第二个选择y

启动以后再查看配置文件是不是已经是你想要的了。