Skip to Content

AIX and nslookup

OK... day 2 on IBM AIX for me (from using HP-UX).

I am unable to get nslookup to the use /etc/hosts file regardless of what I have in the resolv.conf and netsvc.conf.

So... does nslookup on IBM NOT use /etc/hosts? How does SAP use /etc/hosts? I ask for we have THOUSANDS of printers on our SAP box and the last thing I need to do is managed the unix side via DNS.

More AIX questions to come...

Thanks!

Vince

AIX 7.1 Oracle 11.2.0.3

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Aug 30, 2013 at 01:26 PM

    Here is the reply from IBM:

    Hostname resolution is determined by the host or nslookup commands on a server. When using the host command to resolve a hostname or IP, the system will look at the /etc/netsvc.conf file and check for the hostname resolution order that is set in there. The most typical configuration is hosts=local,bind4. The local variable means that when the host command is run, it will look to resolve the hostname or IP in the /etc/hosts file first. If it does not find an entry for the hostname or IP you are looking for in the /etc/hosts file, it will look to the DNS server. This is represented by the bind variable. The 4 simply means that we are suppressing IPv6 addresses.

    The nslookup command will never look at the /etc/hosts file. This command is designed to strictly use DNS and look at the name server to resolve hostname or IP being searched upon. Here is a link to the nslookup man page that describes the commands functionality in more detail.

    http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds4%2Fnslookup.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 06:59 PM

    SAP does use /etc/hosts . We sometimes end up building SAP systems with virtual host entries in /etc/hosts ( though followed by DNS later on)

    Regards

    Amit Padmawar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 30, 2013 at 02:28 AM

    Hi Vince,

    I did a quick check for my SAP instance on AIX where I have 2 systems .

    Test with a system where DNS is disabled

    --------------------------------------------------------------

    C:\Users>nslookup 11.176.xx.xx
    Server: hellowc01.abc
    Address: 11.176.xx.xx

    *** helloec01.abc can't find 11.176.xx.xx: Non-existent domain

    Test with system where DNS is enabled

    ----------------------------------------------------------
    C:\Users>nslookup hostbc
    Server: helloec01.abc
    Address: 11.176.xx.xx

    Name: hostbc
    Address: 11.176.xx.xx

    Hope this helps.

    Regards,

    Deepak Kori

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2013 at 07:19 AM

    You can use host command. It can resolve from /etc/hosts.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.