Reset to Defaults – Cisco Router

Reset Cisco 1720 Router to Factory Defaults

Part of building the Cisco lab is setting up the cheap router I bought on Ebay. I want start the configuration from scratch so we will reset the device to factory defaults without knowing the “enable” password. The link listed below is a good start on what needs to be done. We will get “enable” access and erase the startup-config.

http://www.jedge.com/wordpress/2018/05/cisco-router-password-recovery-console-access/

The easiest way I’ve found to issues a “break key sequence” from Kali and minicom is to simulate the effect described at the bottom of the Cisco support document found here.

The connection details to simulate the break key sequence are as follows:

  • 1200 baud
  • 8 data bits
  • 1 stop bits
  • No parity
  • None (flow control)

$sudo minicom –s
configuration -> Serial port setup
A -> /dev/ttyUSB0 -> Enter
E -> C -> B -> B -> B -> Enter
F -> Enter
configuration -> Exit -> Enter

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 1200 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
            | Screen and keyboard      |                    
            | Save setup as dfl        |                    
            | Save setup as..          |                    
            | Exit                     |                    
            | Exit from Minicom        |                    
            +--------------------------+   
Power cycle (switch off and then on) the router and press the SPACEBAR for 10-15 seconds in order to generate a signal similar to the break sequence.
Modify minicom settings back to the default settings for communicating with a Cisco device as detailed above. While in minicom enter the following commands.
CTRL-A -> SHIFT-Z -> SHIFT-P
E -> C -> X -> Enter
configuration -> Exit -> Enter

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 9600 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
            | Screen and keyboard      |                    
            | Save setup as dfl        |                    
            | Save setup as..          |                    
            | Exit                     |                    
            | Exit from Minicom        |                    
            +--------------------------+   
We are now in ROM Monitor mode
rommon 1 > confreg 0x2142
You must reset or power cycle for new config to take effect
rommon 2 > reset
Once the device resets we have that ability to configure the device without credentials. In this instance we will erase the configuration stored in NVRAM, reset the config register, save it, then reload the device. At that point we will we be at factory defaults.
Router>enable                                                                   
Router#write erase                                                              
Erasing the nvram filesystem will remove all files! Continue? [confirm]         
[OK]                                                                            
Erase of nvram: complete                                                        
Router#config t                                                                 
Enter configuration commands, one per line.  End with CNTL/Z.                   
Router(config)#config-register 0x2102                                           
Router(config)#exit                                                             
Router#write mem                                                                 
00:03:01: %SYS-5-CONFIG_I: Configured from console by console                   
Building configuration...                                                       
[OK]                                                                            
Router#reload                                                                   
Proceed with reload? [confirm]

Click HERE for the complete session log.

Twitter
Follow by Email
LinkedIn
YouTube
Google+
RSS

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.