cisco: копирование IOS через tftp из ROMMON

В маршрутизаторах Cisco есть возможность замены ios без загрузки самого ios. Это делается с помощью режима ROMMON.
Для этого необходимо подключить маршрутизатор через консольный кабель и во время загрузки послать команду Break.


Первым делом проверяем установленные переменные командой set

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 32768 Kbytes of main memory
 
PC = 0xfff0a530, Vector = 0x500, SP = 0x8000488c
 
monitor: command "boot" aborted due to user interrupt
rommon 1 > set
PS1=rommon ! >
?=0
BOOT=
BSI=0
RET_2_RCALTS=
RET_2_RTS=
rommon 2 >

Далее устанавливаем необходимые нам переменные для копирование нужного ios

rommon 2 > IP_ADDRESS=192.168.2.98
rommon 3 > IP_SUBNET_MASK=255.255.255.0
rommon 4 > DEFAULT_GATEWAY=192.168.2.4
rommon 5 > TFTP_SERVER=192.168.2.151
rommon 6 > TFTP_FILE=c2600-io3s56i-mz.120-7.T.bin

Командой tftpdnld выполняем копирование

rommon 7 > tftpdnld
 
          IP_ADDRESS: 192.168.2.98
      IP_SUBNET_MASK: 255.255.255.0
     DEFAULT_GATEWAY: 192.168.2.4
         TFTP_SERVER: 192.168.2.151
           TFTP_FILE: c2600-io3s56i-mz.120-7.T.bin
 
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n:  [n]:  y
 
Receiving c2600-io3s56i-mz.120-7.T.bin from 192.168.2.151 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-io3s56i-mz.120-7.T.bin to flash.
Erasing flash at 0x60fc0000
program flash location 0x607b0000

Перезагружаемся командой reset и получаем новый ios.

Комментарии запрещены.