停用 IPv6 時,Debian 10 Buster 無法將 DHCP 續訂為用戶端

停用 IPv6 時,Debian 10 Buster 無法將 DHCP 續訂為用戶端

我將 Debian 9 升級到 10 Buster 伺服器在重新啟動後 24 小時後失去網路連接,我認為問題是它無法從 DHCP 伺服器更新 IP 位址。

/var/lib/dhcp看到裡面有過期日期的文件dhclient.eth0.leases

該服務在 Debian 9 上正常,在 Debian 10 上我看到此錯誤:

root@debian:~# 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 Thu 2019-07-25 15:18:02
CEST; 2h 39min ago
     Docs: man:interfaces(5)
  Process: 380 ExecStart=/sbin/ifup -a --read-environment
(code=exited, status=1/FAILURE)
 Main PID: 380 (code=exited, status=1/FAILURE)

Jul 25 15:18:01 debian-2gb-nbg1-2 dhclient[402]: DHCPREQUEST for
116.203.xx.xx on eth0 to 255.255.255.255 port 67
Jul 25 15:18:01 debian-2gb-nbg1-2 dhclient[402]: DHCPACK of
116.203.xx.xx from 172.31.1.1
Jul 25 15:18:01 debian-2gb-nbg1-2 ifup[380]: DHCPACK of 116.203.xx.xx
from 172.31.1.1
Jul 25 15:18:01 debian-2gb-nbg1-2 dhclient[402]: bound to
116.203.xx.xx -- renewal in 34516 seconds.
Jul 25 15:18:01 debian-2gb-nbg1-2 ifup[380]: bound to 116.203.xx.xx
-- renewal in 34516 seconds.
Jul 25 15:18:02 debian-2gb-nbg1-2 ifup[380]: RTNETLINK answers:
Permission denied
Jul 25 15:18:02 debian-2gb-nbg1-2 ifup[380]: ifup: failed to bring up eth0:0
Jul 25 15:18:02 debian-2gb-nbg1-2 systemd[1]: networking.service: Main
process exited, code=exited, status=1/FAILURE
Jul 25 15:18:02 debian-2gb-nbg1-2 systemd[1]: networking.service:
Failed with result 'exit-code'.
Jul 25 15:18:02 debian-2gb-nbg1-2 systemd[1]: Failed to start Raise
network interfaces.

謝謝你的幫忙。

編輯:問題已解決,看起來 Debian 10 不喜歡像 v9 那樣停用 IPv6。

如果有人知道如何在 Buster 中停用 IPv6,請告訴我們。

# disabling of IPv6 in Debian 9, not working in Debian 10
/etc/sysctl.conf
    net.ipv6.conf.all.disable_ipv6=1
    net.ipv6.conf.default.disable_ipv6=1
    net.ipv6.conf.lo.disable_ipv6=1

相關內容