zoukankan      html  css  js  c++  java
  • h3c交换机备份与恢复/&xmoded恢复

    一、使用TFTP方式(略)
    二、使用FTP方式
    步骤1、在PC机“开始菜单”的“运行”栏中键入“cmd”,进入DOS界面,保证PC机可以PING通设备。
    步骤2、在交换机上启动FTP服务器,并配置从PC机上FTP登陆时的用户名和密码
    [H3C]ftp server enable /启动FTP服务/
    % FTP server has been started
    [H3C]local-user guest /增加一个本地用户,用户名为guest/
    New local user added.
    [H3C-luser-ftp]password simple ftp /配置用户名为guest的密码为ftp/
    [H3C-luser-ftp]service-type ftp ftp-directory flash:/
    /指定此用户的服务类型为ftp,且ftp后的上传下载目录为flash下/
    步骤3、在PC机“开始菜单”的“运行”栏中键入“cmd”,进入DOS界面
    (1)获取配置文件
    C:>ftp 10.10.0.254
    Connected to 10.10.0.254.
    220 FTP service ready.
    User (10.10.0.254:(none)): guest
    331 Password required for guest.
    Password:
    230 User logged in.
    ftp> dir
    200 Port command okay.
    150 Opening ASCII mode data connection for *.
    -rwxrwxrwx 1 noone nogroup 5287115 Oct 31 2006 s5500si-cmw5
    -rwxrwxrwx 1 noone nogroup 2254 May 05 04:05 config.cfg
    226 Transfer complete.
    ftp: 148 bytes received in 0.02Seconds 9.25Kbytes/sec.
    ftp> get config.cfg

    Xmodem恢复ios 的各种方法

    xmodem恢复os 的各种方法,呵呵,转过来,拿来己用2009-11-27 18:04对于交换机:

    如果你不小心执行了erase flash,你的交换机将不能boot机,不要紧张,就当它是一台普通PC搞。如你未重启交换机请执行完第1步后跳到第4步开始,如你已经重启交换机请按下面的步骤操作:
      
      1、下载合适的xxxx.tar包,解压后有xxxx.bin及html文件夹,但原xxxx.tar包要保留。
      2、重启交换机时长按mode开关,在超级终端出现三个提示:flash_init、load_helper、boot,先输入flash_init回车,再输入load_helper回车,接着输入copy xmodem: flash:xxxx.bin(这里输入你的ios文件名)回车,超级终端出现C提示,这时你要快速打开发送菜单,选择发送文件选项,然后打开你解压后的文件夹,选择ios文件xxxx.bin,确定后开始传送(时间大概要20多分钟)。完成之后执行set BOOT(注意大写) flash:xxxx.bin,断电重启,交换机启动进入正常模式。
      * 注意:在前面的copy命令中flash和它前面的冒号之间的空格不能少!!!!
      3、输入del xxxx.bin,回车。这样做是为了腾出空间,因你的flash只有4M,而xxxx.bin已经差不多2M。
      4、设置IP,使其能与网卡通信。用双绞线联接你的PC及交换机。这是为了使用tftp方式传送tar包。PC运行tftp server。
      5、在#模式下,输入tar /x tftp://xxx.xxx.xxx.xxx/xxxx.tar flash:,将tar包边解压边写入交换机的Flash。ok!!

    对于路由器:

    1、用控制线连接交换机console口与计算机串口1,用带有xmodem功能的终端软件连接(win2000 and xp的超级终端就带这功能)。

    2、设置连接方式为串口1(如果连接的是其他串口就选择其他串口),速率9600,无校验,无流控,停止位1。或者点击默认设置也可以。

    3、连接以后计算机回车出现交换机无ios的界面,一般的提示符是:switch:

    4、拔掉交换机后的电源线重新启动交换机

    5、在超级终端输入:
    switch:flash_init
    会出现如下提示:
    Initializing Flash...

    6:输入拷贝指令:

    switch:copy xmodem: flash:image_filename.bin

    出现如下提示:

    Begin the Xmodem or Xmodem-1K transfer now...

    7、系统提示不断出现C这个字母就可以开始传文件了

    8、点击超级终端菜单:传送---发送文件,在协议选项中选择Xmodem或者Xmodem-1K协议,然后选择ios的影像文件(*.bin),开始传送。

    9、因为不能改速率,所以传送得很慢,我的大概传送了80分钟左右,请耐心等待。

    10、传送完毕后提示:
    File "xmodem:" successfully copied to ....
    switch:

    11、在提示符下输入

    switch:boot

    启用新的ios系统

    12、重新加电完成恢复工作。

    这个是我恢复的方法,现在看来非常的不科学,效率低。后来看了别人同样用X-Modem恢复IOS,但是效率要高的方法:

    先打开超级终端,进入rommon 模式(Ctrl+Break组合键),键入confreg, 如下:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rommon 1 > confreg 回车

    Configuration Summary
    enabled are:
    load rom after netboot fails
    console baud: 9600
    boot: image specified by the boot system commands
    or default to: cisco2-C2600

    do you wish to change the configuration? y/n [n]: y (选择 yes)
    enable "diagnostic mode"? y/n [n]: n (选择 no)
    enable "use net in IP bcast address"? y/n [n]: n (选择 no)
    disable "load rom after netboot fails"? y/n [n]: n (选择 no)
    enable "use all zero broadcast"? y/n [n]: n (选择 no)
    enable "break/abort has effect"? y/n [n]: n (选择 no)
    enable "ignore system config info"? y/n [n]: n (选择 no)
    change console baud rate? y/n [n]: y (选择 yes)
    enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
    4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7 (选择 7,用最大的115200速率的xmodem传输)
    change the boot characteristics? y/n [n]: n (选择 no)

    Configuration Summary
    enabled are:
    load rom after netboot fails
    console baud: 115200
    boot: image specified by the boot system commands
    or default to: cisco2-C2600

    do you wish to change the configuration? y/n [n]: n (选择 no)

    You must reset or power cycle for new config to take effect

    rommon 2 > reset 回车

    注意:在此时键入 reset键之前,开始定义串口速度(我的电脑---端口属性----串口速度调为115200),然后再修改超级终端里设置速率为115200,记住,一定这么做!否则出现乱码! 然后关闭这个超级终端,重新建立一个超级终端连接,(期间系统重新启动)启动后,出现

    rommon 1> 提示符
    然后,输入
    rommon 1> xmodem -r

    Do not start the sending program yet...

    Invoke this application only for disaster recovery.
    Do you wish to continue? y/n [n]: y (选择 yes)
    Ready to receive file ...

    此时,在超级终端的菜单上的“传送”---“发送文件”----选择IOS镜像文件所在地以及选择使用“xmodem”协议,点击“发送”即可

    然后等待10-20分钟左右就把3-6M的IOS灌进去了!

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    (修改回计算机串口与超级终端、路由器confreg下的xmodem等9600的传输速率)

    (videre注:实际用的时候,我发现这个命令总是改不成功,后来发现在line con 0下面有了一个speed 115200,所以即使改register成功,启动以后router又执行speed 115200,还是不行,所以如果有这个问题,记得把这个语句no掉)

    Router>en 进入新IOS的特权模式

    Router#reload 重启系统

    Proceed with reload? [confirm] 回车

    00:01:04: %SYS-5-RELOAD: Reload requested
    System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
    Copyright (c) 1999 by cisco Systems, Inc.
    TAC:Home:SW:IOS:Specials for info
    PC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0
    C2600 platform with 24576 Kbytes of main memory

    PC = 0xfff0a530, Vector = 0x500, SP = 0x80004684

    monitor: command "boot" aborted due to user interrupt

    rommon 1 > confreg ( 输入“confreg”命令)

    Configuration Summary
    enabled are:
    load rom after netboot fails
    console baud: 115200
    boot: image specified by the boot system commands
    or default to: cisco2-C2600

    do you wish to change the configuration? y/n [n]: y (选择 yes)
    enable "diagnostic mode"? y/n [n]: n (选择 no)
    enable "use net in IP bcast address"? y/n [n]: n (选择 no)
    disable "load rom after netboot fails"? y/n [n]: n (选择 no)
    enable "use all zero broadcast"? y/n [n]: n (选择 no)
    enable "break/abort has effect"? y/n [n]: n (选择 no)
    enable "ignore system config info"? y/n [n]: n (选择 no)
    change console baud rate? y/n [n]: y (选择 yes)
    enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
    4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [7]: 0 (选择 0,改回用标准速率速率9600的xmodem传输)
    change the boot characteristics? y/n [n]: n (选择 no)

    Configuration Summary
    enabled are:
    load rom after netboot fails
    console baud: 9600
    boot: image specified by the boot system commands
    or default to: cisco2-C2600

    do you wish to change the configuration? y/n [n]: n

    You must reset or power cycle for new config to take effect
    rommon 2 >

    此时手工改回计算机串口与超级终端2者传输速率为9600

    然后敲入
    rommon 2 >reset
    ( 最好关电源)



    Xmodem下升级 Cisco 3550 交换机
    ------------------------------------------------
    和用TFTP升级IOS相比,Xmodem速度更慢,操作相对会复杂一点,如果你的交换机还能进系统,推荐使用TFTP方式升级IOS,当IOS被别人误删之后,那只能用Xmodem方式恢复IOS。
    1、使用SecureCRT新建会话
    在新建会话中注意把波特率改为9600,在XON/XOFF前打勾。


    2、要执行的命令

    switch:flash_init
    switch:load_helper
    switch: copy xmodem:c3550-ipservicesk9-mz.122-25.SEE2.bin flash:c3550-ipservicesk9-mz.122-25.SEE2.bin

    3、发送文件

    在发送XModem的时候选中交换机的IOS,这个过程要经过几个小时。
    4、Boot启动交换机

    switch: boot flash:c3550-ipservicesk9-mz.122-25.SEE2.bin

    有的交换机可能还会遇到一个问题,那就是刚灌完IOS是可以进入系统,但是重启的话又进入switch:下,如果这样的话,上面的boot flash: 命令再敲一遍,进入系统之后再敲下面一行即可。

    Switch(config)#boot system flash:c3550-ipservicesk9-mz.122-25.SEE2.bin

    如果交换机还能进入系统,请看下面操作:
    -----------------------------------------------
    3550交换机的IOS升级还是挺方便的,主要就几条命令,刚刚升级了一台,在这里做个记录。
    升级过程中要用到一款TFTP软件,比如Cisco TFTP,在升级前,要把新的IOS放在TFTP软件的目录下。
    下面是步骤:
    1、把交换机的F0/1(或其他)端口和PC的网卡连起来,把F0/1设为三层端口,并配一个IP地址,并ping一下PC机。

    SW4(config)#int f0/1
    SW4(config-if)#no switchport
    SW4(config-if)#ip add 192.168.1.254 255.255.255.0
    SW4(config-if)#no sh

    2、启动TFTP软件,把IOS下载到flash里面,输入TFTP的地址和IOS的文件名,在输入IOS的文件名的时候要注意后缀,假如你电脑上把.bin后缀隐藏了,在输入的时候还是要带.bin。

    SW4(config)copy tftp flash

    3、设置启动文件。

    SW4(config)boot system flash:c3550-ipservicesk9-mz.122-25.SEE2.bin

    4、重启,OK。
  • 相关阅读:
    ThinkPHP 3.2.2 实现持久登录 ( 记住我 )
    Java实现 LeetCode 20 有效的括号
    Java实现 LeetCode 20 有效的括号
    Java实现 LeetCode 19删除链表的倒数第N个节点
    Java实现 LeetCode 19删除链表的倒数第N个节点
    Java实现 LeetCode 19删除链表的倒数第N个节点
    Java实现 LeetCode 18 四数之和
    Java实现 LeetCode 18 四数之和
    Java实现 LeetCode 18 四数之和
    Java实现 LeetCode 17 电话号码的字母组合
  • 原文地址:https://www.cnblogs.com/user-ldl/p/13802582.html
Copyright © 2011-2022 走看看