- Gateway : As provided by the data center.
- Netmask : As provided by the data center.
- VLAN : Please check the Enable VLAN option.
- VLAN Bridge : Enter vlan bridge as configured on the server.
- Adding IP : Please add ip range to the pool .
VLAN bridge must have an IP address assigned (even a dummy IP will work)
This will avoid known issue where VPS using VLAN network do not get their IPs configured through DHCP
Virtualizor will just use the VLAN bridge name in VPS configuration.
Following is the sample configuration file for VLAN with id : 192 .
DEVICE=eth1.192
ONPARENT=yes
VLAN=yes
NM_CONTROLLED=no
BRIDGE=Vbr0
DEVICE=Vbr0
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.0.0.1
NETMASK=255.255.255.0
ONBOOT=yes
IPV6INIT=yes
IPV6ADDR=2607:f0d0:1002:0011:0000:0000:0000:0002
IPV6_DEFAULTGW=2607:f0d0:1002:0011:0000:0000:0000:0001
Ubuntu 16 and lower (ifupdown)
auto eth1
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1.192
iface eth1.192 inet manual
auto Vbr0
iface Vbr0 inet manual
bridge_ports eth1.192
bridge_stp off
address 10.0.0.1
netmask 255.255.255.0
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
bridges:
viifbr0:
addresses:
- 10.1.3.43/24
interfaces: [ ens3 ]
gateway4: 10.1.3.1
macaddress: 00:16:3e:7f:ae:93
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
- 2001:4860:4860::8888
- 2001:4860:4860::8844
Vbr300:
interfaces: [vlan300]
vlans:
vlan300:
id: 300
link: ens3
This is just an example of the VLAN network configuration of Ubuntu 18 (netplan) with bonded interface.
The actual configuration may vary as per your datacenter network settings.
Example file : /etc/netplan/01-netcfg.yaml
bonds:
bond0:
interfaces:
- eth0
- eth1
parameters:
lacp-rate: fast
mode: 802.3ad
transmit-hash-policy: layer2
ethernets:
eth0: {}
eth1: {}
version: 2
bridges:
viifbr0:
addresses:
- 10.1.3.43/24
interfaces: [ bond0 ]
gateway4: 10.1.3.1
macaddress: 00:16:3e:7f:ae:93
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
- 2001:4860:4860::8888
- 2001:4860:4860::8844
Vbr3013:
addresses:
- 1.2.3.4/24
interfaces: [bond0.3013]
gateway4: 1.2.3.254
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
vlans:
bond0.3013:
id: 3013
link: bond0
You can try these commands for creating vlan bridge assuming the vlan ID is 100 and interface name is eno1
Add bond interface name(instead of eno1) if you are planning to use bonded NICs
# nmcli connection add type bridge con-name vlan100 ifname vlan100
//Add this if your server provider blocks ports on switch due to BPDU flooding
# nmcliconnection modify vlan100 bridge.stp no
//replace the network details of your vlan subnet
# nmcli connection modify vlan100 ipv4.addresses 'your-ip/netmask' ipv4.gateway 'your-gateway' ipv4.dns '8.8.8.8' ipv4.method manual
//add ipv6 if there is any
# nmcli connection modify vlan100 ipv6.addresses 'your-ipv6-ip/64' ipv6.gateway 'your-ipv6-gateway' ipv6.dns '2001:4860:4860::8888' ipv6.method manual
# nmcli connection modify eno1.100 master vlan100
# nmcli connection modify vlan100 connection.autoconnect-slaves 1
# nmcli connection up vlan100
Proxmox
Assuming 192 is the Vlan ID given by the provider for eth1 interface, then the following would be the bridge (Vbr0) configuration for eth1.192 Vlan device.
auto eth1
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1.192
iface eth1.192 inet manual
auto Vbr0
iface Vbr0 inet manual
bridge_ports eth1.192
bridge_stp off
address 10.0.0.1
netmask 255.255.255.0