Thursday, July 2, 2009

Write Erase - Remove VLANS

Another common question I see from people setting up a Cisco lab for their CCNA is...

"I did a write erase on the switch but the old vlans are still there. What gives?"

Well, doing a write erase will remove delete your startup config but it doesn't touch the vlan database.

If you would like to remove all traces of previous vlans as well as startup configurations do the following.

Rack1SW4#del vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
Rack1SW4#write erase

Make sure you answer no if prompted to save your config.

This works on Cisco 2900's, 3550's and 3560's and possibly others but I haven't tested them.


Cisco Lab Console Port Config

I have gotten a few emails about what console port configuration I use in my lab. These questions were from people studying for the CCNA and I thought it might be helpful information for a post.

The below config prevents the console port from timing out. It also stops those annoying "*Oct 8 08:54:27.180: %SYS-5-CONFIG_I: Configured from console by console" messages when configuring a device.


R1>enable
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#line con 0
R1(config-line)#no exec-timeout
R1(config-line)#logging synchronous
R1(config-line)#exit
R1(config)#exit
R1#


*Note "exec-timeout 0 0" is the same as "no exec-timeout"