Configuring VLAN

From Bicom Systems Wiki

IMPORTANT: SERVERware 1.x has reached its END OF LIFE status. Limited support will be available until June 30th, 2020

IMPORTANT: This guide does not apply, nor will work on SERVERware 3.

In order to configure VLAN you will need to do the following:

Edit /etc/conf.d/net file and add this configuration if vlan will be on eth0 interface (this is only an example)

nano /etc/conf.d/net

This is general configuration for vlans something you will not change when you want to change vlan IP.

vlans_eth0="1" # if you need more than one vlan add like "1 2 3" for 3 vlans
vlan1_name="vln1" # You have to set name of max 4 characters length cause vservers and some limitations
vlan1_ingress="2:6 3:5" # Your networking experts may tell more about this, but maybe default is just fine
eth0_vlan1_egress="1:2"
vlan_start_eth0="yes" # start eth0 if not started when ever staring vln1 network interface

Now you will have network interface "vln1" once you restart eth0

screen /etc/init.d/net.eth0 restart

You should use screen so you don’t break process while ssh connection is down during interface restart.

Lets create configuration for vln1 interface, simple edit/create file etc/conf.d/net.vln1

nano etc/conf.d/net.vln1

And insert these or edit content to match your settings, in our case we will set these values:

config_vln1="10.1.30.7 netmask 255.255.0.0"
routes_vln1="default via 10.1.0.6"

Now you need to be able to start/stop vln1 in order to apply configuration from /etc/conf.d/net.vln1 To do that you need symbolic link to net.lo script same as for any other network interface. Chang your foloder to /etc/init.d and create symbolic link:

cd /etc/init.d/
ln -s net.lo net.vln1

This should set everything up. Start your interface

/etc/init.d/net.vln1 start

To add IP on vln1 for PBXware VPS, go to serverware web console edit VPS, click Advance in upper right corner, then click + button in IP list, select vln1 for interface and enter preffered IP and network prefix.