Lessons · Network switches · voice VLANs
A phone and a PC on one socket
A voice VLAN sits alongside the access VLAN on the SAME access port: the phone tags its own traffic and passes the PC's through untagged.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
It is how one wall socket serves a desk, and it is the one place a port carries two VLANs without being a trunk, which is exactly why it confuses people.
How to think about it
Set the access VLAN for the PC, then the voice VLAN for the phone. If you find yourself typing switchport mode trunk, stop: that is the wrong answer to this.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
vlan 12The office VLAN, for the PC.
name DESKSNamed.
exitOut.
vlan 152And one for the phones.
name PHONESNamed.
exitOut.
interface gi0/5The wall port.
switchport mode accessAn access port. Still an access port, after everything below.
switchport access vlan 12The PC's traffic, untagged, lands in 12.
switchport voice vlan 152The phone tags its own into 152. Two VLANs, one access port.
endOut.
show running-configThree switchport lines under one interface, and none of them says trunk.
Your turn
Give the phone its own VLAN on this access port.
switchport vlan 152
Console into a switch
The trap
Making it a trunk instead. It carries both VLANs, which looks like success, and the PC now sees tagged traffic it does not understand.