VLAN Database Lost When Restarting? – Saving VLAN.dat To NVRam
Written by LBSources from http://www.gns3-labs.com on November 30th, 2008 | 21 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
20,390 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?
April 20th, 2010 at 8:03 am
HI,
I was able to set the vlan.dat file but it didnt do any good for me. I think that is not being saved in the flash because everytime I restart GNS3 I have to reconfigure my switch(es) again.
Extra question: do I need to have the same vlan.dat file on all other swichtes?
Is this happening because I’m using a SW16 Module on a router 2600 slot?
Thanks,
Kerb
May 7th, 2010 at 7:04 am
i want to make vlan through the help of gns how is it possible
July 28th, 2010 at 10:35 am
Thanks for the Post. This works for me: “Iraj
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. “
December 16th, 2010 at 3:05 pm
Helpful point of view. Keep it up.
February 21st, 2011 at 5:17 pm
Offering Leading Communication Software platforms for all needs!
Including but not limited to. Web design by Award winning WebMaster.
Marketing, VOIP Software And somuch more!
April 5th, 2011 at 11:14 am
your blog is very interesting
May 15th, 2011 at 8:51 pm
thank you for info
July 18th, 2011 at 1:30 am
Jual DVD copy original text Indo bagus :
1. Satuan Barat
2. Satuan Asia
3. Horror / Thriller
4. Seri Barat
5. Seri Korea
6. Seri Jepang
7. Seri Taiwan
8. Anak 2x / Animasi
Untuk detail film, synopsis & Trailler kunjungi :
Http://dpirates.com
August 19th, 2011 at 12:05 am
Diễn đàn nhà đất,diễn đàn bất động sản, thảo luận đầu tư bất động sản như thế nào để có lợi nhất,bán,nhà,cho thuê nhà,bán đất,chuyển nhượng,2nhadat.vn
October 20th, 2011 at 10:57 pm
This is very interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your wonderful post.My blog is same Topic with Your
October 27th, 2011 at 1:24 am
Hello, Hi, Hey, great article, post, blog, I, we love, like, loved, liked it !!!
November 29th, 2011 at 6:00 am
This does work,
Is it for a specific model or firmware but even after doing this everytime I reload i have to rebuild the VLANS.
November 29th, 2011 at 6:01 am
Sorry meant it doesnt work