A VLAN is a logically separate IP subnetwork. VLANs allow multiple IP networks and subnets to exist on the same switched network.

To create VLANS

Switch(config)# vlan vlan_ID

Switch(config-vlan)# name vlan_name

Switch(config-exit)#exit

example: 

S1(config)#vlan 10

S1(config-clan)# name managementswitch

S1(config-vlan)# exit

To assign ports to VLANs

Switch(config)# interface fastEthernet_port

Switch(config-if)# switchport mode trunking_mode (access, dynamic, trunk)

Switch(config-f)# switchport trunking_mode vlan_ID

example:

S1(config)# interface fastEthernet0/1

S1(config-if)# switchport mode access

S1(config-f)# switchport access 10

Advertisements