Não é possível adicionar vários IPs à interface de rede.
Ao tentar adicionar um IP à interface enp2s0 via Webmin, ele diz:
Failed to save interface : Missing or invalid interface name
É um bug conhecido no Webmin, então vamos pular isso agora.
Modificando o / etc / network / interfaces diretamente
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp2s0
allow-hotplug enp2s0
iface enp2s0 inet static
address XX.4.87.10
netmask 255.255.255.224
gateway XX.4.87.1
# route XX.4.87.0/27 via XX.4.87.1
up route add -net XX.4.87.0 netmask 255.255.255.224 gw XX.4.87.1 dev enp2s0
iface enp2s0 inet static
address XX.4.87.47
netmask 255.255.255.224
gateway XX.4.87.33
up route add -net XX.4.87.0 netmask 255.255.255.224 gw XX.4.87.33 dev enp2s0
iface enp2s0 inet static
address XX.4.87.37
netmask 255.255.255.224
gateway XX.4.87.33
up route add -net XX.4.87.0 netmask 255.255.255.224 gw XX.4.87.33 dev enp2s0
iface enp2s0 inet6 static
address XXXX:4f8:140:701e::2
netmask 64
gateway fe80::1
O primeiro (IP principal) e o segundo na lista são sempre conectáveis, mas o terceiro permanentemente não. Então, eu sou capaz de mudar a ordem de IPs e pode acessar o meu servidor depois de uma reinicialização, o que estou fazendo de errado?
(Eu também tentei o método legado do Debian Docs, mas isso está travando tudo)
root@hdtu1 ~ # systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-08-01 22:40:12 CEST; 7s ago
Docs: man:interfaces(5)
Process: 2184 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 2179 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude
Main PID: 2184 (code=exited, status=1/FAILURE)
Aug 01 22:40:12 hdtu1 systemd[1]: Starting Raise network interfaces...
Aug 01 22:40:12 hdtu1 ifup[2184]: RTNETLINK answers: File exists
Aug 01 22:40:12 hdtu1 ifup[2184]: ifup: failed to bring up enp2s0
Aug 01 22:40:12 hdtu1 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 01 22:40:12 hdtu1 systemd[1]: Failed to start Raise network interfaces.
Aug 01 22:40:12 hdtu1 systemd[1]: networking.service: Unit entered failed state.
Aug 01 22:40:12 hdtu1 systemd[1]: networking.service: Failed with result 'exit-code'.