CiscoTik

Networking Administration

CiscoTik

Networking Administration

CiscoTik

آموزش شبکه های مبتنی بر سیسکو و میکروتیک و ...

طبقه بندی موضوعی
محبوب ترین مطالب
نویسندگان
  • ۱
  • ۰

Recovering IOS on a Catalyst Switch

Unfortunately there is no easy way to recover a corrupt or deleted IOS image on a fixed configuration Cisco Catalyst switch. You must use xModem which commonly takes 2+ hours. This lab will discuss and demonstrate the IOS recovery procedure for fixed configuration Catalyst series switches using xModem.

Real World Application

Recovering the Cisco IOS image on a Cisco switch is one of those tasks that is nice to know and not need it then need it and not know it. In the field you may find yourself faced with a Cisco switch that cannot boot up or crashes when booting up due to a possible IOS Image corruption.

Lab Prerequisites

  • This lab will require a REAL switch as this lab cannot be emulated using GNS3.
  • The Cisco IOS on the switch must be corrupt or missing to perform this lab, to emulate this error you can erase the flash memory to practice this lab.
  • An active console session to the device is REQUIRED.
  • You’ll need to use either HyperTerminal or SecureCRT as Putty does not support xModem


Lab Objectives

  • Boot the switch into SWITCH ROM mode.
  • Initialize the flash file system.
  • OPTIONAL – Format the flash file system if needed. (This will remove your startup configuration)
  • Set the baud rate to 115200 to increase xmodem transfer speed and decrease time required to restore the IOS Image.
  • Copy the Cisco IOS Image via xModem to Flash:
  • Set the boot parameter to the new image name located in Flash:
  • Unset the baud so that it defaults back to 9600.
  • Boot the switch and verify that the switch boots properly.

Lab Instruction

Recovering the Cisco IOS Image on a fix configuration Cisco Catalyst Series Switch is quite a bit different and more of an “old school” way of doing an IOS image recovery. Unfortunately fixed configuration switches require the use of xModem to restore a corrupt or missing IOS images unlike the Cisco 4500 and Cisco 6500 Series supervisor engines which use compact flash cards

Step 1. Boot your switch into switch ROM mode. This typically involves holding down the STAT button on the front of the switch when plugging in the power. You can check out the required procedure by clicking HERE!

Once you’ve booted your switch into Switch ROM mode you’ll be see the following dispatch;

Boot Sector Filesystem (bs) installed, fsid: 2
Base ethernet MAC Address: 00:14:f2:d2:41:80
Xmodem file system is available.
The password-recovery mechanism is enabled.

The system has been interrupted prior to initializing the
flash filesystem.  The following commands will initialize
the flash filesystem, and finish loading the operating 
system software:

    flash_init
    boot


switch:

Step 2. Once you’ve booted into Switch ROM mode you’ll need to initialize the flash file system by executing the flash_init command as shown below;

switch: flash_init
Initializing Flash...
flashfs[0]: 1 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 15998976
flashfs[0]: Bytes used: 12474880
flashfs[0]: Bytes available: 3524096
flashfs[0]: flashfs fsck took 10 seconds.
...done Initializing Flash.

switch:

Step 3 – OPTIONAL – If your image is corrupted you can format your flash file system by executing the format flash: command as shown below however this will delete your start-up configuration!!!

Switch: format flash:
Are you sure you want to format "flash:" (all data will be lost) (y/n)?y
flashfs[0]: 0 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 1024
flashfs[0]: Bytes available: 7740416
flashfs[0]: flashfs fsck took 12 seconds.
Filesystem "flash:" formatted

Switch:

Step 4. To speed up the xModem file transfer speed you’ll need to set the console line BAUD rate to 115200 by executing the set BAUD 115200. If you do this you’ll need to disconnect your console session and change the serial line speed from 9600 to 115200. However if you do not set the BAUD to 115200 your file transfer can take up to 3 hours.

switch: set BAUD 115200
  ÿ

