1. 라우터 flash 메모리가 지워진 경우 설정

일단 tftp에 flash 메모리를 저장해놓는다.

Router# show flash

System flash directory:
File  Length   Name/status
  3   5571584  c2600-i-mz.122-28.bin
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[5827403 bytes used, 58188981 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Router#
Router#copy flash tftp
Source filename []? c2600-i-mz.122-28.bin
Address or name of remote host []? 1.1.1.1
Destination filename [c2600-i-mz.122-28.bin]? R1.IOS

Writing c2600-i-mz.122-28.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 5571584 bytes]

Router#delete c2600-i-mz.122-28.bin
Delete filename [c2600-i-mz.122-28.bin]?
Delete flash:/c2600-i-mz.122-28.bin? [confirm]

Router#
Router#reload

rew.PNG

복구 방법

**rommon 1 > tftpdnld**

Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.

usage: tftpdnld
  Use this command for disaster recovery only to recover an image via TFTP.
  Monitor variables are used to set up parameters for the transfer.
  (Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
  "ctrl-c" or "break" stops the transfer before flash erase begins.

  The following variables are REQUIRED to be set for tftpdnld:
            IP_ADDRESS: The IP address for this unit
        IP_SUBNET_MASK: The subnet mask for this unit
       DEFAULT_GATEWAY: The default gateway for this unit
           TFTP_SERVER: The IP address of the server to fetch from
             TFTP_FILE: The filename to fetch

  The following variables are OPTIONAL:
          TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
      TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7)
          TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
         TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
         FE_SPEED_MODE: 0=10/hdx, 1=10/fdx, 2=100/hdx, 3=100/fdx, 4=Auto(deflt)

rommon 2 > IP_ADDRESS=1.1.1.2
rommon 3 > IP_SUBNET_MASK=255.0.0.0
rommon 4 > DEFAULT_GATEWAY=1.1.1.2
rommon 5 > TFTP_SERVER=1.1.1.1
rommon 6 > TFTP_FILE=R1.IOS
**rommon 7 > tftpdnld**
IP_ADDRESS: 1.1.1.2
      IP_SUBNET_MASK: 255.0.0.0
     DEFAULT_GATEWAY: 1.1.1.2
         TFTP_SERVER: 1.1.1.1
           TFTP_FILE: R1.IOS
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

rommon 8 > reset

eeew.PNG