Introduction
VLAN traffic tagging (assigning VLANs of networks to IP phones) allows you to refuse additional cables and network ports, i.e. Do not create two separate networks - for voice and data. The PC can be connected to the phone's built-in switch (to the PC port) in the default VLAN, or in the assigned VLAN.
Starting with v15.5 SP1, in the 3CX management interface, you can centrally set priorities for real-time traffic (RTP) on the user's WAN port and / or PC port. That is, you can assign VLANs for both the IP phones themselves and for PCs connected via a mini-switch.

')
VLAN parameters are configured only on
IP phones supported by the 3CX system , provided that the device has the appropriate capabilities in the firmware. Centralized VLAN configuration is not supported on legacy phones (for example, Cisco 7900 Series) and DECT databases.
Features of using VLAN on an IP phone switch
Despite the fact that the built-in switch allows you to save on cables and network ports, its operation affects the operation of the connected PC. When you restart or turn off the phone, the PC loses connection to the network. If network applications are running on the PC, their work may stop with an error. In addition, if a PC connected to the PC port generates a lot of traffic (graphics and video, etc.), the quality of VoIP communication may noticeably deteriorate. In this case, it is recommended to set up prioritization of application traffic on the PC and on the switch.
Auto-tuning 3CX allows you to set VLAN parameters only on the LAN / WAN and PC ports of the phone. However, setting up corporate switches, routers and a DHCP server is the responsibility of the system administrator. Invalid auto-tuning of the VLAN on the phone may cause it to disconnect from the network. In this case, you will need a hardware reset of the device, which is usually done directly from the keyboard. The inconsistency of the VLAN settings on the phone and the switch can also lead to a noticeable deterioration in the quality of communication and periodic disconnections of the conversation.
Configuring VLAN on IP phones
In general, the successful implementation of VLAN tagging requires high-quality network equipment and the skills of a system engineer to configure switches / routers. It is recommended to pre-test VLAN auto-tuning on a small group of phones in the test network segment.
Before implementing a VLAN, it is important to consider the following:
- VLAN tagging is not always necessary because this complicates the network and the work of the administrator;
- If this is available, you can simply use different ports of the corporate switch for the PC and the IP phone;
- Advantages from VLAN are noticeable only in fairly large installations;
- Be sure to test VLAN operation before deploying technology in a production network;
- VLAN will not help if your network is abnormally overloaded.
Most often VLAN is implemented as follows:
- Data network
- no VLAN tagging
- 3CX and 3CXPhone web client installed on PC
- Configured routing with a 3CX server that is on the voice network
- Voice network
- VLAN tagging (in our example Vlan ID55)
- The 3CX server is located on the voice network
This setting assumes that IP phone traffic is tagged by the VLAN, and PC traffic passes without tagging. Example topology:
- Data Transmission Network 10.10.10.0 / 24
- Voice transmission network 10.10.20.0 / 24 (Vlan Tag 55) (traffic is tagged on the WAN port of the IP phone)
- Server IP 3CX 10.10.20.2 / 24
- IP phone 10.10.20.5 / 24
In this topology, there is one problem - new phones connected to the network do not yet have the VLAN parameters set and will receive IP addresses from the data network. In order for 3CX to be able to
auto-configure IP phones using Plug and Play , devices must be in the same network segment as the server. Therefore, it is necessary to configure automatic switching of IP phones to the voice network (multicast autotune packets that are sent by the phone will be intercepted and processed by the server).
DHCP Option 132
Please note: LLDP on switches must be turned off. On the DHCP server, create Option 132 and specify Vlan ID 55 (for our example). Normally, PCs ignore this option, but the IP phone must correctly interpret it. Having received Option 132, the phone releases the current IP address, changes the VLAN and receives a new IP address from VLAN 55. After that, the phone sends a multicast PnP auto-tuning request, which is processed by 3CX.
LAN / WAN port
VLAN ID is specified directly in the phone's auto configuration interface. It should correspond to the DHCP Option 132 parameter. With this configuration, you get several advantages:
- The configured device does not attempt to initially receive an IP address from the data network in order to switch to the desired VLAN ID
- IP phone does not use DHCP Option 132

