Home Blog Certs Knowledge Base About

Cisco IOS Management

Cisco IOS management tasks: IOS firmware upgrade, password recovery on routers and Catalyst switches, ROMMON-based IOS restore, and recovering ports from err-disabled state.

IOS Upgrade

Step-by-Step IOS Upgrade
CommandDescription
show flash:1. Check available flash space
copy flash:old.bin ftp://user:pass@172.10.1.2/old.bin2. Back up current IOS to FTP server
copy flash: ftp:Interactive backup wizard (if direct copy fails)
delete c2801-ipbasek9-mz.124-24.T.bin3. Delete old IOS if flash is full
copy ftp://user:pass@172.10.1.2/new.bin flash:new.bin4. Download new IOS from FTP
copy tftp: flash:Or download via TFTP (interactive)
verify /md5 flash:new.bin5. Verify MD5 hash โ€” compare with Cisco download page
boot system flash:new.bin6. Tell the router which image to boot
reload7. Reboot and verify

Password Recovery โ€” Router

All steps require console access only โ€” SSH/Telnet cannot be used.

Router Password Recovery Procedure
CommandDescription
Ctrl+Break (Pause)1. Interrupt boot sequence to enter ROMMON
rommon> confreg 0x21422. Change config register โ€” boot without loading startup-config
rommon> boot2. Reboot into IOS with empty config (no password prompt)
Router# copy startup-config running-config3. Load old config into running-config (startup-config preserved)
Router(config)# enable secret NEW_PASSWORD4. Set new enable password
Router(config)# username admin secret NEW_PASS4. Reset user passwords as needed
rommon> confreg 0x21025. Reboot into ROMMON, restore config register to 0x2102
rommon> boot5. Boot normally with restored config

After recovery: all interfaces will be administratively down โ€” bring them up manually with no shutdown.

If no service password-recovery is set, ROMMON protection is enabled. The only option then is a factory reset (wipes startup-config).

Break sequence by terminal program:

ProgramKey sequence
Hyperterminal / SecureCRTCtrl+Break
TeraTermAlt+B
Minicom (Linux)Ctrl+A, then F
PuTTYnone (use right-click โ†’ Special Command โ†’ Break)

Password Recovery โ€” Cisco Catalyst Switch

Catalyst Switch Password Recovery
CommandDescription
Power cycle + hold Mode button 15 s1. Interrupt boot, enter bootstrap loader
switch: flash_init2. Initialize flash filesystem
switch: load_helper2. Load helper libraries
switch: dir flash:3. List flash contents (find config.text)
switch: rename flash:config.text flash:config.text.old4. Rename config so switch boots without it
switch: boot5. Boot with no config (no password prompt)
Switch# rename flash:/config.text.old flash:/config.text6. Rename config file back
Switch# copy flash:config.text running-config6. Load old config into running-config
Switch(config)# enable secret NEW_PASSWORD7. Set new password
Switch# copy run start8. Save configuration

ROMMON Recovery โ€” Restore IOS via TFTP

Used when flash is corrupted or IOS image is missing. TFTP only โ€” FTP is not supported in ROMMON.

ROMMON TFTP Recovery โ€” Router / Switch
CommandDescription
rommon> IP_ADDRESS=192.168.0.1Set device IP address
rommon> IP_SUBNET_MASK=255.255.255.0Set subnet mask
rommon> DEFAULT_GATEWAY=192.168.0.2Set gateway (even if server is in same subnet)
rommon> TFTP_SERVER=192.168.0.2TFTP server IP
rommon> TFTP_FILE=c2600-ipbasek9-mz.124-13b.binIOS image filename on TFTP server
rommon> setApply the configuration
rommon> tftpdnldDownload IOS from TFTP
rommon> bootBoot the new IOS
ROMMON TFTP Recovery โ€” Cisco ASA
CommandDescription
rommon> ADDRESS=192.168.0.1Device IP
rommon> SERVER=192.168.0.2TFTP server IP
rommon> GATEWAY=192.168.0.2Gateway IP
rommon> IMAGE=f1/asa800-232-k8.binASA firmware image filename
rommon> PORT=Ethernet0/0Interface to use for TFTP
rommon> setApply settings
rommon> ping serverVerify connectivity to TFTP server
rommon> tftpDownload firmware
rommon> bootBoot new firmware

Err-Disabled Port Recovery

Err-Disabled Recovery
CommandDescription
errdisable recovery cause allEnable auto-recovery for all err-disable causes
errdisable recovery interval 300Auto-recovery timer (default: 300 s; range: 30โ€“86400 s)
show interface fa0/1 statusCheck if port is in err-disabled state
show interfaces statusStatus of all ports including err-disabled
show errdisable recoveryRecovery timers per cause
show errdisable detectCauses that can trigger err-disabled

Manual recovery: fix the root cause โ†’ shutdown โ†’ no shutdown on the affected interface.


Configuration Register

The 16-bit config register controls boot behavior. View with show version (last line).

Common Config Register Values
ValueBehavior
0x2100Boot into ROMMON (manual recovery mode)
0x2101Boot first image found in flash
0x2102Normal boot โ€” follow boot system commands in startup-config (default)
0x2142Ignore startup-config on boot โ€” used for password recovery
Config Register Commands
CommandDescription
show versionShow current and next-boot config register values
config-register 0x2102Set register from global config mode
confreg 0x2102Set register from ROMMON prompt

IOS Image Naming

Format: platform-featureset-format.version.bin

IOS Filename Breakdown
FieldExampleMeaning
Platformc2800nmHardware platform (c2800 series, NM slot)
Feature setadvipservicesk9Feature set โ€” IP Services + crypto (k9)
Formatmzm = runs from RAM; z = compressed (zipped)
Version124-25.binIOS 12.4(25)

Example: c2800nm-advipservicesk9-mz.124-25.bin

Format codeMeaning
mRuns from RAM (relocated)
zCompressed image
fRuns from Flash
lRelocated to RAM

Supervisor Redundancy (Catalyst)

Applies to chassis switches with redundant supervisor modules (Cat 4500, 6500, etc.).

Redundancy Modes
ModeStandby behaviorFailover time
RPRStandby boots only after active fails> 2 minutes
RPR+OS loaded on standby; data/protocols load only on failover~30 seconds
SSOStandby fully mirrors active config in real time~1 second

RPR = Route Processor Redundancy ยท SSO = Stateful Switchover

Redundancy Commands
CommandDescription
redundancyEnter redundancy configuration mode
mode ssoSet redundancy mode to SSO
show redundancyRedundancy state and active/standby roles
show redundancy statesDetailed state of both supervisors

Cisco IOS Command Reference | IOS Management