Device Management Flashcards
Switch and router memories
• Cisco routers and switches have 4 built-in memory locations:
• ROM - Read Only Memory
• Flash - newer devices use removable CompactFlash
• NVRAM - Non-Volatile RAM
• RAM - Random Access Memory
• An external USB device can also be used
Switch and router ROM Read Only Memory
• When the device is powered on, it will first load from ROM
• Two main functions are performed:
1) Power On Self Test (POST)
2) Load bootstrap
• The bootstrap will look in Flash for an IOS software image to load
• If an IOS image cannot be found the device will show the ROMMON
prompt at the command line
• The ROM Monitor can be used to recover a missing or corrupted software image
• In this case you can boot from USB or an external TFTP (Trivial File
Transfer Protocol) server
• Search for ‘Cisco ROMMON Recovery’ for your device model
What is router and switch Flash Memory?
• The system will load the first IOS image found in Flash by default
• You can override this with the boot system command
• You can copy additional IOS system imagesto Flash via TFTP or USB
What is NVRAM Non-Volatile RAM Memory?
• When the system has finished loading the IOS system image from Flash, it will load the startup-config configuration file from NVRAM
• The saved startup-config becomes the current running-config in RAM
• If no startup-config file is found, the device will load the Setup Wizard
• Whenever you enter a command in IOS it takes effect immediately and goes into the running-config
• To make your changes permanent across a reboot:
#copy running-config startup-config
RAM Random Access Memory
• The IOS system image and startup-config are loaded from Flash and
NVRAM into RAM during bootup
• RAM is used as the normal working memory of the device
• ROM, Flash and NVRAM are permanent memory, their contents are not lost when the device is powered off or rebooted
• RAM is volatile memory, its contents are lost when the device is powered off
How to Booting from TFTP?
• The system can also load a system image and/or startup-config from an external TFTP server instead of Flash/NVRAM
• This is not recommended because the device will not be able to boot if it loses connectivity to the server. It is usually only used where the device does not have enough capacity in Flash to save the system image
Factory reset router or switch
• To factory reset a router or switch:
#write erase
• This will erase the startup-config
* Reload to boot up with a blank configuration
• The Setup Wizard will run
What is config register?
• The configuration register can be used to change the way the router boots
• Use the config-register command in global configuration mode or confreg at the rommon prompt
• Eg config-register 0x2142
• 0x2102: boot normally (default)
• 0x2120: boot into rommon
• 0x2142: ignore contents of NVRAM (startup-config)
The configuration register in Cisco devices determines how the router boots and behaves during startup. The register value is stored in NVRAM and can be changed using the config-register command in global configuration mode.
Here’s what the different values mean:
1. 0x2102 (Default)
• This is the default configuration register value.
• The router boots normally using the startup-config stored in NVRAM.
• If a valid IOS image is available, it loads the operating system and applies the saved configuration.
2. 0x2120 (Boot into ROMMON mode)
• This forces the router into ROM Monitor (ROMMON) mode.
• ROMMON is a low-level operating mode used for recovery, troubleshooting, and manually booting an IOS image.
• This mode is useful when the router fails to find a valid IOS image or needs manual intervention.
3. 0x2142 (Ignore Startup Configuration)
• The router ignores the startup-config stored in NVRAM.
• It acts as if it’s booting for the first time (factory default settings).
• This is commonly used to recover a lost password because it allows access without applying the previous configuration.
The Router Password Recovery Procedure
• Press the break sequence (CtrI-Break) at power on to break into rommon
• confreg 0x2142 to ignore the startup-config on boot
• The startup-config is still there with the full configuration including the unknown enable secret, but the router does not use it when it boot’
• reset to reload
• The router will bootup with no configuration. Type no to bypass the setup wizard
• Enter enable mode. You will not be prompted for the enable secret as it is not in the running configuration
• Copy the startup config to the running config
• This will copy the entire previous configuration into the running config including the unknown enable secret. You are already in enable mode so you do not need to know what it is.
• Enter a new enable secret in global configuration mode to overwrite the old one. This will go into the running config
• config-register 0x2102 so the router will boot normally on the next
• copy run start to save the configuration. This will merge the new enable password into the existing startup-config
The Switch Password Recovery Procedure
• The switch password recovery procedure is very similar, but you may have to physically press the ‘Mode’ button on the front of the switch to break into the switch loader
• Search for ‘Cisco password recovery’ for your model of switch for full instructions
How to Backing up the System Image and Config ?
• Copies of the device’s IOS system image and configuration can be saved to Flash, FTP, TFTP or USB
• If you copy a config file into the running-config, it will be merged with the current configuration
• To replace a configuration, factory reset and then copy the new configuration into the startup-config
#copy flash tftp
#copy running-config tftp
#copy startup-config usb
How to upgrade IOS system image?
• IOS software images can be downloaded from:
https://software.cisco.com/
• After downloading the software, copy to the dev”ce’s Flash using TFTP:
#copy tftp flash
• Delete the old system image or use the boot system command