Mac OSX Lion DNS查找顺序 [英] Mac OSX Lion DNS lookup order
问题描述
升级到Mac OSX Lion后,我发现/ etc / hosts没有首先查找,以便进行名称解析。这导致一些副作用,如:
After upgrading to Mac OSX Lion I figured out that /etc/hosts is not looked up in first place for name resolution anymore. This leads to some side effects like:
- / etc / hosts中的条目解决了痛苦缓慢
- 你不能覆盖现有的域,例如127.0.0.1 www.google.com
- 如果您从DHCP获取搜索域条目,请说.lan,一些有趣的人将localhost.lan配置到其他位置,然后是127.0.0.1本地DNS您不能再到达本地主机了。
有什么意义吗?最重要的是,我怎么能回到旧的行为。
Is this behavior intended? Does it make any sense? And most important, how can I come back to the old behavior.
推荐答案
我认为他的事情是Lion处理.local TLD不同因为它被保留用于某些组播DNS功能(由Bonjour使用)。我发现解决这个问题的唯一方法是为开发主机使用不同的TLD(即:.dev)。这对我来说很好,希望对他人有帮助!
I think he matter is Lion handles .local TLD differently because it's reserved for some Multicast DNS features (used by Bonjour). The only way i found to solve this issue is using a different TLD for development hosts (ie: .dev). It works fine for me, hope it's gonna be helpful to others!
这篇关于Mac OSX Lion DNS查找顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!