Saving VLAN.dat To NVRam

Saving VLAN.dat To NVRam – How to save VLAN.dat to different place – VLAN.dat redirection

Switch VLAN.dat managementSometimes it can happen to you that the VLAN Database is lost when the switch is restarted. This is especially often when working in the lab environment. To help cross this issue you can tell the switch to save the VLAN.dat file to NVRAM instead of storing it to Flash. By default on Cisco switches that are running Cisco IOS the Flash memory is a default place to store VLAN.dat

 

VLANs are saved to file VLAN.dat. With this commands we will prevent the loss of VLAN.dat :

Switch1#erase flash
 Erasing the flash filesystem will remove all files! Continue? [confirm]
 Erasing device… eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee …erased
 Erase of flash: complete
 Switch1#squeeze flash:
 Squeeze operation may take a while. Continue? [confirm]
 squeeze in progress…
 Squeeze of flash complete
 Switch1#conf t
 Enter configuration commands, one per line. End with CNTL/Z.
 Switch1(config)#vtp file nvram:vlan.dat
 Setting device to store VLAN database at filename nvram:vlan.dat.

With this command we have redirected the place for saving the VLAN.dat to NVRam.

Switch1(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)
Switch1(config)#
Switch1(config)#do wr mem
Building configuration…
[OK]

3 Comments

  1. khizer November 4, 2014
    • Valter Popeskic November 4, 2014
  2. Guy August 27, 2015

Leave a Reply