IBM Support

IBM AIX: behavior of host name resolution

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 file

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:

  1. Look up the IPv6 address in /etc/hosts
  2. Query the IPv6 address from the DNS server
  3. Look up the IPv4 address in /etc/hosts
  4. Query the IPv4 address from the DNS server

To suppress all IPv6 queries, change /etc/netsvc.conf from "hosts=local,bind" to "hosts=local4,bind4".

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.

DNS :

If /etc/resolv.conf exists,  it must refer to at least one but not more than three DNS servers.  For example:
search <domain>
nameserver <ip_address>
nameserver <ip_address>
nameserver <ip_address>
options timeout:1 attempts:2
Details about the format of /etc/resolv.conf may be found at

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:

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:
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.ibm.com/support/docview.wss?uid=ibm10733581

f.  Click here to submit feedback for this document.


Operating System

AIX:All operating systems listed


[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

More support for:
AIX

Software version:
All Versions

Operating system(s):
AIX

Document number:
885142

Modified date:
30 May 2019

UID

ibm10885142

Manage My Notification Subscriptions