VLAN Database Lost When Restarting? - Saving VLAN.dat To NVRam
Written by LBSources from http://www.gns3-labs.com on November 30th, 2008 | 8 CommentsCame across a post online that I thought would help those who have been through the problem and upset of losing VLAN configurations once a router in GNS3 or Dynamips is reloaded. This post explains how to prevent this from happening.
ok, when you restart your Router or you turn off the GNS3, the VLAN configuration is missing, why? Because all the VLAN information is save to file vlan.dat. Yes, you know that already.
So, this is the step to save the configuration :
K-ROUTER#erase flash
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device… eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee …erased
Erase of flash: complete
K-ROUTER#squeeze flash:
Squeeze operation may take a while. Continue? [confirm]
squeeze in progress…
Squeeze of flash complete
K-ROUTER#conf t
Enter configuration commands, one per line. End with CNTL/Z.
K-ROUTER(config)#vtp file nvram:vlan.dat
Setting device to store VLAN database at filename nvram:vlan.dat.
K-ROUTER(config)#do dir nvram:
Directory of nvram:/
124 -rw- 0 startup-config
125 —- 0 private-config
1 -rw- 600 vlan.dat
129016 bytes total (127940 bytes free)
K-ROUTER(config)#
K-ROUTER(config)#do wr mem
Building configuration…
[OK]
ok, after that you can configure your vlan, vtp without worrying will lost the information.
Credit to the original blog where I found this: GNS3 : Saving VLAN Information
Enjoy ..
LBS
7,757 views









December 11th, 2008 at 3:57 pm
when i save gns3 routers toplogy , and load it again ,i lost the all configration.
how can i solve this problm?
December 11th, 2008 at 4:01 pm
@elsayed make sure you have a working directory specified and use “copy running-config startup-config” often. Or create a new Project from the package provided. That will create a working directory for you specific to the topology. You should though always save your configs often.
December 21st, 2008 at 9:12 am
wow now i can add more vlan….
February 17th, 2009 at 6:36 am
Hi
I tried cisco switch images with Gnome. But none of them are working. i want to know does gnome supports switches,if so kindly send me the working image link for download. Thank you in Advance
February 18th, 2009 at 8:11 am
Hi
I am using GNS Live CD running on my laptop. I tried the above but it still erased all my VLANs. When the router reloads the VTP file command is still in my router config but the vlan.dat is not there when I issued the ‘dir nvram:’ command after the reload. Any ideas? Thanks in advance.
April 16th, 2009 at 10:26 pm
There is a simple way. Just uncheck “Automatically clean the work directory” in “Edit\Preferences\Dynamips”. By default it is enabled and once you close GNS3, your bootflash file is deleted. It is working for me and hope it works for you.
September 6th, 2009 at 10:53 am
I did all the above but did not work. So, I made a snapshot in addition to all that. I saved with “wr mem” and with “save” under GNS3 menu, exited then rebooted lab. It worked.
March 5th, 2010 at 2:02 pm
I still have problems with saving vlans data. I use compressed IOS image, “Automatically clean the work directory” is enabled, I used the command “vtp file nvram:vlan.dat”, I successfully export nvram and cfgs before closing gns and still when I reopen my lab, nvram shows only private and startup configs files, flash is empty and nowhere I can find vlan.dat file. Any ideas ppl?