Operating System - HP-UX
1847639 Members
3608 Online
110265 Solutions
New Discussion

DNS name resolution problem

 
u856100
Frequent Advisor

DNS name resolution problem

Chaps and girls,

I have just set up dns on two test machines (primary and secondary). What I would like to accomplish is some sort of confidence in the updating process (for host name resolution) as our network is regularly being updated (addition and removal) with hp servers.

so... I have set up a primary and secondary DNS server. I make changes to the etc/hosts file on the prim (remove server 'N') and then run hosts_to_named -f /etc/named.data/param. After this I run sig_named restart on the prim. I have modified the db.XXX.XXX.XXX network map so that refreshes occur every minute (just for test purposes). But when I try to ping this networked server, the resolve is taking place and I get a response (using the alias for the ping command).

I have checked the /etc/nsswitch.conf file which I have set to return if the entry is not found in DNS. Just for elimination purposes, the entry has also been removed from /etc/hosts and NIS host map entries.

any suggestions out there?
Am I missing something fundamental (probably)

thanks in advance

John
chicken or egg first?
6 REPLIES 6
Clemens van Everdingen
Honored Contributor

Re: DNS name resolution problem

Hi.

Are both DNS servers in your /etc/resolv.conf ?

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
U.SivaKumar_2
Honored Contributor

Re: DNS name resolution problem

hi,
try this
#nslookup
>server "your_primary_server_ip"
>oldserver.yourdomain.com ( give that server name )
The reply should not come for that name.
check the forward zone file db.yourdomain.com
whether that entry has been deleted or not.
see /var/adm/syslog/syslog.log that the named
has restarted or not due to your signal.

regards,
U.SivaKumar

Innovations are made when conventions are broken
Christopher Caldwell
Honored Contributor

Re: DNS name resolution problem

I don't exactly understand your problem ... but
to debug DNS, try something like this (insteady of ping):

$ nslookup -d2
> set type=any
> name.ofyourhost.com.

Check the results to
1) figure out where the resover got the name
(e.g. DNS, NIS, FILES).
2) check the serial number of the zone, to make sure you are in fact looking at the current zone
3) check to see if you're getting the right answer.

In addition, after the "set type=any" directive, you can issue a directive like
> server name.ofyourprimarydnsserver.com
> name.ofyourhost.com.
to check the primary
and then
> server name.ofyoursecondaryserver.com
> name.ofyourhost.com.
to see what the secondary thinks.

If you're using older version of bind ( <8 ) then when you change the zone file on the primary, you have to either restart the secondary to get it to see the updated zone or
you have to wait up to refresh seconds to pick up the updated zone.




u856100
Frequent Advisor

Re: DNS name resolution problem

Crikey, that was quick!

Clemens,

yes, they are both in there.

U,

good suggestions, with your help I have managed to get it half working, however, when using the hosts_to_named command the secondary server updates immediately which is OK, but does not increment its serial number.

i.e.
The secondary server db. file updates OK and replicates the new hosts list but does not increment its own serial number. So I assume this file will always see the primary db. map as being new.

thanks for your help so far!

john


chicken or egg first?
Christopher Caldwell
Honored Contributor

Re: DNS name resolution problem

The secondary gets its serial number from the primary, either via
# sig_named restart
on the secondary
or
waiting for at most refresh seconds on the secondary.
u856100
Frequent Advisor

Re: DNS name resolution problem

oh dear!

I think I have found the problem...

the renamed map file (db. to named.boot) was left by myself in the named.data directory, so the named daemon could not find it on startup.

I have moved it to its correct location in /etc and have rebooted. Hopefully this should resolve the problem.

thanks for everyones help! much appreciated

john
chicken or egg first?