Hone

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

enable
The # prompt.
configure terminal
Into configuration mode.
vlan 12
The office VLAN, for the PC.
name DESKS
Named.
exit
Out.
vlan 152
And one for the phones.
name PHONES
Named.
exit
Out.
interface gi0/5
The wall port.
switchport mode access
An access port. Still an access port, after everything below.
switchport access vlan 12
The PC's traffic, untagged, lands in 12.
switchport voice vlan 152
The phone tags its own into 152. Two VLANs, one access port.
end
Out.
show running-config
Three 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

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.

Practise voice VLANs on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.