So the first step, the router performs a power-on self-test or POST, then it loads and runs the bootstrap
code,
thirdly, it finds the Cisco iOS software.
So the bootstrap code determines where the Cisco iOS software is that should be run.
Normally this is located in Flash memory but it could also be stored on a TFTP or FTP server.
The configuration register and the configuration file determine where Cisco iOS files are located and
which image file to use. If a Cisco iOS image cannot be located
a scaled-down version of the Cisco iOS is copied from ROM into RAM.
That only applies, however, to older versions of Cisco routers.
In the past, a mini operating system would be used, but today the router will boot into ROM monitor mode
if no Cisco iOS is available. After the bootstrap code is found, the correct image, it loads the image
into RAM and starts the Cisco iOS software.
Older routers used to run the operating system from flash and memory
but today, once again, the entire operating system is loaded into RAM.
Once the operating system is loaded, the router will find the configuration, which is typically stored
in NVRAM.
So to load the startup-config from NVRAM and then apply it to startup-config is loaded in RAM
and becomes the current or running-config on the router.
The running configuration of a router contains the IP addresses.
It determines which routing protocols need to be started, which passwords need to be configured and
other characteristics of the router.
If no configuration file exists, the router enters the setup utility or attempts an auto-install of a
configuration file from a TFTP server. The router then runs the configured iOS software.
Now it's important to remember that Cisco creates the iOS software.
You can't change that, but you can change how it's applied by changing the configuration on a router.
In the same way as with windows,
you can't change the Windows operating system, but you could change your desktop,
you could change the fonts and other options
in Windows. The Cisco iOS software can be manipulated through the configuration, so you may decide
to run the OSPF routing protocol on one router, but use EIGRP on another router.
Your configuration determines the behavior of the Cisco iOS on a router.
On this router as an example, the router does have a startup-config, so show startup-config shows us
the configuration of this router.
On this router we could erase the startup config.
So now the show startup command or show startup-config command shows us that there's no router configuration.
If we reload this router
it will boot with no configuration
and we should be prompted to enter the startup wizard.
On this router, which does have a startup-config,
so once again, shows start when we reload the router, it should boot with the startup configuration
applied as the running-config.
So this router doesn't have a startup config.
Where's this router on the left does have a startup-config.
So we should see the difference when they boot up.
We can see the routers trying to get a configuration from a TFTP server, so it's trying to boot and
retrieve a configuration.
So it's sending a broadcast looking for a network config.
This router is continuing to boot up
and notice, a configuration has been applied, the router has a name, and if we scroll up
we can see that various interfaces came up, but in this case, show run shows us that a configuration
has been applied.
So the configuration was copied from startup to running, whereas in this router the system configuration
dialogue starts up
and I pressed enter a few times and hence it was shown a few times
and then I broke out of the initial configuration dialogue
and notice in this case shows start shows us that there's no startup-config and the router has a default
configuration applied.
Now it did configure an IP address automatically on the serial interface using what's called slop.
That's why we were seeing this error where it was trying to connect to a TFTP server and download a network
config, as well as a Cisco net config file.
On some routers, when there's a serial interface, the router will automatically apply an IP address
based on the neighboring router to this interface and try and pull the config down from that neighboring
router.
This router, however, has a configuration so we can see OSPF has been enabled, there's a loopback
IP address, there's an IP address on the serial interface and any other configuration would have been
applied with this router that doesn't have a startup-config boots up.
No startup-config is applied and it uses a default config
and may do some automatic configuration or use automated methods to try and find a configuration, the
moral of the story is as follows.
If there's no sort of config, the router will typically boot up with some default values.
Such as having most interfaces shut down.
Whereas if a startup-config is available in the router that startup-config will be applied.