.
.

Create or delete VLAN on the Switch

How to create or delete named VLAN 3 on theSwitch serie 2900


Switch_A#enable
Switch_A#class (password)
Switch#show vlan (view table VLANs where we can see info about inclusion interfaces, at this moment, all interfaces-ports belong to VLAN 1)

Switch#vlan database (entry in configuration mode for the VLAN on the switch, add or delete VLAN)
Switch(vlan)#vlan 2 name VLAN2 (create a new VLAN, be sure to put a number 2 next to the name of the VLAN)
Switch(vlan)#vlan 3 name VLAN3 (create a new VLAN, be sure to put a number 3 next to the name of the VLAN)
Switch(vlan)#exit

Switch#configure terminal
Switch(config)#interface fastethernet 0/4 (entry in config mode fastethetnet interfaces 0/4)
Switch(config-if)#switchport mode access (change a switchport to a non-default VLAN, entry in config mode where we switch port from the default VLAN 1 in the non-default Vlan in this case it is VLAN 2)
Switch(config-if)#switchport access vlan 2 (switch-setting interface and FA0/4 in VLAN 2)
Switch(config-if)#exit

Switch(config)#interface fastethernet 0/5 (entry in config mode fastethetnet interfaces 0/5)
Switch(config-if)#switchport mode access (change a switchport to non-default VLAN, entry in config mode where we switch port from the default VLAN 1 in the non-default Vlan in this case it is VLAN 2)
Switch(config-if)#switchport access vlan 2 (switch-setting interface and FA0/5 in VLAN 2)
Switch(config-if)#exit

Switch#show vlan (view table VLAN where we can see info about inclusion interfaces, at this moment, all interfaces-ports belong to VLAN 1 except 04.0 / 5.0 / 6 belonging to VLAN 2)

Switch#configure terminal
Switch(config)#interface fastethernet 0/7 (entry in config mode fastethetnet interfaces 0/7)
Switch(config-if)#switchport mode access (change a switchport to non-default VLAN, entry in config mode where we switch port from the default VLAN 1 in the non-default Vlan in this case is that VLAN 3)
Switch(config-if)#switchport access vlan 3 (switch-setting interface and FA0/7 in VLAN 3)
Switch(config-if)#exit

Switch#configure terminal
Switch(config)#interface fastethernet 0/4 (entry in config mode fastethetnet interfaces 0/4)
Switch(config-if)#no switchport access vlan 2 (delete interface FA0/4 from VLAN 2)

Switch#vlan database (entry in configuration mode for the VLAN on the switch, add or delete VLAN)
Switch(vlan)#no vlan 3 (delete VLAN 3 from the Switch)
Switch(vlan)#exit

DELETE a FastEthetrnet interface from a VLAN 3

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#interface FastEthernet 0/7 (entry in config mode fastethetnet interfaces 0/7)
Switch(config-if)#no switchport access vlan 3 (delete VLAN 3 from the Switch)
Switch(config-if)#exit


How to create or delete named VLAN 3 on the Switch serie 1900

Some commands setting from one VLAN to another VLAN are different from series to series switch.

Host1 C:\> ping 192.168.1.2
Host1 C:\>ipconfig
Switch#enable
Switch#class (password)

Switch#show vlan-membership (view table VLANs where we can see info about inclusion interfaces, at this moment, all interfaces-ports belong to VLAN 1)

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#vlan 2 name VLAN2 (create a new VLAN, be sure to put a number 2 next to the name of the VLAN)
Switch(config)#vlan 3 name VLAN3 (create a new VLAN, be sure to put a number 3 next to the name of the VLAN)
Switch(config)#exit

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#interface Ethernet 0/4 (entry in config mode ethertnet interface 0/4)
Switch(config-if)#vlan static 2 (switch-setting interface e0/4 in VLAN 2)
Switch(config)#interface Ethernet 0/5 (entry in config mode ethertnet interface 0/5)
Switch(config-if)#vlan static 2 (switch-setting interface e0/5 in VLAN 2)
Switch(config-if)#end (switch in to User excec mode)

Switch#show vlan-membership (view table VLANs where we can see info about inclusion interfaces, at this moment, all interfaces-ports belong to VLAN 1, except 0/4 and 0/5 which belong to VLAN 2)

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)

Switch(config)#interface Ethernet 0/7 (entry in config mode ethertnet interface 0/7)
Switch(config-if)#vlan static 3 (switch-setting interface e0/7 in VLAN 3)
Switch(config-if)#exit

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#interface Ethernet 0/4 (entry in config mode ethertnet interface 0/4)
Switch(config-if)#no vlan-membership 2 (delete interface e0/4 from VLAN 2)

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#interface Ethernet 0/7 (entry in config mode ethertnet interface 0/7)
Switch(config-if)#no vlan static 3 (delete VLAN 3 from the Switch)
Switch(config-if)#exit

Delete a Ethernet interface from a VLAN 3

Switch#configure terminal (entry in global configuration mode and add or delete VLAN)
Switch(config)#interface Ethernet 0/7 (entry in config mode ethertnet interface 0/7)
Switch(config-if)#no vlan-membership 3 (delete VLAN 3 from the Switch)
Switch(config-if)#exit