This article will show how to create a new VLAN in a switch device. The execution is possible using a simulation application for an example a Cisco Packet Tracer or a GNS3. Just drag down a new device of any switch device type. The following is an example of adding new VLAN in a switch device using a Cisco Packet Tracer. The following is the step for creating a new VLAN in the switch device. The steps consist of several command execution. Do the execution of the command after adding the switch device to the Cisco Packet Tracer network design. Those command executions is in the following sequence :
1. Switch to the Privileged EXEC mode from the User EXEC mode. Execute the following command :
Switch>ena Switch#
2. Switch to the Global Configuration Mode from the Privileged EXEC mode. Execute the following command :
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 10 Switch(config-vlan)#end Switch#
3. In order to make sure that the VLAN is exist after executing the above command, just type the following command :
Switch(config)#vlan 10 Switch(config-vlan)#end Switch# %SYS-5-CONFIG_I: Configured from console by console Switch#
After creating a new VLAN, to make sure that the new VLAN exist, just type the following command :
sh vlan id vlan_id
For an example :
Switch#sh vlan id 10 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 10 VLAN0010 active Fa0/1, Fa1/1 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 10 enet 100010 1500 - - - - - 0 0 Switch#
Another way to create a new VLAN is by using VLAN database. Just type the following command :
Switch#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch(vlan)#vlan 20 VLAN 20 added: Name: VLAN0020 Switch(vlan)#sh vlan id 20 Switch(vlan)#exit APPLY completed. Exiting....
As in the above step, to make sure the existence of the VLAN, just type the following command to check if it is available or not :
Switch#sh vlan id 20 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 20 VLAN0020 active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 20 enet 100020 1500 - - - - - 0 0 Switch#