VLAN Creation
VLANs or Virtual LANs allow you to segment the physical network into separate logical networks. In this example, we’ll create the following VLANs for their associated networks.
ℹ️
The Associated Network Subnet field is only for reference. As were configuring VLANs which is a layer 2 (Data Link) protocol, subnet information isn’t required.
VLAN ID | NAME | Associated Network Subnet |
---|---|---|
100 | Office | 172.128.0.1/24 |
102 | Voice | 172.128.2.1/24 |
103 | Wireless | 172.128.3.1/24 |
105 | Guest | 172.128.5.1/24 |
Use the following commands to add a VLAN. Repeat for each VLAN you’d like configured on the switch.
Switch (config)# vlan 100
Switch (config)# name Office
To view all configured VLANs, use the show vlan
commands. Alternatively, you can see your vlan configuration in the running-config (show running-config
).
Switch# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
Gi1/0/4, Gi1/0/5, Gi1/0/6
Gi1/0/7, Gi1/0/8, Gi1/0/9
...
100 Office active
102 Voice active
103 Wireless active
105 Guest active
If you make a mistake and would like to remove a VLAN, run no
in front of the command. For example, this command will remove VLAN 100 from being configured on the switch.
Switch (config)# no vlan 100