
네트워킹.서비스가 eth0:2 및 eth0:3을 표시하지 못하지만 구성이 올바른 것 같습니다.
여러 가지를 시도했고 NIC 이름도 ens3에서 eth0으로 바꿨습니다.
/etc/네트워크/인터페이스:
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
예상되는:
부팅 시 eth0 및 eth0:1이 자동으로 표시됩니다.
ifup eth0:2 및 ifup eth0:3은 다른 NIC를 불러옵니다.
실제:
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
오류가 발생하지만 오류에도 불구하고 어댑터가 로드되고 IPv6이 작동합니다.
또한 내가 추가하면
자동 eth0:2
자동 eth0:3
네트워킹.서비스가 부팅 시 실패합니다.
● 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.
네트워킹 서비스가 실패하더라도 모든 IPv6은 작동합니다.
나는 문제가 무엇인지 전혀 모른다.
답변1
IPv6에서 더 이상 사용되지 않는 인터페이스 별칭 형식( )을 사용하려고 하는데 eth0:x
작동하지 않습니다. 이는 실제로 별도의 인터페이스가 아니며 그런 적도 없습니다. 또한 10년 이상 사용하지 않는 것이 좋습니다. 그렇게 해서는 안 됩니다. (그리고 이 방법에 대한 데비안 위키의 오랫동안 사용되지 않는 경고를 무시해야 합니다.)
올바른 구성은 모든 주소를 인터페이스에 배치하는 것입니다 eth0
(또는 더 이상 ens3
존재해서는 안 됩니다 eth0
).
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