2.3 VLANS

Deleting VLANS

VLANS can be easily deleted however, prior to deleting a VLAN, you should re-assign all member ports to a different VLAN first.

Any of the ports that are not shifted to an active VLAN will not be able to communicate with other hosts after the specified VLAN is deleted and until they are assigned to an active VLAN.


Deleting a VLAN

Command to delete a VLAN
S1(config)# no vlan [vlan-id]

Deleting the entire VLAN database

Unlike other configurations on a Cisco device, the normal range VLANs (1-1005) are not stored in the running configuration. Instead, they are stored in the switch flash memory in a database file called vlan.dat

If you wish to remove all the VLAN information at once and return to defaults, the entire vlan.dat file can be removed from the flash memory

Command to purge the entire VLAN database
S1(config)# delete flash:vlan.dat
or (abbreviated version)
S1(config)# delete vlan.dat

[NOTE] If you want to restore a Catalyst switch to default, you will need to use the delete vlan.dat command after executing the erase startup-config privileged EXEC mode command because the erase startup-config will not remove VLAN information