Last Modified: Wed, 07 Mar 2012 16:29:42 +0000 ; Created: Wed, 13 Jul 2011 21:32:15 +0000
Below have been tested on Cisco Catalyst 2900XL (IOS version 12.0(5)WC17) and 3750 (IOS version 12.2(55)SE3).
Quick Tips
Reset to defaults (leaves vlan config alone)enable write erase (press enter to confirm) reload (press enter to confirm) Reset VLAN settingsenable 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 #-#". Create VLAN
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 Assign single port to VLAN
enable
configure terminal
interface FastEthernet 0/1 (where /# is port number, also GigabitEthernet)
switchport access vlan 10
exit
exit
write memory
Assign multiple ports to VLAN at once (3750 only or IOS 12.1+)enable configure terminal interface range GigabitEthernet 1/0/1-24 switchport access vlan 10 exit exit write memory Setup port to trunk with 802.1qenable 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. |
|