CCNP Switch Lab 1-2, Clearing a Switch Connected to a Larger Network

CCNP Switch Lab 1-2, Clearing a Switch Connected to a Larger Network

Topology
ccnp-switch-lab-clearing-switch-connected-larger-network
Objective

  • Clear the configuration of a switch that is connected to other switches and prepare it for a new lab.

Background

When working with a switch that has been previously configured, any new commands entered are merged with the existing configuration, causing unpredictable results. Additionally, if the switch is connected to other switches in the network, you can remove the VLANs but they might be relearned from another switch via VTP. In this lab, you prepare a Catalyst 2960 or 3560 switch for use with a lab by erasing the startup configuration from NVRAM and deleting the VLAN database. You also ensure that VLANs will not be relearned from another switch after the VLAN database has been deleted.

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. You can use other switches (such as a 2950 or a 3550) and Cisco IOS Software versions 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

  • 2 switches (Cisco 2960 with the Cisco IOS Release 12.2(46)SE C2960-LANBASEK9-M image or comparable)
  • 2 switches (Cisco 3560 with the Cisco IOS Release 12.2(46)SE C3560-ADVIPSERVICESK9-M image or comparable)
  • Console and Ethernet cables

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

This lab assumes that you have completed Lab 1 -1, Clearing a Switch.

Step 2: Delete the VLAN database file.

In privileged EXEC mode, type delete 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Ā startup-config. You again have to press Enter to confirm. Reload the switch.

Step 4: Display the existing configured VLANs.

The difficulty with clearing a switch that is cabled to other switches is removing the VLANs. When the switch is finished reloading, it is possible for it to relearn VLANs from another connected switch that is in VTP server or client mode. To

determine if the VLANs have been relearned, use the show vlan command.

ccnp-switch-lab-clearing-switch-connected-larger-network-1

In this sample output, the switch has not learned any VLANs from another switch. You are finished clearing both the configuration and VLANs from the switch.

However, if the show vlan command displays nondefault VLANs after you have deleted the vlan.dat file, your switch has learned the VLANs dynamically from another switch. For example:

ccnp-switch-lab-clearing-switch-connected-larger-network-2

Step 5: Shut down interfaces and remove the VLANs.

To eliminate these VLANS, shut down all interfaces and remove the existing VLANs.

ccnp-switch-lab-clearing-switch-connected-larger-network-3

Step 6: (Optional) Configure transparent VTP mode.

Now that both the startup configuration and the VLANs have been erased, you are ready to start a new lab. For interfaces that need to be up, use the no shutdown command in the new lab. If you want to do some configuration before the switch learns VLANs from the network, put it into VTP transparent mode until you are ready.

More Resources

About the author

Prasanna

Leave a Comment