Official way to configure VLANs in distro?

Hi chaps

I need to set up VLANs in the freepbx distribution so that the freepbx server responds only to tagged vlan traffic (ID 10).

I have this working doing the manual changes to the ifcfg-eth files and installing vconfig.

However I’m aware that the eth config files say they shouldn’t be edited manually when using freepbx.

I’ve also seen a number of trac entries for requests for being able to setup vlans within the freepbx web interface, some imply this does work, some imply this doesnt.

If vconfig is isntalled, should we be able to specify ETH0:10, or ETH0.10, within the network settings section of the Freepbx web interface? Should we be using period (eth0.10) or colon (eth0:10) and what do we do about the line VLAN=YES which needs to go in to the ifcfg file?

I think the OP has a decent handle on how VLANs are configured.
What he was getting at (as far as i could tell) is that there is a section in the system admin -> network section that allows you to create a VLAN. The “help” bubble for it gives an example of eth0:1 or etho0:2. In his experience (and mine too) he has only seen vlans created with a period (.) not a colon (:slight_smile: so he is asking if correct syntax is in fact eth0:1 or if it should be eth0.1
What i was explaining was that even though you set everything in the gui right, you still need to go into the cli to add the vlan=yes line to the new config file.
One would think that when the gui says create virtual interface it would do this for you.
Mark.

I always thought that it was making vlans… lol

Oliverm, you don’t need to install vconfig.
Just create the text file as /etc/sysconfig/network-scripts/ifcfg-eth0.10
Or edit if you make in gui by just adding vlan=yes to it.

I try not to add anything that is not required in case it breaks something later with an update.

At this time their are no settings for VLANs in system admin. I have opened a internal ticket to get this added. The Virtual Interface option is for creating Virtual Interfaces not really specific VLANs.

eth0.512 the number 512 corresponds to the VLAN ID that you setup on your switch. So if you created a VLAN with an ID that does not match 512, you may need to change it to match your setting.

No one ever seems to give a right answer on this one and the Add VLAN in the GUI is definitely only half done.
What i do is…
in GUI, go to sysadmin -> network settings then "add new virtual interface"
I call mine etho.512
Give it static IP and Netmask and leave rest blank.
Yes to onboot and save.
Now hit save again and apply etc…
Often i find this does not seem to create it in the web interface - BUT IT DOES MAKE THE CONF FILES so don’t do it again.
Next i jump into the CLI and navigate to /etc/sysconfig/network-scripts/ifcfg-eth0.512 and in there i check all is as it should be and add the line VLAN=yes
Next thing is to bring the interface up.
ifup eth0.512
and then configure DHCP or whatever else you are doing with it.
Helpful hint: from now on if you go into sysadmin -> network settings to check things, DO NOT SAVE ANYTHING ON ETH0.512 - doing so will remove the VLAN=yes line. you can muck around with Eth0 as much as you like but leave the vlan alone unless you are deleting it.
Hope this helps.
Mark

ETH0:10 for virtual interfaces, or ETH0.10 for subinterfaces and VLANs