How to Remove a Vlan From a Cisco Catalyst

Save

This article addresses how to remove a VLAN from a Cisco Catalyst switch. Cisco Catalyst switches will run one of three operating systems: IOS, CatOS and hybrid. First, follow the steps in the next section, and then find the section below that corresponds to your switch operating system.

Getting Started

  • Connect to your Catalyst switch by using ssh or telnet, or by using the auxiliary port and a terminal emulator.

  • Log in to the switch, and then enter privilege mode by typing “en” at the prompt, and pressing "Enter."

  • Type “show vlan” and press “Enter.” Your switch's operating system will display a list of all its VLANs. This list will include the VLAN number, name, status and the ports assigned to that VLAN.

CatOS

  • It is essential to reassign the membership of the ports of a VLAN to another VLAN before removing the VLAN from the switch. To do this, use the “set vlan “ command, with the parameters vlan_number mod/ports.

    For example, let’s say you want to delete VLAN 3 from the switch, but you have port 14 assigned to it. You decide to move port 14 on module (card) 1 to VLAN 2:

    YourSwitch> (enable) set vlan 2 1/14

  • Once you’ve moved all the ports, you can remove the VLAN by using the “clear” command:

    YourSwitch> (enable) clear vlan 3

  • Issue the “show VLAN” command to verify your work.

IOS

  • Enter global configuration mode. Type “configuration terminal” and press “Enter.”

  • If you don’t reassign a port’s VLAN membership before removing the VLAN, the ports will become inactive. Type the name of the port you’d like to configure and then press “Enter.”

    For example:

    YourSwitch(config)# interface fastethernet 0/6

  • Assign the port to another VLAN as in the following example:

    YourSwitch(config if)# switchport access VLAN 5

  • Issue the command “no shutdown” for the interface, and press "Enter."

    YourSwitch(config if)# no shutdown

  • Repeat steps 2 through 4 until all ports have been reassigned, then exit the interface configuration mode by typing “exit” and pressing "Enter."

  • Type “vlan database” and press "Enter." You’re now editing the VLAN database.

  • Type “no vlan” plus the name of the VLAN you wish to remove. For example:

    YourSwitch(config)# no vlan 4

  • Type “apply” and press “Enter.”

Hybrid

  • You must first remove all ports from a VLAN before clearing the VLAN from the switch. Set the switch to configuration mode by typing “onfigure terminal” and pressing “Enter.” The ports will be reassigned to the default VLAN.

  • Type the interface you would like to remove from the VLAN and press “Enter.” For example, to configure port 6:

    YourSwitch(config)# interface fastethernet 0/6

  • Issue the command “no switchport access” followed by the VLAN number to remove the port from that VLAN:

    YourSwitch(config if)# no switchport access VLAN 4

  • Repeat steps 2 and 3 for each port assigned to the VLAN. Once all ports have been removed, type “end” and press “Enter.” This will take you out of configuration mode.

  • Edit the VLAN database. Type “vlan database.” Press “Enter.”

  • Remove the VLAN by typing “no vlan” plus the VLAN number. For example:

    YourSwitch(vlan)# no vlan 4

  • Type “exit” and press “Enter.”

Tips & Warnings

  • Be sure to apply your changes to your running config, and write them once you're satisfied with your changes.
  • If you're working with VLANs that stretch over multiple switches, check your VTP mode. Use Transparent Mode to remove a VLAN from only one switch. If you remove a VLAN from a swtich in VTP Server Mode, you'll remove the VLAN from all switches in that domain. For more information on VTP mode visit http://www.cisco.com/en/US/tech/tk389/tk689/technologies_configuration_example09186a0080890607.shtml

References

  • Photo Credit Hemera Technologies/AbleStock.com/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!