首页 文章

重现“名称解析暂时失败”

提问于
浏览
0

在Linux中执行 ping google.com 时,如何手动重现 Temporary failure in name resolution 错误?

也许,我可以自己添加一个破坏的DNS服务器并在_818606中指定它?

我需要这个来测试我的项目 .

1 回答

  • 0

    你可以在_818607中试试这个:

    hosts:          files
    

    这是为 hosts 情况删除所有 dns 服务的痕迹(正常的行更像是 hosts: files dns ,但在更改它之前看看你的) .

    然后,如果名称/ IP在 /etc/hosts 中,则名称解析起作用,如果不起作用,则不起作用,因为不咨询DNS .

相关问题