How to create and delete vlan on cisco catalyst switch


Published on

Published in: Technology, Education
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

How to create and delete vlan on cisco catalyst switch

  1. 1. How to Create and Delete VLAN on Cisco Catalyst SwitchVLANs are a mechanism to allow network administrators to create logical broadcastdomains that can span across a single switch or multiple switches, regardless ofphysical proximity. This function is useful to reduce the size of broadcast domains orto allow groups or users to be logically grouped without the need to be physicallylocated in the same place.One of the typical configuration activities you’ll perform on a Cisco Switch is tomanipulate VLANs.VLAN stands for Virtual Local Area Network.In one physical cisco switch, you can create multiple VLANs that connects to differentnetwork.For example, a VLAN for network, a VLAN for network, and aVLAN for network. All three of these can be configured in the samephysical switch.While these commands were tested on a cisco catalyst switch 3750 series, similarcommands (may be with slight variation to the port number format) should work onall cisco switches.Create VLAN on Cisco SwitchIf you are planning to have only one network in your whole switch (for example, All the ports in the switch will be connected to the, then you don’t need to create a VLAN, just use the default VLAN 1.Every switch comes with the default VLAN 1 as shown below. In this example, all theports in this switch (from 1 through 8) are part of the default VLAN 1.#show vlanVLAN Name Status Ports
  2. 2. ---- -------------------------------- --------- ------------1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4 Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8In the following example, we are creating 192 VLAN network (for While creating a VLAN you also need to specify the range of ports from theswitch that needs to be part of this VLAN network.In this example, ports 3 through 6 are configured as part of 192 VLAN network.config tvlan 192interface range gigabitEthernet 1/0/3-6switchport access vlan 192exitIn the above commands: config t – Goes into the configuration mode vlan 192 – Creates VLAN 192 interface range gigabitEthernet 1/0/3-6 – Indicates that the port numbers 3 through 6 are assigned to this VLAN swithport access vlan 192 – Indicates that the access to the vlan 192 is enabledApart from providing the access to the vlan 192 for the port numbers 3 through 6,you can also specify the following additional switchport configuration parameters(for example, nonegotiate and mode access)config tinterface range gigabitEthernet 1/0/3-6switchport mode accessswitchportnonegotiateexitOnce you’ve created a VLAN verify it as shown below,#show vlanVLAN Name Status Ports---- -------------------------------- --------- ------------1 default active Gi1/0/1, Gi1/0/2, Gi1/0/7, Gi1/0/8192 VLAN0192 active Gi1/0/3, Gi1/0/4, Gi1/0/5, Gi1/0/6On a side note, it is always recommended that you upgrade ISO image on your ciscoswitch to the latest version.Delete VLAN on Cisco SwitchYou might want to delete a VLAN, if you are planning to switch the ports assigned toVLAN 192 to a different VLAN. Or, you might want to delete a VLAN, just because
  3. 3. you’ve created it by mistake.Let us assume that you want to delete the VLAN 192 (ports 3 through 6) that you justcreated.Deleting a VLAN is as simple as assigning the default VLAN 1 to the ports that arepart of the VLAN you want to delete, and delete the VLAN.i.e If you want to delete VLAN 192, assign VLAN 1 to the ports 3 through 6, and justdelete the VLAN 192.First, assign the default VLAN 1 to ports 3 through 6 as shown below.interface range gigabitEThernet 1/0/3-6switchport access vlan 1exitNext, delete the vlan itself as shown below.novlan 192Finally, verify that the VLAN 192 got deleted as shown below.#show vlanVLAN Name Status Ports---- -------------------------------- --------- ------------1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4 Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8As a final note, if you don’t know what you are doing, do not execute any of theabove commands on production switch, as you might bring down your network. Dothis only on a test system, where you can play around and learn how to manipulateVLANs on cisco switch.More Related: Creating Ethernet VLANs on Catalyst Switches from Cisco’s officialwebsite