Step 5. Once setting the BAUD rate and reconnecting to the console line of your Cisco switch you’re ready to copy the IOS image via xModem to the switch’s flash memory by executing the copy xmodem: flash:filename.bin and starting the xModem file transfer from the terminal emulator client as shown below;

switch: copy xmodem: flash:c3560-ipservicesk9-mz.122-53.SE.bin
Begin the Xmodem or Xmodem-1K transfer now...
CCC
Starting xmodem transfer.  Press Ctrl+C to cancel.
Transferring c3560-ipservicesk9-mz.122-53.SE.bin...
  100%   12181 KB    6 KB/s 00:31:56       0 Errors

.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................
File "xmodem:" successfully copied to "flash:c3560-ipservicesk9-mz.122-53.SE.bin"

switch:

Step 6. Once the IOS image is copied into flash you’ll need to update the BOOT parameter by executing the set BOOT flash:filename.bin command as shown below;

switch: set BOOT flash:c3560-ipservicesk9-mz.122-53.SE.bin

Step 7. Once the boot parameter has been set you can now set the BAUD rate back to the default 9600bps by executing the command unset BAUD. Note that when doing this you’ll need to disconnect your current console connection and change the baud speed on your terminal emulator from 115200 back to 9600.

switch: unset BAUD
          ÿ

Step 8 is the last step which is to boot the switch and verify that the switch successfully boots the IOS image placed into flash from xMODEM. Execute the boot command to load the IOS image specified in the boot parameter as shown below;

switch: boot
Loading "flash:/c3560-ipservicesk9-mz.122-53.SE.bin"...@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:/c3560-ipservicesk9-mz.122-53.SE.bin" uncompressed and installed, 
entry point: 0x1000000
executing...

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(53)SE, 
RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Sun 13-Dec-09 15:45 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02E00000

Initializing flashfs...

flashfs[1]: 1 files, 1 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 15998976
flashfs[1]: Bytes used: 12474880
flashfs[1]: Bytes available: 3524096
flashfs[1]: flashfs fsck took 1 seconds.
flashfs[1]: Initialization complete....done Initializing flashfs.
Checking for Bootloader upgrade.. not needed

POST: CPU MIC register Tests : Begin
POST: CPU MIC register Tests : End, Status Passed

POST: PortASIC Memory Tests : Begin
POST: PortASIC Memory Tests : End, Status Passed

POST: CPU MIC interface Loopback Tests : Begin
POST: CPU MIC interface Loopback Tests : End, Status Passed

POST: PortASIC RingLoopback Tests : Begin
POST: PortASIC RingLoopback Tests : End, Status Passed

POST: Inline Power Controller Tests : Begin
POST: Inline Power Controller Tests : End, Status Passed

POST: PortASIC CAM Subsystem Tests : Begin
POST: PortASIC CAM Subsystem Tests : End, Status Passed

POST: PortASIC Port Loopback Tests : Begin
POST: PortASIC Port Loopback Tests : End, Status Passed

Waiting for Port download...Complete


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:

http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C3560-24PS (PowerPC405) processor (revision M0) with 131072K bytes of 
memory.
Processor board ID CAT0928Z2EE
Last reset from power-on
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address       : 00:14:F2:D2:D1:AF
Motherboard assembly number     : 73-9673-06
Power supply part number        : 341-0029-03
Motherboard serial number       : CAT09880NNZ
Power supply serial number      : LIT091091ZV
Model revision number           : M0
Motherboard revision number     : A0
Model number                    : WS-C3560-24PS-S
System serial number            : CAT0911FAEE
Top Assembly Part Number        : 800-25861-03
Top Assembly Revision Number    : A0
Version ID                      : V05
CLEI Code Number                : COM1X1FARB
Hardware Board Revision Number  : 0x01


Switch Ports Model              SW Version            SW Image                 
------ ----- -----              ----------            ----------               
*    1 26    WS-C3560-24PS      12.2(53)SE            C3560-IPSERVICESK9-M     




Press RETURN to get started!

نظرات (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی