Welcome to www.linknewnet.com.

New Promotion

-50%
Cisco Switch Catalyst 9500 Series C9500-40X-A
$4000 $2000
-29%
Cisco Catalyst 9300 Series Switch C9300-24T-A
$1750 $1250
-31%
Cisco MDS 9200 Series Switch DS-C9250I-K9
$1600 $1100
-38%
Cisco Catalyst 2960 Series Switch WS-C2960L-48PQ-LL
$800 $500
-42%
Cisco ASR 9001 Series Power Supply A9K-750W-AC
$600 $350

Creating and Deleting VLANs on Cisco Switches
Sep 21 , 2024 206

In modern enterprise networks, VLANs play a very important role in network transmission. Administrators can use VLANs to divide a physical switch into multiple logical switches to simplify network management and improve network performance and security. As network administrators, learning how to create and delete VLANs on Cisco Catalyst switches is a must-have skill.

图片1.png

Basic Concepts and Role of VLANs


VLAN stands for Virtual Local Area Network, which supports network administrators in creating multiple logical broadcast domains on switches, regardless of physical distance, and VLANs can span a single switch or multiple switches. This feature reduces the size of the broadcast domain or allows the operation of logical grouping of groups and users that are in different locations.


So, what are the roles of VLANs? Simply put, in a physical Cisco switch, you can create multiple VLANs for connecting to different networks.


For example, create VLAN 1 for the 192.168.1.0/24 segment, VLAN 2 for the 192.168.2.0/24 segment, and VLAN 3 for the 192.168.3.0/24 network. The creation of these VLANs and the corresponding Layer 3 addresses can be configured in the same Layer 3 switch.


Steps to Create a VLAN on a Cisco Catalyst Switch


Understanding the concept and role of VLANs, how to create VLANs on Cisco Catalyst switches? linknewnet's engineers have prepared the methods of creating VLANs and deleting VLANs, and those who need them are recommended to collect them!


[1] Entering Global Configuration Mode: Log in to the CLI interface of the switch and enter Global Configuration Mode. This step can be done by entering the enable command to enter the privileged mode, and then enter configure terminal to enter the global configuration mode.


[2] Create VLAN: Use the vlan [VLAN_ID] command to create a new VLAN. e.g., vlan 10 creates a VLAN with VLAN ID 10.


[3] Assign a name to the VLAN: After creating a VLAN, you can use the name [VLAN_NAME] command to assign a name to it, such as name IT.


[4] Configure interfaces: Finally, you need to assign some interfaces of the switch to this VLAN. This step is done by entering interface configuration mode and using the switchport access vlan [VLAN_ID] command.


The following is a complete command example:


1. switch create vlan

Switch#configure terminal

Switch(config)#vlan 2

Switch(config-vlan)#name IT

Switch(config-vlan)#vlan 3

Switch(config-vlan)#name SALE

图片2.png

2. Classify the corresponding ports into VLANs.

Switch(config)#interface range GigabitEthernet 0/1 - 2 , GigabitEthernet 0/4

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 2

Switch(config-if-range)#interface range GigabitEthernet 0/3 , GigabitEthernet 0/5 - 8

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 3


3. View VLAN information

Switch#show vlan brief

VLAN Name Status Ports

1 default active Gi0/9, Gi0/10, Gi0/11, Gi0/12

    Gi0/13, Gi0/14, Gi0/15, Gi0/16

    Gi0/17, Gi0/18, Gi0/19, Gi0/20

    Gi0/21, Gi0/22, Gi0/23, Gi0/24

2 IT active Gi0/1, Gi0/2, Gi0/4

3 SALE active Gi0/3, Gi0/5, Gi0/6, Gi0/7, Gi0/8


4. Setting up the trunk port

Switch(config)#interface G0/10

Switch(config-if)#switchport mode trunk

Note that it is always recommended that you upgrade the IOS image on your Cisco switch to the official recommended version.


Steps to Delete a VLAN on a Cisco Catalyst Switch


If you have created the wrong VLAN on the switch, you need to delete the corresponding VLAN.


Assuming that you want to delete VLAN 2 that you just created, simply delete that VLAN.


For example, to delete VLAN 2, enter the following command:

Switch(config)#no vlan 2

Finally, to verify that VLAN 2 has been deleted, enter the following command:


Switch#show vlan

VLAN Name Status Ports

---- --------- --------- -------------------------------

1 default active Gi0/1, Gi0/2, Gi0/3, Gi0/4, Gi0/5, Gi0/6, Gi0/7, Gi0/8, 

Gi0/9, Gi0/10, Gi0/11, Gi0/12, Gi0/13 Gi0/14, Gi0/15, Gi0/16, Gi0/17, 

Gi0/18, Gi0/19, Gi0/20, Gi0/21, Gi0/22, Gi0/23, Gi0/24


As a final note, do not execute any of the above commands on the switch if you don't know what you're doing, as it could bring your network down. You can choose to perform this operation on a test system to try and learn how to operate VLANs on Cisco switches.If you need our help, please do not hesitate to contact our professional customer service who are professional engineers with more than 3 years of experience.

Related Blogs

WhatsApp
Quote
Contact
Top