Configuration file management

The switch maintains two configuration files, the running-config file and the startup-config file.

Switch memory operation

Running Config File Startup-config File
Volatile Memory Flash (Non-Volatile Memory)
Controls switch operation. When the switch boots, the contents of this file are erased and replaced by the contents of the startup-config file. If no configuration changes have been made in the CLI since the switch was last booted, the running-config file is identical to the startup-config file. Preserves the most recently saved configuration through any subsequent reboot.
CLI configuration changes are written to this file. To use the CLI to save the latest version of the file to the startup-config file, you must execute the write memory command.  
*NOTE: Menu interface configuration changes are simultaneously written to both the running-config and the startup-config file.

Booting the switch replaces the current running-config file with a new running-config file that is an exact copy of the current startup-config file.


[NOTE: ]

NOTE: Any of the following actions boots the switch:

  • Executing the boot or the reload command in the CLI

  • Executing the boot command in the menu interface

  • Pressing the Reset button on the front of the switch

  • Removing, then restoring power to the switch

For more on reboots and the switch’s dual-flash images, See Using Primary and Secondary flash image options.


Options for saving a new configuration. Making one or more changes to the running-config file creates a new operating configuration. Saving a new configuration means to overwrite (replace) the current startup-config file with the current running-config file. This means that if the switch subsequently reboots for any reason, it will resume operation using the new configuration instead of the configuration previously defined in the startup-config file. There are three ways to save a new configuration:

  • In the CLI: Use the write memory command. This overwrites the current startup-config file with the contents of the current running-config file.

  • In the menu interface: Use the Save command. This overwrites both the running-config file and the startup-config file with the changes you have specified in the menu interface screen.

  • In the WebAgent: Click Save. This overwrites both the running-config file and the startup-config file with the changes you have specified in the WebAgent screen.

Note that using the CLI instead of the menu or WebAgent gives you the option of changing the running configuration without affecting the startup configuration. This allows you to test the change without making it "permanent". When you are satisfied that the change is satisfactory, you can make it permanent by executing the write memory command. For example, suppose that you use the following command to disable port 5:

switch(config)# interface ethernet 5 disable

The above command disables port 5 in the running-config file, but not in the startup-config file. Port 5 remains disabled only until the switch reboots. If you want port 5 to remain disabled through the next reboot, use write memory to save the current running-config file to the startup-config file in flash memory.

switch(config)# write memory

If you use the CLI to make a configuration change and then change from the CLI to the Menu interface without first using write memory to save the change to the startup-config file, then the switch prompts you to save the change. For example, if you use the CLI to create VLAN 20, and then select the menu interface, VLAN 20 is configured in the running-config file, but not in the startup-config file. In this case you will see:

switch(config)# vlan 20
switch(config)# menu
Do you want to save current configuration [y/n]?

If you type ‘y’, the switch overwrites the startup-config file with the running-config file, and your configuration change(s) will be preserved across reboots. If you type ‘n’, your configuration change(s) will remain only in the running-config file. In this case, if you do not subsequently save the running-config file, your unsaved configuration changes will be lost if the switch reboots for any reason.

Storage and retrieval of configuration files. You can store or retrieve a backup copy of the startup-config file on another device. For more information, see "Transferring Switch Configurations" in the Management and Configuration Guide for your switch.

USB autorun. This feature supports the ability to auto execute CLI commands stored on a USB flash drive (for example, to configure the switch, update software, retrieve diagnostics, etc.). For more information, see "Using USB to Download Switch Software" in the Management and Configuration Guidefor your switch.