Concepts / VLANs

VLANs

Voice VLAN

Also called auxiliary VLAN, IP phone, switchport voice vlan

A second VLAN on a desk port, tagged, for the IP phone in front of the computer.

The problem

One desk cable feeds both an IP phone and the computer plugged into the phone, but voice should be a network of its own.

  1. floorSwitch's port to the desk, deskPhone, is an access port in sales, VLAN 10, for the computer.
  2. The same port also carries VLAN 30, voice, tagged: the voice VLAN.
  3. The phone tags its own frames vlan 30 and has a voice address, 10.0.30.10. A real phone learns the number 30 from the switch, by CDP or LLDP-MED.
  4. The computer sends plain frames, which the port files in VLAN 10, from 10.0.10.12.
One desk port carries two VLANs
One desk port carries two VLANs

The phone tags its frames with the voice VLAN; the computer behind it sends untagged frames that land in the port's access VLAN.

What you'd see

$ tcpdump -e -nn -i eth0 icmp
18:46:54.766063 7e:42:55:97:83:91 > 16:84:6e:92:2b:30, ethertype 802.1Q (0x8100), length 102: vlan 30, p 0, ethertype IPv4 (0x0800), 10.0.30.10 > 10.0.30.2: ICMP echo request, id 154, seq 1, length 64
18:46:54.766564 16:84:6e:92:2b:30 > 7e:42:55:97:83:91, ethertype 802.1Q (0x8100), length 102: vlan 30, p 0, ethertype IPv4 (0x0800), 10.0.30.2 > 10.0.30.10: ICMP echo reply, id 154, seq 1, length 64
18:46:54.769789 7e:42:55:97:83:91 > 16:84:6e:92:2b:30, ethertype IPv4 (0x0800), length 98: 10.0.10.12 > 10.0.10.2: ICMP echo request, id 155, seq 1, length 64
18:46:54.770288 16:84:6e:92:2b:30 > 7e:42:55:97:83:91, ethertype IPv4 (0x0800), length 98: 10.0.10.2 > 10.0.10.12: ICMP echo reply, id 155, seq 1, length 64
  • Recorded on the desk cable while the phone pings 10.0.30.2, then the computer pings 10.0.10.2. In the lab, deskPhone plays both.
  • First two lines, vlan 30: the phone's voice frames, tagged.
  • Last two, plain ethertype IPv4: the computer's frames on the same cable, in VLAN 10.

Guess first

The phone's ping to 10.0.30.2 crosses the trunk to coreSwitch. Which tag does it carry there?

Show answer

Still vlan 30. The trunk carries VLAN 30 tagged, so the tag the phone put on stays on until coreSwitch.

In short

A voice VLAN is a second VLAN on a desk port, for an IP phone with a computer plugged in behind. The computer's frames travel untagged in the port's access VLAN; the phone tags its own with the voice VLAN, which it learns from the switch by CDP or LLDP-MED. Voice gets its own addresses and can get priority. On IOS: switchport access vlan 10 and switchport voice vlan 30.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab