My network has a VOIP VLAN defined in the LAN. I needed to configure FreePBX to communicate with VLAN tagging only. The articles I found around the internet only covered creating the VLAN and not eliminating untagged traffic over the LAN/physical port. Having both caused confusion with DNS since both IP addresses assigned were to the same hostname.
Here is what I did to limit traffic over the VLAN only. Note that I maintain my static address assignments in DHCP.
Here are the steps to configure the VLAN:
- Go to System Admin > Network Settings > Create Interface
Parent=eth0
Type=VLAN
VLANID=20 (or whatever the ID was configured in your network)
Protocol=DHCP
Save and Apply
There were 2 network interfaces created: eth0.20 and eth0.20@eth0.
-
Verified I could access the web GUI at the newly assign VLAN address.
-
Verified that the new VLAN was set to “Start Automatically”.
-
Assigned eth0 with:
Static IP=0.0.0.0
Netmask=24
Gateway=[blank]
Start Automatically=No -
Rebooted server.
On observation, the eth0 came back as “Unconfigured”in the web GUI. I also noticed that the eth0.20@eth0 was set to Start Automatically=No. I found it odd that FreePBX basically “unconfigured” eth0. On the console, the /etc/sysconfig/network-scripts/ifcfg-eth0 configuration file reflected the 0.0.0.0 IP address.
If you cannot bring up the web GUI on reboot, you likely didn’t set the VLAN interface to Start Automatically=Yes. You can simply log in as “root” user on the FreePBX console and edit the configuration file directly /etc/sysconfig/network-scripts/ifcfg-eth0.20. Change the ONBOOT=’YES’ parameter and reboot again. To edit the file, you’ll have to use the vim or vi command since this is command line only – no graphical tools.