在Linux中执行 ping google.com 时,如何手动重现 Temporary failure in name resolution 错误?
ping google.com
Temporary failure in name resolution
也许,我可以自己添加一个破坏的DNS服务器并在_818606中指定它?
我需要这个来测试我的项目 .
你可以在_818607中试试这个:
hosts: files
这是为 hosts 情况删除所有 dns 服务的痕迹(正常的行更像是 hosts: files dns ,但在更改它之前看看你的) .
hosts
dns
hosts: files dns
然后,如果名称/ IP在 /etc/hosts 中,则名称解析起作用,如果不起作用,则不起作用,因为不咨询DNS .
/etc/hosts
1 回答
你可以在_818607中试试这个:
这是为
hosts
情况删除所有dns
服务的痕迹(正常的行更像是hosts: files dns
,但在更改它之前看看你的) .然后,如果名称/ IP在
/etc/hosts
中,则名称解析起作用,如果不起作用,则不起作用,因为不咨询DNS .