The creation of VLANs allows the network to be segmented. This increases performance and security because only the machines in the same VLAN will be able to communicate with each other, thus limiting broadcast messages such as DHCP requests.
enable
command to switch to high mode, then enter the conft
command)Comm1(config)#vlan 99 //Enter VLAN 99 configuration
Comm1(config-vlan)#name Management // Name it Management
Comm1(config-vlan)#exit // Exit VLAN configuration
show vlan brief
.Comm1(config)#interface <interfacetype_interfacenumber>
Comm1(config-if)#switchport access vlan <VLAN number>
You can also use the
(config)#interface range <typeport><0/<numport1-numportn>
command to directly configure a range of ports.
Comm1#show vlan id <id_vlan>
command.We'll just assign an IP address to the VLAN port.
Comm1(config)#interface vlan 99 // Go to VLAN interface configuration
Comm1(config-if)#ip address 192.168.56.11 255.255.255.0 // Assign an IP address with the Mask
Comm1(config-if)#no shutdown // Power on port
Set the VLAN port to trunk mode, then specify which VLANs are allowed to pass through this port.
Comm1(config)#interface fa0/1 // Go to the desired port configuration
Comm1(config-if)#switchport mode trunk // Set the port as trunk (instead of the default Access mode)
Comm1(config-if)#switchport trunk native vlan 99
Comm1(config-if)#no shutdown