• 华三交换机恢复出厂设置


    一、交换机恢复出厂设置

    1、能进命令行

    第一种方法:删除配置文件重启设备

    #查看设备当前已存在的配置文件
    
    <H3C>dir
    Directory of flash:
    
       0 -rw-        6244 Jan 08 2013 07:26:03   startup.cfg
       1 -rw-      136628 Jan 08 2013 07:26:03   startup.mdb
       2 -rw-       58704 Jan 03 2013 07:56:22   diag_H3C_20130103-005605.tar.gz
    
    #删除配置文件
    <H3C>delete /unreserved startup.cfg
    The contents cannot be restored!!! Delete flash:/startup.cfg?[Y/N]:y
    Deleting a file permanently will take a long time. Please wait...
    .
    %Delete file flash:/startup.cfg...Done.
    
    #重启设备
    <H3C>reboot
    Start to check configuration with next startup configuration file, please wait.........DONE!
    This command will reboot the device. Current configuration will be lost, save current configuration? [Y/N]:n
    This command will reboot the device. Continue? [Y/N]:y
    
    当设备重新完成,那么设备就在出厂设置的状态
    

    第二种方法:清除保存的配置,重启设备方式恢复

    <H3C>reset save
    The saved configuration file will be erased. Are you sure? [Y/N]:Y
    
    #重启设备
    <H3C>reboot
    Start to check configuration with next startup configuration file, please wait.........DONE!
    This command will reboot the device. Current configuration will be lost, save current configuration? [Y/N]:n
    This command will reboot the device. Continue? [Y/N]:y
    

    2、console忘记密码

    整体思路:

    开机时通过按某个快捷键跳过当前的配置文件,重启之后只一个空的配置,然后将空的配置覆盖到配置文件里面,保存重启即可。

    通过conlse线和crt软件连接并登陆设备,然后把设备断电重启。控制台上会打印如下信息,当出现“press Ctrl+B”的时候快速按住“Ctrl+B” 进入botroom菜单
    
    System is starting...
    Press Ctrl+D to access BASIC-BOOTWARE MENU
    Booting Normal Extend BootWare
    The Extend BootWare is self-decompressing.......................Done!
    BootWare Validating...
    Press Ctrl+B to enter extended boot menu...             #在这,ctrl+B
    
    BotWare password: Not required. Please press Enter to continue.
    
    Password recovery capability is enabled.
    
    Note: The current operating device is flash
    
    Enter < Storage Device Operation > to select device.
    
    按住“Ctrl+B”进入如下菜单。选择“<6> Skip Current System Configuration”跳过当前配置启动,不同设备可能不是数字6,
    
    ===========================<EXTEND-BOOTWARE MENU>===========================
    
    |<1> Boot System                                                           |
    
    |<2> Enter Serial SubMenu                                                  |
    
    |<3> Enter Ethernet SubMenu                                                |
    
    |<4> File Control                                                          |
    
    |<5> Restore to Factory Default Configuration                              |
    
    |<6> Skip Current System Configuration                                     |
    
    |<7> BootWare Operation Menu                                               |
    
    |<8> Clear Super Password                                                  |
    
    |<9> Storage Device Operation                                              |
    
    |<0> Reboot                                                                |
    
    ============================================================================
    
    Ctrl+Z: Access EXTEND-ASSISTANT MENU
    
    Ctrl+F: Format File System
    
    Enter your choice(0-9): 6     #在这里面选择6 
    
    Flag Set Success.
    
    然后输入0重启设备
    
    ===========================<EXTEND-BOOTWARE MENU>===========================
    
    |<1> Boot System                                                           |
    
    |<2> Enter Serial SubMenu                                                  |
    
    |<3> Enter Ethernet SubMenu                                                |
    
    |<4> File Control                                                          |
    
    |<5> Restore to Factory Default Configuration                              |
    
    |<6> Skip Current System Configuration                                     |
    
    |<7> BootWare Operation Menu                                               |
    
    |<8> Clear Super Password                                                  |
    
    |<9> Storage Device Operation                                              |
    
    |<0> Reboot                                                                |
    
    ============================================================================
    Ctrl+Z: Access EXTEND-ASSISTANT MENU
    Ctrl+F: Format File System
    Enter your choice(0-9): 0
    System is starting...
    Press ENTER to get started.
    

    如果不需要之前的配置:

    <H3C>save
    The current configuration will be written to the device. Are you sure? [Y/N]:y
    Please input the file name(*.cfg)[flash:/startup.cfg]
    (To leave the existing filename unchanged, press the enter key):(输入回车)
    flash:/startup.cfg exists, overwrite? [Y/N]:y
    Validating file. Please wait...
    Configuration is saved to device successfully.
    <H3C>reboot
    Start to check configuration with next startup configuration file, please wait.........DONE!
    Current configuration may be lost after the reboot, save current configuration? [Y/N]:y
    This command will reboot the device. Continue? [Y/N]:y
    
  • 相关阅读:
    将内容重定向到剪切板(clip.exe)
    加速数组操作(Array)
    错误信息输出,重定向到文件
    格式化数字字符串
    PowerShell常用的.Net 、COM对象(New-Object、Assembly)、加载程序集
    计算文件夹大小、拷贝文件显示进度
    草稿-Hyper-V
    右下角显示提示窗口(New-Object,COM)
    《TCP/IP详解卷一:协议》数据链路层(一)
    tcpdump抓包命令
  • 原文地址:https://www.cnblogs.com/yizhangheka/p/13786614.html
Copyright © 2020-2023  润新知