
networking.service は 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 が起動時に失敗する:
● 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.
networking.service が失敗しているにもかかわらず、すべての IPv6 は動作しています。
何が問題なのか全く分かりません。
答え1
IPv6 で古いインターフェース エイリアス形式 ( ) を使用しようとしていますeth0:x
が、うまくいきません。これらは実際には別々のインターフェースではなく、また、これまでもそうであったことはありません。また、10 年以上も使用しないことが推奨されてきました。使用すべきではありません。(また、この方法について Debian wiki にある長い間使用されていない警告は無視してください。)
正しい構成は、すべてのアドレスをインターフェースに配置することです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