Thursday, June 21, 2012

Router Boot Order of Operations

Booting up the Router
Cisco routers can boot Cisco IOS software from

1. Flash memory
2. TFTP server 
3. ROM (not full Cisco IOS) 

Normally its booted from Flash RAM. But if it fails, it trys to load IOS from tftp server.
If this also fails, it boots a "small" ios which is in ROM.


Default boot sequence for Cisco IOS software:

img89.imageshack.us/my.php?image=routerboot3wi.jpg

Posted Image

1. NVRAM (check config-register)
2. FLASH (load IOS)
3. TFTP (boot IOS from tftp if FLASH fails)
4. ROM (If TFTP fails, load "mini" IOS from ROM


Booting up the router and locating the Cisco IOS

1. POST (power on self test)
2. Bootstrap code executed 

3. Check Configuration Register value (NVRAM) which can be modified using the config-register command 

0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = startup-config in NVRAM 

4. Startup-config file: Check for boot system commands (NVRAM) 
If boot system commands in startup-config
a. Run boot system commands in order they appear in startup-config to locate the IOS 
b. [If boot system commands fail, use default fallback sequence to locate the IOS (Flash, TFTP, ROM)?] 

If no boot system commands in startup-config use the default fallback sequence in locating the IOS:
a. Flash (sequential) 
b. TFTP server (netboot) 
c. ROM (partial IOS) or keep retrying TFTP depending upon router model 

5. If IOS is loaded, but there is no startup-config file, the router will use the default fallback sequence for locating the IOS and then it will enter setup mode or the setup dialogue. 
6. If no IOS can be loaded, the router will get the partial IOS version from ROM

Default (normal) Boot Sequence

Power on Router - Router does POST - Bootstrap starts IOS load - Check configuration register
to see what mode the router should boot up in (usually 0x2102 to read startup-config in NVRAM / or 0x2142 to start in "setup-mode") - check the startup-config file in NVRAM for boot-system commands - load IOS from Flash.

Boot System Commands

Router(config)# boot system flash IOS filename   - boot from FLASH memory
Router(config)# boot system tftp IOS filename tftp server ip address   - boot from a TFTP server
Router(config)# boot system rom   - boot from system ROM 

No comments: