2008年12月24日 星期三

Cisco Router Password Recovery Procedure

 這也是一篇記錄文,目的同前一篇”Cisco 基本指令”,不過這篇是原文未經翻譯。

Description
This document describes the password recovery procedure for the following Cisco products:

● Cisco 827● Cisco AS 5x00● Catalyst 4908G
● Cisco 1003● Cisco 6x00● Catalyst 5500(RSM)
● Cisco 1004● Cisco 7000● Catalyst 8510-CSR
● Cisco 1005 (RSP7000)● Catalyst 8510-MSR
● Cisco 1400● Cisco 7100● Catalyst 8540-CSR
● Cisco 1600● Cisco 7200● Catalyst 8540-MSR
● Cisco 1700● Cisco 7500● Cisco MC3810
● Cisco 2600● Cisco uBR7200● Cisco NI-2
● Cisco 3600
● Cisco 12000
● Cisco VG200 Analog Gateway
● Cisco 4500● Cisco LS1010Route Processor Module
● Cisco 4700● Catalyst 2948G-L3
● Catalyst 4840G


Step-by-Step Procedure1. Attach a terminal or PC with terminal emulation to the console port of the router. U se the following terminal settings:


        9600 baud rate
        No parity
        8 data bits
        1 stop bit
        No flow control


 The required console cable specifications are described in the Cabling Guide for RJ-45 Console and AUX Ports(Cisco's 1000 series, 2500 series, and AS5100).


2. Type show version and record the setting of the configuration register. Click here to see output of a show version command.


        The configuration register setting is usually 0x2102 or 0x102


3. Using the power switch, turn off the router and then turn it on.


        Important:To simulate step 3 on a Cisco 6400, pull out then replace the Node Route Processor ( NRP) or Node Switch Processor ( NSP ) card.


        Important:To simulate step 3 on a Cisco 6x00 using NI-2, pull out then replace the NI-2 card.


4. Press Break on the terminal keyborad within 60 seconds of the powerup to put the router into ROMMON.


        If the break sequence doesn't work, see Possible Key Combinations for Break Sequence During Passowrd Recovery for other key combinations.


5. Type confreg 0x2142 at the rommon 1 > prompt to boot from Flash without loading the configuration.
6. Type reset at the rommon 2 > prompt.


        The router reboots but ignores its saved configuration.


7. Type no after each setup question or press Ctrl-C to skip the initial setup procedure.


8. Type enable at the Router > prompt.


        You'll be in enable mode and see the Router# prompt.


9. Important:Type config mem or copy start running to copy the nonvolatile RAM ( NVRAM ) into memory. Do not type config term.


10. Type wr term or show running.


        The show running and wr term commands show the configuration of the router. In this configuration you see under all the interfaces the shutdown command, which means all interfaces are currently shutdown. Also, you can see the passwords either in encrypted or unencrypted format.


11. Type config term and make the changes.


        The prompt is now hostname(config)#


12. Type enable secret <password>.


13. Issue the no shutdown command on every interface that is used. If you issue a show ip interface brief command, every interface that you want to use should be "up up".


14. Type config-register 0x2102, or the value you recorded in step 2.


15. Press Ctrl-z to leave the configuration mode.


        The prompt is now hostname#.


16. Type write mem or copy running startup to commit the changes.




Example of Password Recovery on a Cisco 2600


The following example shows password recovery on a Cisco 2600.
        Router> en
        Password:
        Password:
        Password:
        % Bad secrets


        Router> sh ver
        Cisco Internetwork Operating System Software
        IOS (tm) C2600 Software (C2600-IS-M), ...................
        ......................................................
        ......................................................
        Configuration register is 0x2102

        Router>


        ! - - - The router was just powercycled and during boot up a
        ! - - - break sequence was sent to the router.
        !


        * * * System received an abort due to Break Key * * *


        signal = 0x3, code - 0x500, .......
        .........................................................
        rommon 1 > confreg 0x2142


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

        System Bootstrap, Version 11.3.......................
        Copyright (c) 1999...............................................
        TAC:Home:SW:IOS....................................
        C2600 platform ...................................................


        program load complete, entry point: 0x80008000, size:0x6fdb4c


        Self decompressing the image:############
        ######################################
        ############################ [OK]


         Restricted Rights Legend


        Use, duplication, or disclosure by the Government is
        subject to restriction..........................................................
        ...............................................................................................
        ...............................................................................................


         - - - System Configuration Dialog - - -


        Would you like to enter the initial configuration dialog? [ yes/no ]:or Ctrl+C

        Press RETURN to get started!


        00:00:19: % LINK-3-UPDOWN: Interface ....................
        00:00:19: % LINK-3-UPDOWN: .....................................
        ................................................................................................................
        ................................................................................................................
        Router >
        Router > en
        Router # copy start run        還原舊設定
        Destination filename [ running-config ]?
        1324 bytes copied in 2.35 secs ( 662 bytes/sec )
        Router # conf t        Enter configuration commands, one per line. End with CNTL / Z.
        Router(config)# enable secret gavin        修改密碼為 gavin        Router(config)# ^Z        按 Ctrl + Z        Router # sh ip int brief
        將 Status 中為 administratively down 的介面設為 no shutdown
        Router # conf t        Router(config)# int Ethernet0/0
        Router(config-if)# no shut
        Router(config-if)# int BRI0/0        Router(config-if)# no shut
        Router(config-if)# ^Z        按 Ctrl + Z        Router # copy run start
        Router # sh ver
        Cisco Internetwork Operating System Software
        IOS (tm) C2600 Software...........................................
        .........................................................................................
        .........................................................................................
        Configuration register is 0x2142


        Router # conf t        Router(config)# config-reg 0x2102
        Router(config)# ^Z

        Router # sh ver
        Cisco Internetwork Operating System Software
        IOS (tm) C2600 Software ...........................................
        .........................................................................................
        .........................................................................................
        Configuration register is 0x2142 ( will be 0x2102 at next load )

沒有留言:

張貼留言