(config = configuration)
The router config is a file that is stored in memory. It is not the IOS (Internetwork Operating System). The IOS is the operatinng system of the router, whereas the config is a set of text-based commands that define how the router operates. There are two types of configurations:
startup config – this is the initial config that is stored in the NVRAM, and is refreshed when the router is rebooted
running config - the current configuration of the router, stored in DRAM. You may have just changed several options and they would then become part of the running config
*** all the following commands for working with config files are done in priviledged mode, not in config mode. This is counter-intuitive but true. The config mode is actually only a temporary gateway mode to get to extended modes. Very little can be done in the config mode.
to view the configs :
sh running-config or sh run
sh startup-config or sh start
Save the running Config to NVRAM :
Copy run start - copies the “run start” config (the startup config) to NVRAM
- this is short for “copy running-config startup-config”
CAUTION: do not type “copy start run” – it will blow away all your hard work that you did to configure the router !!! This is a common error.
write erase - older command - does the same thing as erase startup-config
erase start -
short for “erase startup-config”, removes the config from NVRAM
NOTE: the only need for this would be a corrupt startup-config
I (2500 series)
reset (2600 series)
reload (unsure about this) - erases the startup config, and reload the router, you will get an error upon “show startup-config”, until you “copy run start”
NOTE – merge vs replace: Copy to run (DRAM, the running-config file) merges the text files (copy start run or copy tftp run would do this) – it appends the copied file to the end of the commands already in the run file. Copy to NVRAM or TFTP does a normal copy where the file is replaced (such as copy run start).
The most common method of setting up a large network and keeping numerous config files available for copying, is to store them on a TFTP (Trivial FTP) server.
The syntax is: copy from to
Example: copy start run - copies (appends) startup config (NVRAM) to running config (DRAM)
Example: copy tftp start run - copies (appends) the tftp starup file to the DRAM running config info