Cisco Device Boot Sequence: Routers and Switches
Learn how Cisco routers and switches start: POST, bootstrap, IOS loading, configuration register behavior, startup-config, running-config, and boot troubleshooting.
The Cisco boot sequence is the ordered process a router or switch follows after power is applied. The device initializes hardware, starts its low-level firmware, finds and loads Cisco IOS, and then loads the saved configuration.
Understanding these stages helps with initial deployment, password recovery, IOS image recovery, software upgrades, and fault isolation. It also helps you determine whether a failure involves hardware, the operating system, or configuration data.
What the Boot Sequence Must Accomplish
Startup can be divided into three broad functions:
- Hardware initialization: Power is applied and diagnostics verify that essential hardware can operate.
- Operating-system loading: Firmware and a boot loader locate an IOS image and place it into RAM.
- Configuration loading: IOS reads the saved startup configuration and applies it as the running configuration.
A device can succeed at one stage and fail at another. For example, a router may pass POST and load IOS successfully but start without its expected interfaces or passwords because the startup configuration is missing or bypassed.
Memory and Storage Roles
Cisco devices use several memory areas. Exact hardware designs vary, especially between router and switch families, but the following roles are useful for CCNA-level troubleshooting.
| Memory or Storage Type | Volatile | Typical Contents | Role During Boot |
|---|---|---|---|
| ROM or boot ROM | No | POST, bootstrap functions, and recovery firmware | Starts hardware diagnostics and begins the boot process |
| Flash memory | No | IOS image files and other device files | Common source for the IOS image |
| NVRAM | No | Traditionally, the startup configuration | Provides the saved configuration during normal startup |
| RAM or DRAM | Yes | Running IOS, processes, tables, buffers, and running configuration | Working memory used after IOS starts |
| Configuration register | No, as a boot-control setting | A hexadecimal startup-control value on applicable routers | Influences image loading and startup-configuration behavior |
Important distinction: Flash and NVRAM retain data when power is removed. RAM does not. A change made only to the running configuration is lost after a reload unless it is copied to startup-config.
Standard Cisco Router Boot Sequence
- Power is applied. The device begins hardware initialization.
- POST runs. Power-On Self-Test checks critical components such as the CPU, memory, and interfaces. LEDs and console messages may report the progress or a failure.
- Bootstrap code starts. Firmware in ROM initializes enough of the device to begin finding an operating-system image.
- Boot instructions are evaluated. The device uses configured
boot systemstatements, boot variables, or the platform's default image-search behavior. - An IOS image is located. Flash is the normal source, although supported platforms may use another local source or a network-based recovery method.
- IOS is loaded into RAM. A compressed image may be decompressed as part of loading. IOS then initializes its processes and hardware interfaces.
- Startup configuration is read. IOS locates the saved configuration, traditionally in NVRAM, and copies it into RAM as the running configuration.
- The CLI becomes available. The administrator receives an IOS prompt. If no usable startup configuration exists, the device may offer setup mode or start with default settings.
| Stage | What Happens | Primary Storage or Component | Expected Result | Failure Outcome |
|---|---|---|---|---|
| Power-on | Electrical power reaches the device | Hardware | Startup begins | No lights, console output, or operation |
| POST | Critical hardware is tested | ROM firmware and hardware | Diagnostics pass | Boot interruption, error messages, or fault LEDs |
| Bootstrap | Low-level startup code takes control | ROM or boot ROM | Boot process continues | Boot loader or ROMMON prompt |
| Image discovery | Boot targets and local storage are checked | Flash and boot settings | A usable IOS image is selected | Repeated search, invalid-file errors, or recovery mode |
| IOS loading | The image is decompressed when necessary and placed in RAM | Flash and RAM | IOS starts | Memory, integrity, or compatibility error |
| Configuration loading | Saved configuration is copied into RAM | NVRAM or platform-equivalent storage | Running configuration is populated | Setup mode, default prompt, or unconfigured device |
| CLI readiness | IOS presents the command-line interface | RAM | Administrator can operate the device | Limited recovery environment or repeated reboot |
POST and Hardware Diagnostics
POST means Power-On Self-Test. It is an early diagnostic process performed after power is applied and before normal IOS operation. POST checks enough of the CPU, memory, interfaces, and other critical components to determine whether startup can continue.
A failed diagnostic can stop the boot sequence before IOS is available. Use a console connection to capture messages, and observe status LEDs when console output is unavailable or incomplete. A hardware failure should not be treated as an IOS or configuration problem until POST results have been considered.
Bootstrap, Boot Loader, and ROMMON
Bootstrap code is low-level startup firmware. Its job is to initialize the device sufficiently to locate and start the network operating system.
A boot loader is a low-level environment that can locate an IOS image, select a boot target, inspect storage, and perform recovery tasks. On many routers, the recovery environment is called ROMMON, short for ROM Monitor.
Normal booting transfers control from the bootstrap or boot loader to IOS. Recovery booting stops in the boot loader or ROMMON instead, usually because no usable image can be loaded or because a boot setting explicitly requests recovery behavior. From that environment, a technician may inspect flash, select another image, or use a supported recovery-transfer method.
IOS Image Discovery and Loading
Flash is the normal location for a Cisco IOS image. The device may use one or more configured boot system statements, a platform boot variable, or a default search sequence. Boot settings can contain a filename and a storage location such as flash:.
At a conceptual level, an IOS image can be stored in compressed form to reduce storage requirements. During startup, the device may decompress it while loading it into RAM. The image must be valid for the platform and compatible with available flash and RAM.
Fallback behavior depends on the platform and software release. A device may try another configured local image, search another supported local location, use network-based image retrieval when it is supported and configured, or enter ROMMON when no image can be loaded.
Router-Oriented Boot Configuration
configure terminal
boot system flash:<ios-image-filename>
end
copy running-config startup-configUse the exact filename shown by dir flash: or show flash:. Confirm platform compatibility before changing a boot target.
Configuration Register and Boot Modes
The configuration register is a hexadecimal boot-control value used especially on Cisco routers. Its fields influence how the device loads IOS and whether it reads the startup configuration.
| Value | Typical Use | Startup-Config Behavior | Boot Result | Administrative Caution |
|---|---|---|---|---|
0x2102 | Normal operation | Reads the saved configuration | Normal IOS boot and configuration loading | Common normal setting; verify the value on the specific platform |
0x2142 | Password-recovery workflow | Bypasses the saved configuration during startup | IOS can start without applying the saved passwords and settings | Use only with authorization, then restore normal behavior |
| Boot field set for ROMMON entry | Recovery or diagnostic startup | Configuration behavior depends on the remaining register fields | Device enters ROMMON instead of normal IOS boot | Do not change boot fields permanently without a recovery plan |
The exact interpretation of register fields is platform-dependent, but the CCNA-level distinction is important: normal boot behavior uses a value such as 0x2102, while 0x2142 is commonly used to bypass startup-config during an authorized password-recovery process. Verify both the active and next-reload values before making permanent changes.
Setting Normal Router Behavior
configure terminal
config-register 0x2102
end
copy running-config startup-config
reloadThe changed register value normally takes effect after a reload. A reload interrupts service, so confirm the maintenance plan and console or remote-access path first.
Temporarily Bypassing Startup Configuration
configure terminal
config-register 0x2142
end
reloadThis setting causes an applicable router to start without applying startup-config. After the authorized recovery work, restore the normal register value, merge or restore the intended configuration, save it, and reload if required.
Startup-Config and Running-Config
startup-config is the saved configuration read during a normal boot. running-config is the active configuration currently held in RAM and used by IOS.
During normal initialization, IOS copies startup-config into RAM and uses it as running-config. If startup-config is absent, erased, unreadable, or intentionally bypassed, IOS can still load while the expected configuration does not. Interfaces, routing protocols, local accounts, and management settings may therefore be absent.
show startup-config
show running-configCompare the two outputs when diagnosing unexpected startup behavior. To preserve intentional running-configuration changes, save them with copy running-config startup-config.
Setup Mode and First-Time Startup
When IOS loads successfully but no usable startup configuration is found, the device may display an initial configuration dialog, commonly called setup mode. It asks a series of questions to create a basic configuration.
Administrators commonly decline the dialog and configure the device deliberately from the CLI. This gives better control over naming, passwords, interfaces, management access, routing, and saved configuration. Setup behavior can vary by platform and IOS release, so the exact prompts are not universal.
Cisco Switch Boot Sequence
A switch follows the same broad logical order: POST, boot loader execution, IOS image selection, IOS startup, and configuration loading. The difference is that switch families may use platform-specific boot loaders, image variables, package files, or install-mode mechanisms.
Do not assume every Catalyst family uses identical commands or file formats. Some platforms boot a single image directly, while others use package files and an install procedure that establishes the boot target. The conceptual sequence remains the same, but storage conventions, boot variables, recovery commands, and image-management steps differ.
| Boot Function | Router Treatment | Switch Treatment | Platform-Specific Notes |
|---|---|---|---|
| Hardware diagnostics | POST checks critical router hardware | POST checks critical switch hardware | Console messages and LEDs vary |
| Low-level startup | Bootstrap and boot loader start image discovery | Platform boot loader starts image discovery | Names and available commands differ |
| Image selection | boot system statements and local flash are common | Boot variables, image variables, or package settings may be used | Inspect the platform's active boot settings |
| IOS loading | Image loads into RAM and starts | Image or package set starts according to platform mode | Bundle and install modes are not interchangeable |
| Configuration loading | Saved configuration is applied | Saved configuration is applied | Storage implementation may differ from classic NVRAM |
Boot Sequence Verification
Use show commands on an operational device to establish what should happen at the next reload and what happened during the current startup.
show version
show boot
dir flash:
show flash:
show running-config | include boot
show startup-config
show running-configshow versionidentifies the running IOS image and commonly displays the configuration-register setting.show bootdisplays boot variables or boot targets on many platforms.dir flash:andshow flash:list files so you can verify that the expected image exists.show running-config | include bootreveals configuredboot systemstatements where applicable.show startup-configconfirms whether a saved configuration is available.- Console output during reload can confirm the selected image, decompression, configuration loading, and any recovery prompt.
Exact command output varies by platform and IOS release. Record the current image, boot target, flash contents, startup configuration status, and register value before making changes.
Practical Examples
Example: Normal Router Startup
Power is applied, POST verifies the hardware, and ROM bootstrap code begins image discovery. A configured boot instruction points to an IOS image in flash. The image is loaded and decompressed into RAM. IOS then reads startup-config from NVRAM and applies it as running-config. After initialization, the administrator receives the IOS CLI prompt with the saved hostname, interfaces, passwords, and other settings.
Example: First Boot With No Saved Configuration
A router passes POST and loads IOS, but startup-config does not exist. IOS may offer the initial configuration dialog. The administrator can decline setup mode and use the CLI, then save the completed configuration as startup-config.
Example: Password-Recovery Preparation
On an applicable router, an authorized technician uses config-register 0x2142 and reloads. IOS starts without applying startup-config, allowing recovery work without immediately enforcing the saved credentials. Afterward, the technician restores the normal value, typically 0x2102, and saves the configuration.
Example: Missing IOS Image
If flash contains no valid compatible image, the device may stop at a boot loader or ROMMON prompt. The decision process is to inspect storage, verify boot instructions, obtain or restore a supported image using an available recovery method, and return the device to normal boot behavior.
Example: Incorrect Boot Target
A boot instruction may reference a filename that was removed or changed during an upgrade. Compare the configured filename with the actual output of dir flash:. Correct the boot instruction to reference a valid compatible image and save the configuration.
Common Boot Failures and Recovery Concepts
| Symptom | Likely Cause | Verification Method | Recovery Direction |
|---|---|---|---|
| Device stops at ROMMON or boot loader prompt | No usable image, invalid boot target, recovery boot setting, corrupt or unsupported image | Inspect storage, boot variables, boot system statements, register, and image compatibility | Correct the target or restore a valid supported image, then return to normal boot settings |
| IOS loads but expected configuration is absent | Missing or unsaved startup-config, bypass register setting, or unreadable saved storage | Compare startup and running configurations; inspect the register and console messages | Restore or create the intended startup-config and set normal startup behavior |
| Device repeatedly requests a nonexistent file | Stale boot system statement or incorrect boot variable | Compare configured filenames with the flash directory | Update the boot instruction to a valid image and save it |
| Upgrade prevents normal boot | Incomplete copy, incompatible image, insufficient resources, or missing install-mode procedure | Verify image integrity, platform support, storage, RAM, and package settings | Use a supported image and the correct platform-specific installation procedure |
| No useful early console output or hardware fault LEDs | Power, console, or hardware/POST problem | Check cabling, power, console settings, LEDs, and POST messages | Resolve the physical or hardware issue before IOS troubleshooting |
Console access is foundational for boot troubleshooting because network access may not exist before IOS and its configuration have loaded. Recovery commands and transfer methods differ by platform, so use the device-specific procedure and preserve a known-good image whenever possible.
Router-versus-Switch Troubleshooting Rules
- The logical stages are comparable, but commands are not universally interchangeable.
- Router configuration-register behavior, including
0x2102and0x2142, is primarily discussed for applicable router platforms. - Switches may use boot variables, package files, or install-mode settings instead of classic router-style
boot systemcommands. - Storage names, image formats, package requirements, and recovery environments vary by platform and release.
- Always identify the exact hardware family and software mode before applying a recovery or upgrade command.
Exam-Relevant Notes
- POST is an early hardware diagnostic, not the IOS loading step.
- Bootstrap and boot loader code start the process of finding an IOS image; IOS is the network operating system.
- Flash commonly stores IOS images, NVRAM traditionally stores startup-config, and RAM stores running IOS and running-config.
- Normal startup copies startup-config into RAM as running-config.
0x2102is the common normal router configuration-register value;0x2142bypasses startup-config for password recovery on applicable routers.- A device can load IOS successfully and still operate without its intended configuration.
- A ROMMON prompt generally indicates that normal IOS booting did not complete or that recovery behavior was selected.