Operating System - HP-UX
1753835 Members
7271 Online
108806 Solutions
New Discussion юеВ

Re: Name resolution problem from DNS server

 
trilokpvp
Frequent Advisor

Re: Name resolution problem from DNS server


Hi,

There is no nsswitch.conf file in /etc folder

when i try nslookup with hostname and ip address it is replaying back.

root:asterix:/etc>nslookup 192.168.70.125
*** Can't find server name for address 192.168.70.90: Non-existent domain
Name Server: alpha.testcorp.com
Address: 192.168.70.50

Trying DNS
Name: asterix.testcorp.com
Address: 192.168.70.125

root:asterix:/etc>nslookup asterix.testcorp.com
*** Can't find server name for address 192.168.70.90: Non-existent domain
Name Server: alpha.testcorp.com
Address: 192.168.70.50

Trying DNS
Name: asterix.testcorp.com
Address: 192.168.70.125

root:asterix:/etc>cat resolv.conf

domain testcorp.com
nameserver 192.168.70.90
nameserver 192.168.70.50

root:asterix:/etc>cat hosts
192.168.70.125 asterix.testcorp.com asterix
# 192.168.70.125 asterix asterix.test.com
# 192.168.70.126 asterix
# 192.168.72.10 asterix
127.0.0.1 localhost loopback

root:asterix:/etc>cat nsswitch.conf
cat: Cannot open nsswitch.conf: No such file or directory
root:asterix:/etc>

Both DNS servers is pining, it is reolving the name from 192.168.70.50 server.

sujit kumar singh
Honored Contributor

Re: Name resolution problem from DNS server

Hi

important observation is that you are able to Ping both the servers that is 192.168.70.50 and 192.168.70.90 , but resolution is taking place using the 192.168.70.50right?

But you can also see during the nslookup that the server 192.168.70.90 Non-Existent.


To Explicitly resolve the name using the 192.168.70.90 do a name lookup as follows and tell the results (It can throw errors : please note them)


#nslookup
#nslookup 192.168.70.125 192.168.70.90


see if that fails.

To confirm the same again, invoke nslookup without any options, this takes you to interactive mode

there at the nslookup propmpt type "server 192.168.70.90" -- this means to choose server 192.168.70.90 for the nam resoultion tests

like
#nslookup
>server 192.168.70.90
>192.168.70.125 --- IP address for name resoultion (it shall use 192.168.70.90 as DNS)

>exit --- to exit or CTRL+C

see if the above tests give errors and what are those.

If that seems that the DNS 192.168.70.90 is not responding to DNS requests.

"please get in touch with the WiN DNS Admin for the server 192.168.70.90."


However on your server you can add the following things:(Log On as the root user)

1)edit the hosts file to add the names of both the DNS as follows and save and exit.

#vi /etc/hosts
192.168.70.125 asterix.testcorp.com asterix
# 192.168.70.125 asterix asterix.test.com
# 192.168.70.126 asterix
# 192.168.72.10 asterix
127.0.0.1 localhost loopback


192.168.70.50 alpha.testcorp.com
192.168.70.90

2)create a new file /etc/nsswitch.conf and add one line to it and save and exit.

#vi /etc/nsswitch.conf
hosts: files dns nis

this will properly configure the DNS services.

regards
sujit

James R. Ferguson
Acclaimed Contributor

Re: Name resolution problem from DNS server

Hi Trilok:

> There is no nsswitch.conf file in /etc folder

There is never a file named '/etc/nsswitch.conf' following a cold-install of HP-UX. There _ARE_ files named:

/etc/nsswitch.compat
/etc/nsswitch.files
/etc/nsswitch.nis
/etc/nsswitch.hp_defaults
/etc/nsswitch.nisplus
/etc/nsswitch.ldap

You are expected to _COPY_ one of these as '/etc/nsswitch.conf' and modify it according to your needs. I think you missed that when Bill originally replied to you.

Also, UNIX does not use the term "folder". The correct word is "directory".

Regards!

...JRF...