• 华为设备配置文件备份与恢复


    网络拓扑图如下:

    目的: 10.1.1.1为FTP Server,备份SW1的配置文件至Server上,然后SW2下载Server上的配置文件到本地恢复,模拟当SW1出现故障后能快速恢复网络上线使用

    1、SW1配置命令:

    <Huawei>system-view
    [Huawei]sysname 3f-0388
    [3f-0388]vlan batch 10 20 30 40 50
    [3f-0388]interface GigabitEthernet 0/0/1
    [3f-0388-GigabitEthernet0/0/1]port link-type access
    [3f-0388-GigabitEthernet0/0/1]port default vlan  10
    [3f-0388-GigabitEthernet0/0/1]qu
    [3f-0388]interface Vlanif 10
    [3f-0388-Vlanif10]ip address 10.1.1.2 24
    [3f-0388-Vlanif10]qu
    [3f-0388]quit
    <3f-0388>save        保存配置,文件名vrpcfg.zip

    测试网络连通性:

     

     2、将SW1配置文件上传至FTP Server,需要提前在10.1.1.1 上搭建一个FTP服务器,软件自己可以找

     

     3、SW2配置命令:

    <Huawei>sys
    [Huawei]interface Vlanif 1
    [Huawei-Vlanif1]ip address 10.1.1.3 24
    [Huawei]qu
    <Huawei>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=128 time=20 ms
        Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=128 time=20 ms
        Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=128 time=20 ms
        Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=128 time=1 ms
        Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=128 time=1 ms
    
      --- 10.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/12/20 ms

    SW2下载配置与恢复:

    <Huawei>ftp 10.1.1.1
    Trying 10.1.1.1 ...
    Press CTRL+K to abort
    Connected to 10.1.1.1.
    220-FileZilla Server version 0.9.41 beta
    220-written by Tim Kosse (Tim.Kosse@gmx.de)
    220 Please visit http://sourceforge.net/projects/filezilla/
    User(10.1.1.1:(none)):test
    331 Password required for test
    Enter password:
    230 Logged on
    
    
    [ftp]dir
    200 Port command successful
    150 Opening data channel for directory list.
    -rw-r--r-- 1 ftp ftp            524 Mar 24 14:53 vrpcfg.zip
    226 Transfer OK
    
    
    
    [ftp]get vrpcfg.zip
    200 Port command successful
    150 Opening data channel for file transfer.
    226 Transfer OK
    FTP: 524 byte(s) received in 0.030 second(s) 17.46Kbyte(s)/sec.


    [ftp]bye    #退出

    恢复配置:

    <Huawei>startup saved-configuration vrpcfg.zip        #配置开机启动配置文件
    Info: Succeeded in setting the configuration for booting system.
    
    <Huawei>reboot
    Info: The system is now comparing the configuration, please wait.
    Warning: All the configuration will be saved to the configuration file for the next startup:flash:/vrpcfg.zip, Continue?[Y/N]:n        #输入n取消保存当前配置文件
    
    Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.
    System will reboot! Continue?[Y/N]:y        #输入y确定重启设备,重启完成后即可恢复SW1上一样的运行配置

    格式化设备flash:

    <Huawei>format flash:            #格式化flash存储器
  • 相关阅读:
    WebSocket客户端连接不上和掉线的问题以及解决方案
    中国(China): 上海地图和经维度
    在程序开发中怎样写SQL语句可以提高数据库的性能
    C# 正则表达式
    asp.net mvc 2.0 【1】
    c#获取相对路径的八种方法
    ASP.NET 常用对象
    Python自动化开发基础和数据类型
    Python自动化开发数据类型之集合
    Python自动化开发数据类型之字符串
  • 原文地址:https://www.cnblogs.com/xiykj/p/16050074.html
Copyright © 2020-2023  润新知