ping:名称解析暂时失败


12

我尝试在Ubuntu 17.04中加快DNS查找的速度,并按照此处第二篇文章的说明进行操作:Ubuntu 17.04 systemd解析的DNS查找随机失败

结果:一旦我重新启动,名称解析就根本不起作用:

ping www.google.com
ping: www.google.com: Temporary failure in name resolution

键入后一切正常

sudo systemctl restart systemd-resolved

如何解决?每次重新启动后必须键入此命令并不理想。


Answers:


1

职位按等级排序,因此“第二职位”可能会随时间而变化。似乎还没有,并假设您确实遵循了以下方面的指示:

https://superuser.com/a/1154386/293731

然后,在说明中禁用了 systemd-resolved,使其不再在启动时自动启动。只需运行以下命令并重新启动,它应该可以再次工作:

sudo systemctl enable systemd-resolved.service
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.