cancel
Showing results for 
Search instead for 
Did you mean: 

AIX and nslookup

vince_laurent
Active Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vince_laurent
Active Participant
0 Kudos

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%2Fns...

Answers (3)

Answers (3)

Former Member
0 Kudos

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

former_member188883
Active Contributor
0 Kudos

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

vince_laurent
Active Participant
0 Kudos

Thanks for testing.  I had other IBM'r test and have similiar results.

Former Member
0 Kudos

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