VLAN Database – What / where it is, and how to reset it if needed!


Above will be the new Topology going forward, however I wanted take a quick look at deleting the VLAN Database to “wipe the slate clean” on the switch lab, and how exactly to delete it!


What does not work to delete the VLAN Database, and what does


I did a “wr er” / “reload” on SW1 / 2 / 3, and this is what I got on SW1 after I configured a host name on it I found the following configuration while everything else was wiped:

SW1#sh vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa1/0/2, Fa1/0/3, Fa1/0/4
Fa1/0/5, Fa1/0/6, Fa1/0/7
Fa1/0/8, Fa1/0/9, Fa1/0/10
Fa1/0/11, Fa1/0/12, Fa1/0/13
Fa1/0/14, Fa1/0/15, Fa1/0/16
Fa1/0/17, Fa1/0/18, Fa1/0/19
Fa1/0/20, Fa1/0/21, Fa1/0/22
Fa1/0/23, Fa1/0/24, Gi1/0/1
12 VLAN0012 active Fa1/0/1
24 VLAN0024 active
34 VLAN0034 active
300 VLAN0300 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

The reason VLANs won’t go away with a “write erase” is because VLAN Database is located in a separate file from the running and startup config (which are located in NVRAM), the VLAN Database file is stored in Flash Memory.

So to reset a switch, you will do a “write erase”, however you will also need to perform an additional command, demonstrated here with a verification command included:

Verifying file location

SW1#sh flash

Directory of flash:/

2 drwx 512 Mar 1 1993 00:10:05 +00:00 c3750-ipservicesk9-mz.150-2.SE9
528 -rwx 109 Mar 1 1993 00:23:50 +00:00 info
529 -rwx 1919 Mar 1 1993 00:02:33 +00:00 private-config.text
531 -rwx 796 Mar 1 1993 00:04:43 +00:00 vlan.dat
532 -rwx 5144 Mar 1 1993 00:02:33 +00:00 multiple-fs
533 -rwx 1690 Mar 1 1993 00:02:33 +00:00 config.text

27998208 bytes total (5272576 bytes free)

Deleting the running config AND the VLAN Database with a reload at the end

SW1#wr er
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
Erase of nvram: complete
SW1#delete flash:vlan.dat
SW1#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:/vlan.dat? [confirm]

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

I highlighted at the bottom of this the yes/no option for the config modified save question, as “no” is used to reload to a fresh running config while “yes” will save the running config before the reload thereby cancelling out the “wr er”.

I’ve highlighted in red the command issued to actually delete the vlan.dat file, as well as highlighting in blue how the confirm message displays it, as this can cause for confusion (as I’ve read on forums) as to the actual command as the confirmation adds a “/” in the command.

So to be clear if asked on exam day, the syntax of the command to delete actually any file in flash memory is “delete flash:(filename.ext)”, as shown above to view the exact file name to enter you can find it using “show flash” to view the contents.

That wraps that quick mention up, onward and upward!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s