Site icon

How to configure VLAN on Cisco Switch?

cisco switch

To configure VLANs on a Cisco switch, you need to perform the following steps:

Enter configuration mode:
Connect to the switch via a console or Telnet connection and log in with your credentials. Enter configuration mode by typing the following command:
switch> configure terminal
Create the VLAN:
Use the following command to create a VLAN:
switch(config)# vlan
switch(config-vlan)# name
Replace with the desired VLAN ID (a number between 1 and 4094) and with the desired VLAN name.

Assign ports to the VLAN:
Use the following command to assign switch ports to a VLAN:
switch(config)# interface range
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan
Replace with the desired switch ports (for example, FastEthernet 0/1-4) and with the VLAN ID.

Save the configuration:
To make the changes persist across reboots, use the following command to save the configuration:
switch(config)# end
switch# copy running-config startup-config
Verify the VLAN configuration:
You can verify the VLAN configuration by using the following command:
switch# show vlan brief
Note: The above steps provide a basic configuration for VLANs on a Cisco switch. Depending on your network requirements, you may need to perform additional configurations, such as setting up VLAN trunking, configuring inter-VLAN routing, etc.

Exit mobile version