systemd-resolved 新增選項旋轉 Ubuntu 18.04

systemd-resolved 新增選項旋轉 Ubuntu 18.04

我正在嘗試添加options rotateresolv.confUbuntu 18.04 LTS 升級中

Ubuntu 16.04 LTS:

/etc/resolv.conf -> ../run/resolvconf/resolv.conf

只需添加到即可options rotate處理/etc/resolvconf/resolv.conf.d/body

結果如預期。

nameserver 1.1.1.1
nameserver 1.1.2.2
options rotate

18.04 LTS直接安裝

/etc/resolv.conf -> ../run/resolvconf/resolv.conf
nameserver 127.0.0.53

systemctl disable systemd-resolved
systemctl stop systemd-resolved
apt install network-manager

add to /etc/NetworkManager/NetworkManager.conf
[main]
dns=default

add `options rotate` to `/etc/resolvconf/resolv.conf.d/body`

systemctl restart network-manager
systemctl restart resolvconf

/etc/resolv.conf -> ../run/resolvconf/resolv.conf
nameserver 1.1.1.1
nameserver 1.1.2.2
options rotate

18.04 LTS 從 16.04 LTS 升級

與 18.04 LTS 的步驟相同,resolv.conf最後得到相同的存根解析器 127.0.0.53,

重新啟動後,文件僅以options rotate

有沒有一種方法可以options rotate僅使用systemd-resolved方法來添加,因為這是 Canonical 開發人員所堅持的?

有沒有一種方法(我錯過了)可以幫助禁用systemd-resolved升級後的系統?

由於伺服器上的驅動程式問題,它是從全新安裝的 16.04 LTS 升級的。

相關內容