vlan.dat location in Dynamips

Well – just began my CCIE SP study in earnest today – after almost a year of procrastination!

I got a dedicated Ubuntu box, and run Dynamips there. GNS3 is running on my Mac, leaving the dedicated machine doing the hard work.

As you probably know, you can’t simulate a Catalyst 3550 in Dynamips. The best you can do is to use the built-in “ethernet switch” (which you can’t log into) or use an NM-16ESW in a router as an ethernet switch.

This leads to an additional problem. The ethernet switch module uses the old method of storing VLAN information – i.e. the ‘vlan.dat’ file. The VLANs need to be created in a special VLAN mode that you enter by typing ‘vlan database’. You create the VLANs there, and when you exit, the database of VLANs is stored in the vlan.dat file, which by default, resides in flash:.

With a 3640 in my lab, I was getting the following when creating a VLAN in this mode:

You can’t squeeze the flash without erasing it. I’ve got my base config there (stored using the command ‘copy running-config SW2-R8Base’) which I use every time I reset my pod. So I copy that to nvram: and then erase/squeeze the flash: filesystem:

Some postings on the Internet say that flash: isn’t emulated as a persistent filesystem, so when you reboot, you may find your VLANs are no longer there. However this does not appear to be the case any more – at least not with the combination of things I am running. So long as I save my config before rebooting, vlan.dat is still in flash: after the reboot, and the VLANs show up when typing ‘show vlan-switch’.