60 Web User Guide
Figure 18. VLAN example network diagram
Layer 2 Switch
Port 0/1 | Port 0/4 | |
VLAN 3 | ||
VLAN 2 | ||
| ||
Port 0/2 | Port 0/3 | |
VLANs 2 & 3 | VLAN 3 |
VLAN 2
VLAN 3
CLI Examples
The following examples show how to create VLANs, assign ports to the VLANs, and assign a VLAN as the default VLAN to a port.
Example #1: Create Two VLANs
Use the following commands to create two VLANs and to assign the VLAN IDs while leaving the names blank.
(Console) #vlan database
(Console) (Vlan)#vlan 2
(Console) (Vlan)#vlan 3
(Console) (Vlan)#exit
Example #2: Assign Ports to VLAN2
This sequence shows how to assign ports to VLAN2, specify that frames will always be transmitted tagged from all member ports, and that untagged frames will be rejected on receipt.
(Console) #config
(Console) (Config)#interface 0/1
(Console) (Interface 0/1)#vlan participation include 2
(Console) (Interface 0/1)#vlan acceptframe vlanonly
(Console) (Interface 0/1)#exit
(Console) (Config)#interface 0/2
(Console) (Interface 0/2)#vlan participation include 2
(Console) (Interface 0/2)#vlan acceptframe vlanonly
(Console) (Interface 0/2)#exit
(Console) (Config)#exit