The
VLAN Priority option is enabled by default and can range from 0 to 7. The priority of a packet determines how it should be handled by the network nodes it passes through. Values range from 1 (low priority) to 6 (high priority). 7 is not recommended because reserved for emergency cases. We remind that the incorrect indication of this value leads to a deterioration in the quality of communication. Real-time traffic from IP phones must always have a higher priority than other network traffic.
PC port (optional)
If you do not define the VLAN for the PC port of the phone, it will work in the default VLAN of the network, i.e. in the data network (this does not mean that the PC port will be disconnected - it is still available to connect the PC).

Sometimes a PC connected to a PC port must be “transferred” (i.e. tagged) to a different VLAN other than the default network. In this case, VLAN tagging is used on the PC interface of the phone, for example:
- The default network is 10.10.10.0 / 24
- DHCP pool 10.10.10.3 / 24
- Voice transmission network 10.10.20.0 / 24 (Vlan Tag 55) ← VLAN of port WAN
- Server IP 3CX 10.10.20.2 / 24
- IP Phone 10.10.20.5 / 24
- Data transmission network 10.10.30.0 / 24 (Vlan Tag 77) ← VLAN of PC port
VLAN Configuration Examples
Configuring VLAN tagging on an IP phone in a voice network + DHCP Option 132
- When connecting IP, the phone receives an IP address in the data network (10.10.10.5). In this network, access to the PBX server (10.10.30.2) is missing and the phone cannot be configured using PnP technology.
- Set up a DHCP reservation for the phone’s IP address and assign it a DHCP Option 132 with the text value 55
- Reboot IP Phone
- After rebooting the IP, the phone will receive the VLAN tag 55 and re-receive the IP address from the voice network (10.10.20.5).
- In the 3CX management interface, go to the Phones section, select the connected new phone and assign it to the user (or create a new user for this phone).
- In the Phone auto-configuration section in the VLAN Configuration section, enable the Enable VLAN for WAN PORT option.
- In the Configure your VLAN field settings below for the WAN PORT VLAN ID, set the value to 55.
- Apply the changes by clicking OK at the top.
- The phone will receive new settings and reboot.
- After rebooting, the WAN port of the phone will be tagged with VLAN ID 55
- The IP address will receive the IP address of the voice network (10.10.20.5)
- DHCP Option 132 will be overridden by a parameter obtained via auto-tuning.
Configure VLAN tagging on an IP phone in a voice network
- When connecting the IP phone receives an IP address in the data network (10.10.10.X).
- In the Phone auto-configuration section in the VLAN Configuration section, enable the Enable VLAN for WAN PORT option.
- In the Configure your VLAN field settings below for the WAN PORT VLAN ID, set the value to 55.
- Apply the changes by clicking OK at the top.
- IP phone will receive new settings and reboot
- After rebooting, the WAN port of the phone will be tagged with VLAN ID 55
- The IP address will receive the IP address of the voice network (10.10.20.5)
Configuring VLAN tagging on an IP phone in a voice network + connecting a PC through a PC port to a data network
- Connect the PC to the PC port of the IP phone and the WAN port of the phone to the corporate network
- When connected, the phone receives an IP address in the data network (10.10.10.5).
- The PC port of the phone also obtains an IP address from the pool of data network addresses (10.10.10.3).
- In the Phone auto-configuration section in the VLAN Configuration section, enable the Enable VLAN for WAN PORT option.
- In the Configure your VLAN field settings below for the WAN PORT VLAN ID, set the value to 55.
- Do not enable the Enable VLAN for PC PORT parameter
- Apply the changes by clicking OK at the top.
- IP phone will receive new settings and reboot
- After rebooting, the phone's WAN port will be tagged with VLAN ID 55, and the PC port will continue to operate in the data network (10.10.10.3).
- The IP address will receive the IP address of the voice network (10.10.20.5)