CCNP Switch Lab 1 -1 , Clearing a Switch

CCNP Switch: Lab 1 -1 , Clearing a Switch



  • Clear the configuration of a standalone switch to prepare it for a new lab.


When working with a switch that has been previously configured, any new commands entered will be merged with the existing configuration, causing unpredictable results. In this lab you prepare a Catalyst 2960 or 3560 switch for use with a lab. This is accomplished by erasing the startup configuration from NVRAM and deleting the VLAN database.

Note: This lab uses the Cisco WS-C2960-24TT-L switch with the Cisco IOS image c2960-lanbasek9-mz.122- 46.SE.bin and the Catalyst 3560-24PS switch with the Cisco IOS image c3560-advipservicesk9-mz.122- 46.SE.bin. Other switches (such as a 2950 or a 3550), and Cisco IOS Software versions can be used if they have comparable capabilities and features. Depending on the switch model and Cisco IOS Software version, the commands available and output produced might vary from what is shown in this lab.

Required Resources

You may use one of the following switches or a comparable one with this lab:

  • Cisco 2960 with the Cisco IOS Release 12.2(46)SE C2960-LANBASEK9-M image or comparable
  • Cisco 3560 with the Cisco IOS Release 12.2(46)SE C3560-ADVIPSERVICESK9-M image or comparable
  • Console cable

All contents are Copyright © 1992–2010 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 2 of 5

Step 1: Connect to the switch console port and enter privileged EXEC mode.

From a computer running a terminal emulation program, connect to the console port of the switch that you want to clear using a console cable. You should see a console prompt that includes the switch’s hostname, followed by a > or #. The default switch hostname is “Switch.”

Step 2: Delete the VLAN database file.

In privileged EXEC mode, type delete flash:vlan.dat and press Enter. If you are asked to confirm, press Enter until you are back to the original prompt.

Step 3: Erase the startup config from NVRAM.

After deleting the vlan.dat file, you can erase the startup configuration on the switch by typing erase startupconfig. You again have to press Enter to confirm.

Step 4: Reload the device, but do not save the system configuration if prompted.

After clearing the switch configuration, reload the switch by typing reload and pressing Enter. If you are asked whether to save the current configuration, answer no. Press Enter to confirm. The switch starts reloading. Your output might look different depending on the switch model that you are using. This step might take a few minutes, because the switch needs time to reload.
Switch# reload

System configuration has been modified. Save? [yes/no]: no
Proceed with reload? [confirm]

%SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload command.
Base ethernet MAC Address: 00:1b:0c:6d:8f:00
Xmodem file system is available.
The password-recovery mechanism is enabled.

Step 5: When the switch restarts, do not enter the initial configuration dialog, but terminate autoinstall.

The switch might log messages to the console, such as interfaces coming up and down. When you see the
“Press RETURN to get started!” prompt, press Enter.

If you are asked to enter an initial configuration dialog, type no. This places you at the user EXEC prompt. If
you accidentally type yes, you can break out of the initial configuration dialog at any time by pressing Ctrl-C. If
you are asked whether you want to terminate autoinstall, press Enter for “yes.”
Press RETURN to get started! Enter

— System Configuration Dialog —
Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]: Enter

More Resources

About the author


Leave a Comment