Hone

Lessons · Network switches · the phone and the PC on one port

One cable, two VLANs

The phone tags its own traffic with the voice VLAN and passes the PC's through untagged. One port, one cable, two devices.

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

Two devices means two lines in the configuration, and a partial restore that lands one and refuses the other leaves phones working and PCs dead.

How to think about it

Access VLAN for the PC, voice VLAN for the phone, portfast so the PC boots. Then read the port back and count the lines.

Worked example

enable
In.
configure terminal
Configuring.
vlan 10
The data VLAN.
name WORKSTATIONS
Named.
exit
Out.
vlan 20
The voice VLAN.
name HANDSETS
Named.
exit
Out.
interface gi0/6
The desk.
switchport mode access
Access, not trunk. The phone does the tagging.
switchport access vlan 10
The PC behind the phone.
switchport voice vlan 20
The phone itself.
spanning-tree portfast
The warning is real and this is the port it does not apply to.
end
Done.
show running-config | section GigabitEthernet0/6
Four lines. If a restore leaves three, you have a working phone and an unhappy person.

Your turn

Give the phone on this port VLAN 20.

switchport voice  20

The trap

Making the port a trunk because two VLANs cross it. A trunk carries every VLAN to a switch; this is one port carrying two, to a phone.

Practise the phone and the PC on one port on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.