|www.rodneybeede.com||"I would love to change the world, but they won't give me the source code" - unknown|
enable write erase (press enter to confirm) reload (press enter to confirm)
enable delete flash:vlan.dat (press enter to confirm) (press enter again to confirm) reload (press enter to confirm)If after the reload your vlan.dat shows back up your IOS version does VLANs differently (auto-creation of VLAN for interface assignment). Repeat the steps again, but before doing "reload" issue the command write erase to reset everything. This behavior occurs in Cisco IOS version 12.0(5)WC17 for my 2900XL. Another option is to delete each vlan manually by hand or if you have a newer IOS use "no vlan range #-#".
enable vlan database vlan 10 name vlan10 (name vlan10 is optional) exit
Some versions of IOS mark this method as deprecated. This is another way
enable configure terminal vlan ### (### is the vlan number you want) name VLAN#### (name for the vlan) state active exit exit show vlan write exit
enable configure terminal interface FastEthernet 0/1 (where /# is port number, also GigabitEthernet) switchport access vlan 10 exit exit write memory
enable configure terminal interface range GigabitEthernet 1/0/1-24 switchport access vlan 10 exit exit write memory
enable configure terminal interface GigabitEthernet 1/0/1 switchport trunk encapsulation dot1q switchport mode trunk no shutdown exit exit write memory reload
Note that the switch may not automatically carry tagged traffic for a VLAN unless you define the VLAN first. You don't have to set a particular port to the VLAN, it just has to exist. See Create VLAN.