A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
In a typical office, a user's desk has an IP phone and a PC. Rather than run two cables, the phone acts as a mini-switch: PC plugs into the phone, phone plugs into the wall. The switch port carries both data (PC) and voice (phone) traffic, separated by VLAN.
The switch port is configured with both an access VLAN (for the PC, untagged) and a voice VLAN (for the phone, tagged). The phone understands 802.1Q tags and separates voice traffic from the PC traffic. The PC sees no tags — it operates as if directly connected to an access port.
Switch1(config)# interface gigabitEthernet0/10Switch1(config-if)# description Phone+PCSwitch1(config-if)# switchport mode accessSwitch1(config-if)# switchport access vlan 10Switch1(config-if)# switchport voice vlan 30Switch1(config-if)# mls qos trust cosSwitch1(config-if)# spanning-tree portfastSwitch1(config-if)# exit
Four commands do the work. `switchport access vlan 10` puts the PC in VLAN 10. `switchport voice vlan 30` puts the phone's voice traffic in VLAN 30. The `mls qos trust cos` trusts the Class of Service markings the phone sets — voice traffic gets priority queuing. `spanning-tree portfast` brings the port up immediately for the endpoint.
The phone learns about the voice VLAN from CDP or LLDP advertisements sent by the switch. That's why `switchport voice vlan` works without configuring the phone — the phone is told the VLAN ID by the switch.
The QoS aspect is the strongest argument. Voice is sensitive to jitter above 30 ms and latency above 150 ms one-way. Putting voice in its own VLAN lets you apply strict priority queuing without complex policy on every data port.
`Voice VLAN: 30 (Voice)` confirms the config. If a phone is connected, `show interfaces gi0/10 status` will show the port as trunking to the phone (even though it's not a traditional trunk) — because voice VLAN makes the port carry two VLANs.
Voice VLANs mastered. Next lesson dives into 802.1Q trunking — the mechanism that carries multiple VLANs across links.
Finish the lesson once you have worked through the material. This awards ★ 30 XP.