Some IP phones (for example, Cisco 7960) send tagged voice packets, and others (for example, Huawei MC850) send untagged voice packets. This section discusses how MAC address-based voice VLAN and VLAN ID-based voice VLAN transmit tagged and untagged voice packets.
The switch identifies voice data based on:
Source MAC addresses of the received packets
The switch identifies data packets as voice data when the source MAC address matches the organizationally unique identifier (OUI). The OUI must be preconfigured and is used in scenarios where IP phones send untagged voice packets.
Source VLAN tags of the received packets
The switch identifies data packets as voice data when the VLAN ID matches the configured VLAN ID. This simplifies configurations when many IP phones connect to the switch. IP phones must be able to obtain voice VLAN information from the switch to use this mode.
The switch can identify voice data flows based on MAC addresses and VLAN IDs regardless of whether the packets carry VLAN tags. However, OUIs must be configured in order for the switch to differentiate untagged voice packets from data packets. If the voice packets are tagged, configuring VLAN ID-based voice VLAN simplifies configuration when many IP phones connect to the switch.
An OUI is the first 24 bits of a 48-bit MAC address assigned to each vendor by the Institute of Electrical and Electronics Engineers (IEEE). Voice packets sent by IP phones can be identified by the MAC address ranges requested by IP phone vendors.
In voice VLAN, the OUI is user-defined and not necessarily 24 bits long. The OUI is the result of the AND operation between the MAC address and mask in the voice-vlan mac-address command.
After receiving packets from the PC and IP phone, the switch determines whether the VLAN IDs in the packets match the configured voice VLAN ID. If they match, the switch considers data as voice data and increases the priority. The switch adds the VLAN tag of the PVID to untagged packets from the PC. When VLAN ID-based voice VLAN is configured, the IP phone must be able to obtain voice VLAN information from the switch.
LLDP is one of multiple methods in which an IP phone can obtain voice VLAN information from a switch.
Figure 2 shows a PC and an IP phone connecting to a switch. The IP phone obtains voice VLAN information from the switch through LLDP as follows:
When receiving untagged packets, the switch still sends them in the VLAN specified by the PVID. When congestion occurs, the switch preferentially sends voice packets.