Eu configurei um servidor Ubuntu 16.04 como convidado no Virtualbox.
O servidor usa 3 interfaces nas configurações de rede: Somente host, NAT, Bridged
O arquivo / etc / network / interfaces é definido da seguinte forma:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# Host-only interface
auto eth0
iface eth0 inet static
address 192.168.56.105
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
# NAT interface
auto eth1
iface eth1 inet dhcp
# Bridged interface
auto eth2
iface eth2 inet static
address 192.168.0.105
netmask 255.255.255.0
gateway 192.168.0.255
dns-nameservers 8.8.8.8
Eu desativei a opção "Predictable Network Interface Names" na configuração do grub
GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0"
Durante a reinicialização, tenho esta mensagem:
Failed to start Raise network interfaces
mas quando eu executo ifconfig tudo parece ok:
eth0 Link encap:Ethernet HWaddr 08:00:27:37:e4:c4
inet addr:192.168.56.105 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe37:e4c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:311 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35338 (35.3 KB) TX bytes:5530 (5.5 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:d6:8d:1a
inet addr:10.0.3.15 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fed6:8d1a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2970 (2.9 KB) TX bytes:3063 (3.0 KB)
eth2 Link encap:Ethernet HWaddr 08:00:27:6d:be:ad
inet addr:192.168.0.105 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6d:bead/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:634 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:55125 (55.1 KB) TX bytes:1988 (1.9 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
No entanto, quando eu corro
sudo service networking restart
Eu recebo esta mensagem:
Job for networking.service failed because the control process exited with
error code. See "systemctl status networking.service" and "journalctl -xe"
for details.
Aqui está o resultado de journalctl -xe
-- Unit networking.service has begun starting up.
May 07 16:31:54 jakku ifup[2056]: RTNETLINK answers: File exists
May 07 16:31:54 jakku ifup[2056]: Failed to bring up eth2.
May 07 16:31:54 jakku systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
May 07 16:31:54 jakku systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking.service has failed.
Alguém pode me ajudar?