In order to use the additional addresses on the server the package “iproute” and service program “ip” are needed. Configuration with alias interfaces (such as eth0:1, eth0:2 etc.) are outdated and should no longer be used.

To add an address please run:

$ ip addr add dev enp2s0 – additional IP,
enp2s0 – name interfaces.

To determine the name of the network interface, run:

$ ifconfig

This method is the simplest and fastest, however, after rebooting the server, the settings are not saved and the additional IP will not be available.

To permanently configure an additional IP, add the following lines to the /etc/network/interfaces file under the appropriate interface (for example, “enp2s0”):

up ip addr add dev enp2s0
down ip addr del dev enp2s0

The config should look something like this:

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto enp2s0
iface enp2s0 inet static
# route via
up route add -net netmask gw dev enp2s0

up ip addr add dev enp2s0
down ip addr del dev enp2s0

iface enp2s0 inet6 static
address 2a01:4f8:202:5264::2
netmask 64
gateway fe80::1

To apply the settings, restart the service:

$ service networking restart

Network setup through systemd-networkd.

Starting with versions of Debian 8 and Ubuntu 16.04, it is possible to use the systemd-networkd daemon. You need systemd version 210 and higher. You can check the version using the command:

$ systemctl –version

If the network is configured using /etc/network/, you must rename the interface file under a different name so that it is not used after setting up systemd-networkd:

$ mv /etc/network/interfaces /etc/network/

Then add systemd-networkd to the system startup, but do not start the service, because the network is not yet defined in systemd-networkd:

$ systemctl enable systemd-networkd

All configuration files are stored in /etc/systemd/network. Please note that case is important in configuration files.

Creat file



Address= – main IP server,
Address= – additional IP.

Star systemd-networkd:

$ systemctl start systemd-networkd