> According to the docs: > > On UNIX systems the defaults are read from the following files, in the > order indicated: > > /etc/resolv.conf > $HOME/.resolv.conf > ./.resolv.conf > > What OS is this server running? > > Try running this: > > perl -MNet::DNS -e '$r=Net::DNS::Resolver->new;print join " > ",$r->nameservers, "\n";' > > You should get the same ip addresses that are in your /etc/resolv.conf
I think we might be on to something here. Running: RHEL3 I have two servers in my resolv.conf file. The first one is acting up, the 2nd one is working fine. When I do a dig or nslookup, it is using the 2nd one all the time. One poster suggested that Net::DNS isn't very good at going to the #2 server if the #1 one screws up. So I took out the #1 server completely (so there is only one server in resolv.conf right now, nslookup and dig still working normal). Then tried Net::DNS stuff and got the same results. However, I ran your code and much to my surprise, it listed BOTH servers! So I thought maybe Net::DNS looks at it when it is first installed. Tried to reinstall Net::DNS from source, still nothing. Wonder if I need to remove the RPM version before installing from source? I have: [EMAIL PROTECTED] tmp]# rpm -qa | grep DNS perl-Net-DNS-0.31-3.1 Installed. At any rate, I think (or maybe I should say I HOPE) the problem is Net::DNS is looking at a server that isn't reliable, and not going to the backup. Now I am not sure how to get Net::DNS to recognize that there is only 1 server to use (or at least make it so the GOOD server is used first). Thanks again, hope we are on to something here! - Austin