在Unix / Linux中搜索名称解析的顺序
发布时间:2020-12-15 18:33:06 所属栏目:安全 来源:网络整理
导读:可以说/etc/resolv.conf有以下内容.. nameserver 10.10.10.10search x.com y.com 对于分辨率“ping foo”,我看到解析器首先使用配置的搜索域(即:foo.x.com,foo.y.com)尝试FQDN,然后尝试默认的“foo”. 所有* nix平台的行为是否一致?或者某些实现可以首先在
可以说/etc/resolv.conf有以下内容..
nameserver 10.10.10.10 search x.com y.com 对于分辨率“ping foo”,我看到解析器首先使用配置的搜索域(即:foo.x.com,foo.y.com)尝试FQDN,然后尝试默认的“foo”. 所有* nix平台的行为是否一致?或者某些实现可以首先在根域中进行短名称解析(即:“foo.”)?
从resolv.conf手册页:
options ndots:n Sets a threshold for the number of dots which must appear in a name given to res_query(3) (see resolver(3)) before an initial absolute query will be made. The default for n is 1,meaning that if there are any dots in a name,the name will be tried first as an absolute name before any search list elements are appended to it. The value for this option is silently capped to 15. 因此,如果resolv.conf具有选项ndots:0,它将立即尝试根域搜索而不尝试任何搜索列表域.该联机帮助页似乎表明它应该尝试搜索根目录中是否存在查询域,但是我的解析器在测试时没有这样做.否则,如果没有点,它首先按顺序尝试搜索元素,然后在耗尽列表后尝试根域.注意,您可以设置搜索.它将根域放在搜索列表中. 另一件需要注意的事情是,如果请求在到达之前被另一个nsswitch.conf机制满足,那么你的名字解析可能永远不会成为resolv.conf. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- BootStrap轻松实现微信页面开发代码分享
- 【BootStrap】carousel插件实现图片轮播
- 当reloadOnSearch为false时,$location.search上的AngularJs
- WebServiceHelper类
- 【Angular】新手入门(一)
- 如何更改Observable对象的属性. Angular 2 / BehaviorSubje
- typescript – 如何使用Webpack和Angular2包含外部css文件?
- Shell脚本基础知识
- shell – 如何在travis上启动和停止后台任务?
- uploadify3.1版本上传附件,后台用webservice处理上传文件总