Virtual LAN ports are widely used in switches to isolate different networks traffic in switches and routers . Below procedure is a quick 4 steps 5 minutes guide which should help you to configure a VLAN on switch and assign a port to it.
- Step 1 : Open a serial port console cable from you laptop to the switch management port . Use a terminal program such as Hyper-Terminal , set the port properties as specified for your switch. Usually the settings would be Baud 9600 , Data bits - 8 , Parity - None , Stop Bits -1 , Flow control - None
- Step 2 : Check existing VLAN , create a new VLAN
cisco_sw1>
cisco_sw1> enable
cisco_sw1#
cisco_sw1# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
54 VLAN54 active Gi1/0/4, Gi1/0/5
Now lets create another VLAN 75
cisco_sw1# config terminal
Enter configuration commands, one per line. End with CNTL/Z.
cisco_sw1(config)# vlan 75
cisco_sw1(config)# ^Z Press Cntrl Z
cisco_sw1#
cisco_sw1# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
54 VLAN54 active Gi1/0/4, Gi1/0/5
- Step 3 : Assigning a switch port say port no 6 to VLAN 75
cisco_sw1# config terminal
Enter configuration commands, one per line. End with CNTL/Z.
cisco_sw1(config)# interface Gi1/0/6
cisco_sw1(config-if)# switchport access vlan 75
cisco_sw1(config-if)#^Z
cisco_sw1#
cisco_sw1# show interface status
Port Name Status Vlan Duplex Speed Type
Gi1/0/1 connected 1 a-full a-100 10/100/1000Ba
seTX
Gi1/0/2 notconnect 1 auto auto 10/100/1000Ba
seTX
Gi1/0/3 connected 1 a-full a-1000 10/100/1000Ba
seTX
Gi1/0/4 connected 54 a-full a-1000 10/100/1000Ba
seTX
Gi1/0/5 notconnect 54 auto auto 10/100/1000Ba
seTX
Gi1/0/6 notconnect 75 auto auto 10/100/1000Ba
cisco_sw1# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
54 VLAN54 active Gi1/0/4, Gi1/0/5
cisco_sw1# show run (To view full switch config)
- Step 4 : Save the configuration
cisco_sw1# wr
*Aug 25 12:12:04.413: %SYS-5-CONFIG_I: Configured from console by consoler
Building configuration...
[OK]
cisco_sw1# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
0 bytes copied in 0.933 secs (0 bytes/sec)
cisco_sw1# exit
Hope this helps to some Cisco switch config beginners.