Voice VLANs and IP phones

A phone and a PC on one cable

Offices often have one network socket per desk. The IP phone plugs into it and the PC plugs into a small switch built into the phone. The switch port then carries two VLANs:

  • The data VLAN (the access VLAN): the PC's frames, untagged.
  • The voice VLAN: the phone's frames, tagged with 802.1Q so they get priority.

The switch tells the phone which voice VLAN to use with CDP (or LLDP-MED), and powers it with PoE. The phone then asks for a DHCP address in the voice VLAN.

In NetLab

▶ SW1
SW1>enable
SW1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#interface fa0/5
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#switchport voice vlan 50
SW1(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION
SW1(config-if)#end
*Mar  1 00:00:20.000: %SYS-5-CONFIG_I: Configured from console by console
SW1#show interfaces fa0/5 switchport | include Mode|Access|Voice
Administrative Mode: static access
Operational Mode: static access
Access Mode VLAN: 10 (SALES)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: 50 (VOICE)
Capture Mode Disabled
SW1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
SEP001A9B146608  Fas 0/5               163          H P M NL-7800   Por 1
R1               Gig 0/1               163        R B S I NL-R3000  Gig 0/0

Total cdp entries displayed : 2
▶ PH1
IP phone SEP001A9B146608
  Network       : connected
  Voice VLAN    : 50
  IP address    : 192.168.50.10/24
  TFTP/Gateway  : 192.168.50.1
Type status to refresh this screen.
PH1> status
IP phone SEP001A9B146608
  Network       : connected
  Voice VLAN    : 50
  IP address    : 192.168.50.10/24
  TFTP/Gateway  : 192.168.50.1
Type status to refresh this screen.

A port with a voice VLAN is still an access port: it carries exactly one data VLAN and one voice VLAN, not a trunk. show interfaces trunk doesn't list it.

Tip: Voice traffic is marked for priority (CoS 5 in the tag, DSCP EF in the IP header) so the switches and routers send it first. QoS makes the rest of the plan; phones just need their own VLAN to start.

HOME LABS COMMUNITY DASHBOARD