签到成功

知道了

CNDBA社区CNDBA社区

AIX域名解析顺序

2022-03-11 11:29 1391 0 原创 AIX
作者: hbhe0316

How To

Summary
This article describes how the AIX host name resolver works in different scenarios.

Objective
Explain about behavior of host name resolution in AIX

Steps
Name resolver subroutines on systems running TCP/IP may attempt to resolve host names and IP addresses using the following sources:

BIND/DNS (domain name server, named)
Network Information Service (NIS)
The local /etc/hosts filehttp://www.cndba.cn/hbhe0316/article/107871

By default, these subroutines first attempt resolution using BIND/DNS. If the /etc/resolv.conf file does not exist or if BIND/DNS could not find the entry, NIS is queried if it is running. If NIS is not running then the local /etc/hosts file is searched.

The default order can be overridden by creating the configuration file /etc/netsvc.conf and specifying the desired order. For example:

hosts=local,bind4
Both the default behavior and /etc/netsvc.conf can be overridden with the environment variable NSORDER. For example:

NSORDER=local,bind4
As an example, with “hosts=local,bind” in /etc/netsvc.conf, AIX will:

http://www.cndba.cn/hbhe0316/article/107871

Look up the IPv6 address in /etc/hosts
Query the IPv6 address from the DNS server
Look up the IPv4 address in /etc/hosts
Query the IPv4 address from the DNS server

http://www.cndba.cn/hbhe0316/article/107871

To suppress all IPv6 queries, change /etc/netsvc.conf from “hosts=local,bind” to “hosts=local4,bind4”.http://www.cndba.cn/hbhe0316/article/107871

http://www.cndba.cn/hbhe0316/article/107871

Due to the way some system daemons are designed to support both IPv4 and IPv6 addresses, the recommended setting in /etc/netsvc.conf is “hosts=local,bind4”.

Note: Regardless of the system’s configuration, some JVM applications perform an IPv6 host name lookup first, followed by an IPv4 lookup. IPv6 lookups must be manually disabled using a JVM option.

http://www.cndba.cn/hbhe0316/article/107871

DNS :

If /etc/resolv.conf exists, it must refer to at least one but not more than three DNS servers. For example:

search
nameserver
nameserver
nameserver
options timeout:1 attempts:2
Details about the format of /etc/resolv.conf may be found at
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.files/resolv.conf.htm

If any of the name servers cannot be reached or is unresponsive, this may cause long timeouts when a program looks up a host name or IP address, even during the boot process.

DNS testing:http://www.cndba.cn/hbhe0316/article/107871

http://www.cndba.cn/hbhe0316/article/107871

If DNS problems are suspected, follow these steps.

Ping the name server to confirm that it is reachable over the network.

Attempt to query the suspect DNS server using the dig program.

dig @server_ip host_name
For example:

dig @192.168.0.1 www.ibm.com
If dig times out, it means that while the server is pingable, it is not responding to DNS queries.

If the server responds with a SERVFAIL message then it is likely not properly configured or the query is invalid for that DNS server.

Alternately, the host command may be used to perform host name or IP address lookups by following the lookup order in /etc/resolv.conf or NSORDER. The host command also allows the use of the RES_OPTIONS environment variable to provide detailed information about any DNS lookups it does. For example:

http://www.cndba.cn/hbhe0316/article/107871

RES_OPTIONS=debug host www.ibm.com 192.168.0.1

Additional Information
SUPPORT:

If additional assistance is required after completing all of the instructions provided in this document, please follow the step-by-step instructions below to contact IBM to open a case for software under warranty or with an active and valid support contract. The technical support specialist assigned to your case will confirm that you have completed these steps.

a. Document and/or take screen shots of all symptoms, errors, and/or messages that might have occurred

b. Capture any logs or data relevant to the situation.

c. Contact IBM to open a case:

-For electronic support, please visit the IBM Support Community:
https://www.ibm.com/mysupport
-If you require telephone support, please visit the web page:
https://www.ibm.com/planetwide/

d. Provide a good description of your issue and reference this technote

e. Upload all of the details and data to your case

-You can attach files to your case in the IBM Support Community
-Or Upload data to IBM testcase server analysis:

http://www.cndba.cn/hbhe0316/article/107871

http://www.ibm.com/support/docview.wss?uid=ibm10733581

f. Click here to submit feedback for this document.

版权声明:本文为博主原创文章,未经博主允许不得转载。

AIX

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1039629次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