我正在使用焦点 Ubuntu 20.04.1 LTS(托管虚拟机)
有时在重新启动后 DNS 解析失败(例如ping google.com > Resource temporarily unavailable
)
为了“解决”这个问题,我重新启动了机器。
什么是正确的解决方法,为什么偶尔会发生这种情况?
的内容resolv.conf
表示文件由systemd-resolved
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
# No DNS Servers known
示例错误:
wal@www:~$ ping google.com
ping: google.com: Resource temporarily unavailable