Operating System - HP-UX
1833187 Members
2933 Online
110051 Solutions
New Discussion

Re: DNS name resolution not working

 
SOLVED
Go to solution
praveen..
Super Advisor

DNS name resolution not working

Hi,
How can I check whether DNS1 (120.115.18.12) is working for our servers as a DNS server or not?

# more /etc/resolv.conf
search company.com
nameserver 120.115.18.12
nameserver 120.115.18.12
#

Please suggest
Thanks
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: DNS name resolution not working

Hi:

YOu could do:

# nslookup
> set all

...this will show you the options, policies and servers used.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: DNS name resolution not working

Shalom,

checklist:

See if you can ping the servers.

Do a simple nslookup for an outside hostname.

All nslookup results include the server used to provide the answer.

If you are having a problem consider taking out the search statement.

Why are there two duplicate name servers in there? The point of this file is to have alternate servers to provide answers when the primary dns server is down.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
praveen..
Super Advisor

Re: DNS name resolution not working

sorry, i typed wrong , correct one is....

# more /etc/resolv.conf
search company.com
nameserver 120.115.18.12
nameserver 120.115.18.13
#

# nslookup
*** Can't find server name for address 120.115.18.12: Non-existent domain
Using /etc/hosts on: server_hostname

> set all
Set options:
noswtrace querytype=A

#Lookups = 3
files [RCCC] nis [RCCC] dns [RRRR]

Default Name Server: dns2.company.com
Address: 120.115.18.13

Default NIS Server:

Default files Server: server_hostname

>
>

Please suggest
James George_1
Trusted Contributor

Re: DNS name resolution not working

Check your /etc/nsswitch.conf file

Does that has the dns in the search ?

Rgds / James
forum is for techies .....heaven is for those who are born again !!
Bill Hassell
Honored Contributor
Solution

Re: DNS name resolution not working

DNS and /etc/hosts need some directions on how to resolve hostnames and IP addresses. Copy this file into /etc/nsswitch.conf to define how name resolution will work:

passwd: files
group: files
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes: files [NOTFOUND=return] dns
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files

Then to check name resolution, use nslookup and also nsquery:

nslookup hp.com
nsquery hosts hp.com

You can test each server all by itself like this:

nslookup hp.com 120.115.18.12
nslookup hp.com 120.115.18.13

If neither responds, then your system is blocked from using these servers.


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: DNS name resolution not working

While it isn't as user friendly as nslookup, the DNS crowd have been trying to get folks to switch to using dig. It may not be there on 11.11, but should (IIRC) be there on 11.23.
there is no rest for the wicked yet the virtuous have no pillows
praveen..
Super Advisor

Re: DNS name resolution not working

Thanks