
networking.service não traz eth0:2 e eth0:3, mas minha configuração parece correta.
Eu tentei várias coisas, também renomeei a NIC de ens3 para eth0
/etc/rede/interfaces:
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet static
address xx.xxx.xxx.xxx/22
gateway xx.xxx.xxx.x
allow-hotplug eth0:1
auto eth0:1
iface eth0:1 inet6 static
address 2a03:xxxx:x:xxxx::1000/64
gateway fe80::1
allow-hotplug eth0:2
iface eth0:2 inet6 static
address 2a03:xxxx:x:xxxx::2000/64
gateway fe80::1
allow-hotplug eth0:3
iface eth0:3 inet6 static
address 2a03:xxxx:x:xxxx::3000/64
gateway fe80::1
Esperado:
Na inicialização, eth0 e eth0:1 são ativados automaticamente.
ifup eth0:2 e ifup eth0:3 trazem as outras NICs
Real:
ifup eth0:2
RTNETLINK answers: File exists
ifup: failed to bring up eth0:2
ifup eth0:3
RTNETLINK answers: File exists
ifup: failed to bring up eth0:3
Dá ERRO, mas apesar do erro o adaptador está carregado e o IPv6 está funcionando.
Além disso, se eu adicionar
auto eth0:2
auto eth0:3
networking.service falha na inicialização:
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-07-19 20:29:26 CEST; 1min 21s ago
Docs: man:interfaces(5)
Process: 409 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Main PID: 409 (code=exited, status=1/FAILURE)
Jul 19 20:29:24 root systemd[1]: Starting Raise network interfaces...
Jul 19 20:29:24 root ifup[409]: ifup: waiting for lock on /run/network/ifstate.eth0
Jul 19 20:29:26 root ifup[409]: Waiting for DAD... Done
Jul 19 20:29:26 root ifup[409]: RTNETLINK answers: File exists
Jul 19 20:29:26 root ifup[409]: ifup: failed to bring up eth0:2
Jul 19 20:29:26 root ifup[409]: RTNETLINK answers: File exists
Jul 19 20:29:26 root ifup[409]: ifup: failed to bring up eth0:3
Jul 19 20:29:26 root systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 19 20:29:26 root systemd[1]: networking.service: Failed with result 'exit-code'.
Jul 19 20:29:26 root systemd[1]: Failed to start Raise network interfaces.
Apesar da falha do networking.service, todos os IPv6 estão funcionando.
Não tenho ideia de qual é o problema.
Responder1
Você está tentando usar o formato de alias de interface obsoleto ( eth0:x
) com IPv6 e isso não funciona. Na verdade, essas não são interfaces separadas e nunca foram. Também foi recomendado não usá-los por mais de uma década. Você não deveria fazer isso. (E você deve ignorar o aviso há muito obsoleto no wiki do Debian sobre esse método.)
A configuração correta é colocar todos os endereços na interface eth0
(ou melhor, ens3
como não deveria eth0
mais estar).
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet static
address xx.xxx.xxx.xxx/22
gateway xx.xxx.xxx.x
iface eth0 inet6 static
address 2a03:xxxx:x:xxxx::1000/64
gateway fe80::1
iface eth0 inet6 static
address 2a03:xxxx:x:xxxx::2000/64
iface eth0 inet6 static
address 2a03:xxxx:x:xxxx::3000/64