Overview
This guide shows you how to create an additional network which can be used to give a VM additional Internal IP Addresses.
Virtualizor's IP Pool system supports this on all Virtualization.
Creating the Bridge
Although Virtualizor creates its own Network Bridge, you will need to create the additional Bridge to use it.
Create the bridge with whatever name you want. The following is a bridge created for internal networks with the name intbr0.
Note : You will need bridge-utils package installed on your server
Centos
File : /etc/sysconfig/network-scripts/ifcfg-intbr0
DEVICE=intbr0 ONBOOT=yes TYPE=Bridge BOOTPROTO=static IPADDR=192.168.1.1 NETMASK=255.255.255.0
If you have a secondary NIC for interserver internal network, you can set the following :
(Optional) Assuming you have eth1 as the secondary NIC :
File : /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 ONBOOT=yes TYPE=Ethernet IPV6INIT=no USERCTL=no BRIDGE=intbr0
Start the bridge:
root> ifup intbr0
Please check if the new intbr0 is now up and running with the following command.
ifconfig
Almalinux 8.x/9.x
Configuring an internal bridge on an AlmaLinux server is similar to setting up a normal bridge.
The commands to create an internal bridge are the same as those used for a normal bridge, viifbr0.
Note: The IP address range 192.168.1.x is being used as an example.
# nmcli connection add type bridge con-name intbr0 ifname intbr0 # nmcli connection modify intbr0 ipv4.addresses '192.168.1.2/24' ipv4.dns '192.168.1.3' ipv4.method manual # nmcli connection up intbr0
If you have a secondary NIC for interserver internal network, you can set the following
Assuming you have eth1 as the secondary NIC :
# nmcli connection add type bridge con-name intbr0 ifname intbr0 # nmcli connection modify intbr0 ipv4.addresses '192.168.1.2/24' ipv4.dns '192.168.1.3' ipv4.method manual
# nmcli connection modify eth1 master intbr0 # nmcli connection modify intbr0 connection.autoconnect-slaves 1 # nmcli connection up intbr0 # nmcli connection up eth1
Ubuntu 16.x or lower (Ifupdown)
File : /etc/network/interfaces
You can add the following lines in the above file :
auto intbr0
iface intbr0 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
If you have a secondary NIC for interserver internal network, you can set the following :
Assuming you have eth1 as the secondary NIC :
auto intbr0
iface intbr0 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports eth1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
Start the bridge:
root> ifup intbr0
Please check if the new intbr0 is now up and running with the following command.
ifconfig
Ubuntu 18.x (netplans)
To configure internal network bridge on netplan, you will need to make changes in the configuration file present under /etc/netplan/ directory with .yaml extension.
Example file : /etc/netplan/01-netcfg.yaml
network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no bridges: viifbr0: addresses: - 1.2.3.4/24 interfaces: [ eth0 ] gateway4: 1.2.3.254 macaddress: 00:50:56:00:6e:41 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 intbr0: addresses: - 192.168.1.1/24
If you have a secondary NIC for inter server internal network, you can set the following :
Assuming you have eth1 as the secondary NIC :
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
eth1:
dhcp4: no
bridges:
viifbr0:
addresses:
- 1.2.3.4/24
interfaces: [ eth0 ]
gateway4: 1.2.3.254
macaddress: 00:50:56:00:6e:41
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
intbr0:
addresses:
- 192.168.1.1/24
interfaces: [ eth1 ]
Once done with the above mentioned configuration , you can run the below command to apply the configuration
sudo netplan apply.
Please check if the new intbr0 is now up and running with the following command.
ifconfig
Creating IP Pool
Now you simply need to create an IP Pool in Virtualizor.
The following is a screenshot of a sample IP Pool :
That is it. You are now set to assign IPs.
Assigning Internal IPs
After your IP Pool is created, you can now assign the Internal IP Addresses.
You can specify the same in your WHMCS billing module or while creating / editing a VM in Virtualizor.
The following is a screenshot of the Virtualizor VPS Creation wizard :
Virtualizor will assign the network IPs to the VM when the VPS is started.
The VM will have two network interfaces i.e. one for the public IP addresses and the other for the internal IP network.
Multiple Nodes Range
If your network setup is correct you can also use the IP Pool across multiple nodes.
While creating the IP Pool, just choose "All Servers" or the "Node Group" accordingly.