Clearing A Switch Cisco
Clearing A Switch Cisco
Topology
Objective
Background
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.12246.SE.bin and the Catalyst 3560-24PS switch with the Cisco IOS image c3560-advipservicesk9-mz.12246.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
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 switchs hostname,
followed by a > or #. The default switch hostname is Switch.
Switch>
or
Switch#
If the prompt ends with a >, you are not in privileged EXEC mode. To enter privileged EXEC mode, type
enable. This might require a password. If you are in a configuration mode, type exit or end.
If not enabled:
Switch> enable
Switch#
If in global configuration mode:
Switch(config)# exit
Switch#
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.
Initializing Flash...
flashfs[0]: 606 files, 20 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 10336256
flashfs[0]: Bytes available: 22177792
flashfs[0]: flashfs fsck took 10 seconds.
...done Initializing Flash.
Boot Sector Filesystem (bs) installed, fsid: 3
done.
Loading "flash:/c2960-lanbase-mz.122-46.SE/c2960-lanbasek9-mz.122-46.SE.bin"..
.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Initializing flashfs...
flashfs[1]:
flashfs[1]:
flashfs[1]:
flashfs[1]:
flashfs[1]:
flashfs[1]:
flashfs[1]:
:
:
:
:
:
:
:
:
:
:
:
:
:
73-10390-03
341-0097-02
FOC11036013
AZS1103015V
B0
C0
WS-C2960-24TT-L
FOC1104W0G0
800-27221-02
C0
V02
COM3L00BRA
0x01
SW Version
---------12.2(46)SE
SW Image
---------C2960-LANBASEK9-M
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