vlan.dat keeps coming back

martell1000martell1000 Member Posts: 389
hi everyone.

i am trying to delete the vlan.dat on a 2950 switch:
S4#dir
Directory of flash:/

2 -rwx 3719152 Apr 09 2008 23:18:33 +00:00 c2950-i6k2l2q4-mz.121-22.EA10a.bin
3 -rwx 616 Mar 01 1993 00:00:17 +00:00 vlan.dat
4 -rwx 335 Apr 10 2008 00:48:52 +00:00 env_vars
5 -rwx 1716 Mar 01 1993 00:01:16 +00:00 config.text
6 -rwx 24 Mar 01 1993 00:01:16 +00:00 private-config.text

7741440 bytes total (4017152 bytes free)
S4#delete vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
S4#dir
Directory of flash:/

2 -rwx 3719152 Apr 09 2008 23:18:33 +00:00 c2950-i6k2l2q4-mz.121-22.EA10a.bin
4 -rwx 335 Apr 10 2008 00:48:52 +00:00 env_vars
5 -rwx 1716 Mar 01 1993 00:01:16 +00:00 config.text
6 -rwx 24 Mar 01 1993 00:01:16 +00:00 private-config.text

7741440 bytes total (4018176 bytes free)
S4#

as you can see it is gone!

but after i reboot the switch:
S4#dir
Directory of flash:/

2 -rwx 3719152 Apr 09 2008 23:18:33 +00:00 c2950-i6k2l2q4-mz.121-22.EA10a.bin
3 -rwx 616 Mar 01 1993 00:00:17 +00:00 vlan.dat
4 -rwx 335 Apr 10 2008 00:48:52 +00:00 env_vars
5 -rwx 1716 Mar 01 1993 00:01:16 +00:00 config.text
6 -rwx 24 Mar 01 1993 00:01:16 +00:00 private-config.text

its back again...

switch is in transparent mode an the only device powered on in the lab - so no chance its learning it via vtp from somewhere...

am i missing something or am i just going crazy?
And then, I started a blog ...

Comments

  • ciscoman2012ciscoman2012 Member Posts: 313
    I would do a wr erase first and then reload the switch. If it prompts you to save do not. After, type delete flash:vlan.dat and reload.
  • martell1000martell1000 Member Posts: 389
    thank you, the wr erase seems to have done the trick.

    is this the only way to get rid of vlan.dat or is this some kind of "special case"?
    And then, I started a blog ...
  • ciscoman2012ciscoman2012 Member Posts: 313
    thank you, the wr erase seems to have done the trick.

    is this the only way to get rid of vlan.dat or is this some kind of "special case"?

    Honestly I'm not sure but I was going through the exact same thing you were about one week ago.

    I just wanted to delete vlan.dat file but it seemed it didn't want to do it unless I did a wr erase first and then reloaded.

    Weird.
  • martell1000martell1000 Member Posts: 389
    strange. will try it on another switch tomorrow.

    btw. just came across a nice tip while googeling:

    Easy Way to Quickly Remove VLANs « CCIE Pursuit Blog

    :D
    And then, I started a blog ...
  • alan2308alan2308 Member Posts: 1,854 ■■■■■■■■□□
    OK, so I've got a related question on this topic after reading this thread and poking around on my own 2950. In VTP Transparent mode, the switch is obviously writing a new vlan.dat to flash when it reloads. However, in VTP Transparent mode, the VLAN information is stored in the running-configuration. So what is the switch using vlan.dat for in VTP Transparent mode?

    It would be nice if vlan.dat was actually human readable. icon_cool.gif
  • martell1000martell1000 Member Posts: 389
    Troubleshooting VLAN Trunk Protocol (VTP) - Cisco Systems

    ok i guess the answers to all our questions are here ...
    And then, I started a blog ...
  • martell1000martell1000 Member Posts: 389
    from my understanding the file is created in transparent mode everytime the switch boots up just to have it there in case you change config over to server/client mode...

    there doesnt seem to be an actual use for the vlan.dat if the switch is in transparent mode.
    And then, I started a blog ...
  • xbuzzxbuzz Member Posts: 122
    from my understanding the file is created in transparent mode everytime the switch boots up just to have it there in case you change config over to server/client mode...

    there doesnt seem to be an actual use for the vlan.dat if the switch is in transparent mode.

    Read the link too, and I think you're right .dat file is just there ready to receive updates if the switch is changed to server/client mode.
  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    As far as I know, the transparent switch stores the vlan config in both run/start(if saved to startup) config as well as the vlan.dat file. The file doesn't go away because the configuration is still in the startup-config
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
Sign In or Register to comment.