Telephony · Lesson 1 of 4
Voice VLAN in Depth: CDP, LLDP-MED and Phones from Any Vendor
You configured switchport voice vlan, but the phone still gets an IP from the data VLAN. It is almost always a discovery problem.
In a nutshell
The switch tells the phone which VLAN to use for voice: to Cisco phones through CDP and to other vendors through LLDP-MED. If the phone does not get that message, it stays in the data VLAN.
In this lesson
How an IP phone boots
- The phone powers up (via PoE) and listens for CDP or LLDP-MED on the port.
- The switch advertises the voice VLAN configured with
switchport voice vlan. - The phone starts tagging its traffic with that VLAN and requests an IP via DHCP in it.
- The PC behind the phone stays in the data VLAN, untagged.
Non-Cisco phones: LLDP-MED
Yealink, Polycom, Avaya and most vendors do not understand CDP. They use LLDP-MED, which advertises the voice VLAN in the Network Policy TLV. On Cisco switches you just need to enable LLDP: the voice vlan is advertised automatically.
SW1(config)# lldp run ← LLDP is off by default on many IOS versions
SW1(config)# interface gi1/0/5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# switchport voice vlan 150
SW1(config-if)# spanning-tree portfast
SW1# show lldp neighbors gi1/0/5 detail
System Name: SEP001122334455
MED Information:
Network Policy(Voice): VLAN 150, tagged, Layer-2 priority: 5, DSCP: 46
Plan B: voice VLAN through DHCP
Some old phones do not speak LLDP-MED. They boot in the data VLAN and the DHCP server of that VLAN tells them the voice VLAN with a vendor option (for example option 132, or a string such as VLAN-A=150 in option 43). Then they restart the process in the voice VLAN.
Very common real mistake
LLDP disabled and phones from another vendor. The phone "half works" in the data VLAN, with no QoS and with user IPs.
Verification
SW1# show cdp neighbors gi1/0/5 detail
SW1# show interfaces gi1/0/5 switchport | include Voice
Voice VLAN: 150 (VOICE)
SW1# show mac address-table interface gi1/0/5
10 0050.56aa.bb01 DYNAMIC Gi1/0/5 ← the PC
150 0011.2233.4455 DYNAMIC Gi1/0/5 ← the phone
What you must remember
- The phone learns the voice VLAN through CDP (Cisco) or LLDP-MED (other vendors).
- On many switches LLDP must be enabled with lldp run.
- Without discovery, the phone stays in the data VLAN.
- Verify with show lldp/cdp neighbors and the MAC table.
Check what you learned
4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.