Langsung ke konten utama

CCNA / CCNP Home Lab Tutorial: The VLAN.DAT File

CCNA and CCNP candidates who have their own Cisco home labs often email me about an odd situation that occurs when they erase a switch's configuration.  Their startup configuration is gone, as they expect, but the VLAN and VTP information is still there!

Sounds strange, doesn't it?   Let's look at an example.  On SW1, we run show vlan brief and see in this abbreviated output that there are three additional vlans in use:

SW1#show vlan br


10   VLAN0010                         active

20   VLAN0020                         active

30   VLAN0030                         active

We want to totally erase the router's startup configuration, so we use the write erase command, confirm it, and reload without saving the running config:

SW1#write erase

Erasing the nvram filesystem will remove all configuration files! Continue? 

[confirm]

[OK]

Erase of nvram: complete


00:06:00: %SYS-7-NV_BLOCK_INIT: Initalized the geometry of nvram

SW1#reload

System configuration has been modified. Save? [yes/no]: n

Proceed with reload? [confirm]

The router reloads, and after exiting setup mode, we run show vlan brief again.  And even though the startup configuration was erased, the vlans are still there!

Switch#show vlan br


10   VLAN0010                         active

20   VLAN0020                         active

30   VLAN0030                         active

The reason is that this vlan and VTP information is actually kept in the VLAN.DAT file in Flash memory, and the contents of Flash are kept on a reload.  The file has to be deleted manually.

There's a little trick to deleting this file.  The switch will prompt you twice to ask if you really want to get rid of this file. Don't type "y" or "yes"; just accept the defaults by hitting the return key.  If you type "y", the router attempts to delete a file named "y", as shown here:

Switch#delete vlan.dat

Delete filename [vlan.dat]? y

Delete flash:y? [confirm]

%Error deleting flash:y (No such file or directory)



Switch#delete vlan.dat

Delete filename [vlan.dat]?

Delete flash:vlan.dat? [confirm]


Switch#

The best way to prepare for CCNA and CCNP exam success is by working on real Cisco equipment, and by performing lab tasks over and over.  Repetition is the mother of skill, and by truly erasing your VLAN and VTP information by deleting the vlan.dat file from Flash, you'll be building your Cisco skills to the point where your CCNA and CCNP exam success is a certainty.

Komentar

Postingan populer dari blog ini

CCNA Certification Exam Tutorial: Cisco Switching Modes

To pass the CCNA exam and earn this important certification, you’ve got to know switching inside and out.  While you’re learning all the basic switching theory, make sure to spend some time with the one of three switching modes Cisco routers can use. Store-and-Forward is exactly what it sounds like.  The entire frame will be stored before it is forwarded.  This mode allows for the greatest amount of error checking, since a CRC (Cyclical Redundancy Check) is run against the frame before it is forwarded.  If the frame contains an error, it is discarded.  If there’s no problem with the frame, the frame is then forwarded to its proper destination. While store-and-forward does perform error checking, the delay in processing the frame while this error check is run results in higher latency than the other modes you’re about to read about.  The latency time can also vary, since not all frames are the same size. Cut-through switching copies only the d...

CCNA / CCNP Home Lab Tutorial: Assembling Your Cisco Home Lab

A CCNA or CCNP candidate who wants to be totally prepared for their exams is going to put together a home lab to practice on.  With used Cisco routers and switches more affordable and plentiful then ever before, there's really no excuse to not have one! With the many different models available, there is some understandable confusion among future CCNAs and CCNPs about which routers to buy and which ones to avoid.  You can take almost any set of Cisco routers and put together a home lab; part of the learning process is taking what equipment you have available and putting together your own lab!  For those of you preparing to start your home lab or add to your existing one, this article will list the routers I use in my Cisco pods.  You certainly don't have to have all this equipment, but this will give you some good ideas on how to get started. The most versatile router you can get for your CCNA / CCNP home lab is a 2520.  These routers come with four seri...