Article

avatar

VLAN Database Lost When Restarting? – Saving VLAN.dat To NVRam

Written by LBSources from http://www.gns3-labs.com on November 30th, 2008 | 21 Comments

Came 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

Tags: ,

21 Responses to “VLAN Database Lost When Restarting? – Saving VLAN.dat To NVRam”

  1. avatar elsayed

    when i save gns3 routers toplogy , and load it again ,i lost the all configration.
    how can i solve this problm?

  2. avatar LBSources

    @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.

  3. avatar Baim

    wow now i can add more vlan….

  4. avatar joy

    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

  5. avatar Jallebi

    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.

  6. avatar Iraj

    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.

  7. avatar wassim

    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.

  8. avatar Peter

    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?

  9. avatar Kerb

    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

  10. avatar abbas

    i want to make vlan through the help of gns how is it possible

  11. avatar pkaione

    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. “

  12. avatar Pust

    Helpful point of view. Keep it up.

  13. avatar Bucciero

    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!

  14. avatar Lichliter

    your blog is very interesting

  15. avatar Raap

    thank you for info

  16. avatar Pitney

    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

  17. avatar Aldrich

    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

  18. avatar Paino

    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

  19. avatar Zeigler

    Hello, Hi, Hey, great article, post, blog, I, we love, like, loved, liked it !!!

  20. avatar Andy

    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.

  21. avatar Andy

    Sorry meant it doesnt work :-(

Leave a Reply



Subscribe To GNS3-Labs

Subscribe to GNS3 Labs :: Cisco Router Simulator Network Topologies


Show Love!

If you would like to donate for the time it takes to do all of this, feel free to use the link below. Thank you in advance for any contribution you make :)

Categories