Cisco Voice VLAN Setup for IP Phones (Auxiliary VLAN) - 夜莺博客

Cisco Voice VLAN Setup for IP Phones (Auxiliary VLAN)

The Cisco voice VLAN feature lets a single access port carry two logical networks to an IP phone: a data VLAN for the PC plugged into the phone, and a voice VLAN for the phone itself. The phone is told which VLAN to use through CDP, and the switch can trust or override the 802.1p priority the phone stamps on its voice frames so call quality survives congestion. This guide covers the configuration modes of switchport voice vlan and a complete phone-port example on Catalyst IOS XE switches.

How Voice VLAN Works

When a Catalyst switch port connects to a Cisco IP Phone, the phone sends voice traffic with Layer 3 IP precedence and Layer 2 CoS values set to 5 by default. The switch can instruct the phone, via CDP, to send voice traffic in one of these ways: tagged in a dedicated voice VLAN with a CoS value; tagged with CoS in the access (data) VLAN; or untagged. Voice VLANs are supported only on access ports, and the voice VLAN must exist and be active on the switch before the phone can use it.

Configuration Example

Create the voice VLAN, then configure the phone port with a data VLAN for the PC, the voice VLAN for the phone, and trust for the phone device:

Switch# configure terminal
Switch(config)# vlan 200
Switch(config-vlan)# name VOICE
Switch(config-vlan)# exit
Switch(config)# interface gigabitethernet1/0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# switchport voice vlan 200
Switch(config-if)# trust device cisco-phone
Switch(config-if)# spanning-tree portfast
Switch(config-if)# end

Now the PC behind the phone is in VLAN 10 and the phone registers in VLAN 200; QoS trusts the CoS coming from the phone so voice packets keep their priority end to end. If you use auto-QoS, the trust command is applied automatically by auto qos voip cisco-phone.

Voice VLAN Modes

  • switchport voice vlan 200 — phone sends voice tagged in VLAN 200 with 802.1p CoS 5 (default, recommended).
  • switchport voice vlan dot1p — phone uses 802.1p priority tagging in the native/access VLAN (VLAN 0); useful when no separate voice VLAN exists.
  • switchport voice vlan untagged — phone sends voice untagged in the access VLAN.
  • switchport voice vlan none — phone uses its own configuration for untagged voice traffic.

dot1p is not supported on Catalyst 9500X/9600X; CDP must be enabled on the port (default) because CDP is how the switch tells the phone which mode to use.

Verification

show interfaces gigabitethernet1/0/1 switchport
show running-config interface gigabitethernet1/0/1
show vlan id 200
show cdp neighbors gigabitethernet1/0/1

The switchport output shows the operational voice VLAN and the administrative voice VLAN; if the phone never registers, confirm the voice VLAN is active in show vlan, CDP is running toward the phone, and the phone's data/voice trust settings match the switch. Voice VLAN fundamentals pair with the general trunk and SVI design in our Cisco VLAN and inter-VLAN routing guide, and with port security on the same access ports in Catalyst port security with sticky MAC.

原文链接:https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-9/configuration_guide/vlan/b_179_vlan_9300_cg/configuring_voice_vlans.html