VTP_Top_1

Above will be the new Topology going forward, however we’re going to take a look at deleting the VLAN Database to “wipe the slate clean” on the lab when moving between subjects that I had completely forgotten about.

So 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:

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
Gi1/0/2
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
SW1#

I advise to always start with a quick “sh vlan brief” to make sure your good before any troubleshooting or configuration, just to get a lay of the land.

The reason VLANs won’t go away with a write erase is because a file resides in Flash memory called vlan.dat, which is also called the VLAN Database, and if we do not delete that with the write erase the switch will recreate those VLANs upon booting up even though it will appear to be a fresh out of the box switch until you look at “sh vlan brief”.

So let’s get rid of that sucker:

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)
SW1#

So I am going to “wr er” again and also delete that database, and give this another reload so we get a totally fresh start:

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

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

Do not ever answer “yes” to that System modified … Save? question, because it will Save the running config as it’s startup config, that you just erased with the “wr er” command.

It’s kind of funny to me the startup config has a simple confirm or “hit enter” once and its done for, however deleting the “vlan.dat” asks you twice, and in two different formats, which bring me actually into the reason I highlighted the output of deleting the file.

VERY IMPORTANT DETAIL HERE I SEE A LOT OF PEOPLE SLIP UP ON!

I have read a lot of people getting stuck trying to issue the command “delete flash:/vlan.dat” and not getting why it is not working, and it’s because it’s the wrong command – The correct command to delete ANY file out of flash is “delete flash:(filename)” and confirm twice.

I assume people think that is the correct format because of the Header of “sh flash” has the / in it as well as the second confirmation “Delete file flash:/vlan.dat?”

Don’t be one of those people, it is “delete flash:filename.extension” to delete anything out of flash, this is actually how upgrades can be performed on the CLI by placing the upgraded IOS in flash and booting into that, then deleting the old IOS image from Flash.

It’s a lost art due to the GUI’s people use now and how fun TFTP is from a PC to an IOS device, but to drive the point home, from User Exec prompt “delete flash:(file)”.

I wanted to start VTP intro with some configuration tonight, but overlooking that little niche with the vlan.dat set back my schedule enough that I need to sleep before work.

Happy Friday!!!