DNS not working, but host(1) command does. Advice on how to diagnose?

DNS not working, but host(1) command does. Advice on how to diagnose?

Post by Edward A. Fa » Sun, 11 Aug 2002 16:32:17



OK, quick background:  I'm at a friend's house who has a wireless router.
I plug in my card, my machine beeps and I'm on the network.  My new IP address
is 10.0.0.4.  /etc/resolv.conf now reads "nameserver 10.0.0.1".

Any attempt to ping any site on the internet fails after about a minute with
a hostname not found message.  However, I *can* reach any remote site I want
as long as I know its IP address.  Clearly this is a name resolver problem rather
than a connectivity problem.

To make things highly weird, the host(1) command works fine.

Any ideas on how to approach this?  Is the problem caused by lack of domain
name or search list in resolv.conf?

--

http://www.rahul.net/falk/whatToDo.html        #**************F******!******!*!!****
and read 12 Simple Things You Can Do       ******!***************************#**
to Save the Internet                       **#******#*********!**WW*W**WW*****

 
 
 

DNS not working, but host(1) command does. Advice on how to diagnose?

Post by steve housem » Sun, 11 Aug 2002 21:44:03


The nameservers are specified in /etc/resolv.conf as is the
search order (but that shouldnt matter for your prob).
The other place to check is /etc/nsswitch.conf
for the line beginning hosts , which should contain a dns entry
if you want to use dns.  

  Two debugging tools (see man for both) ,
-  tcpdump with -vv option should show dns query flowing (and where to).
-  strace the ping or host or whatever to see what it looks in and
   what it tries to talk to.        

   asnd no I cant count :-)

Hope you fix it soon,

Steve Houseman

--

currently  :                     | for strace afficionados, an annotator see -
steve at houseman demon co uk    | http://www.houseman.demon.co.uk/          

 
 
 

DNS not working, but host(1) command does. Advice on how to diagnose?

Post by Edward A. Fa » Mon, 12 Aug 2002 01:34:10




>The nameservers are specified in /etc/resolv.conf as is the
>search order (but that shouldnt matter for your prob).
>The other place to check is /etc/nsswitch.conf
>for the line beginning hosts , which should contain a dns entry
>if you want to use dns.  

Ah!  I checked /etc/host.conf and didn't see anything wrong, but I
forgot about nsswitch.conf.  The hosts entry is "files nisplus dns".
I half suspect that the system is getting wedged on an NIS query, but
since that line has never caused problems before, I doubt it.

The really frustrating part is that the windoze boxes in the house are
having no problems at all.

Quote:>  Two debugging tools (see man for both) ,
>-  tcpdump with -vv option should show dns query flowing (and where to).

Thanx, I'll give it a try.

Quote:>-  strace the ping or host or whatever to see what it looks in and
>   what it tries to talk to.        

Already tried it; couldn't make any sense out of what I was seeing.  The
ping simply made a call to poll() and didn't come back.  I may actually go
so far as to load up the source code and try to run it in a de*.

Thanx, I'll try that too.

--

http://www.veryComputer.com/;      #**************F******!******!*!!****
and read 12 Simple Things You Can Do       ******!***************************#**
to Save the Internet                       **#******#*********!**WW*W**WW*****

 
 
 

DNS not working, but host(1) command does. Advice on how to diagnose?

Post by steve housem » Mon, 12 Aug 2002 03:13:25


If you dont have nis, then I would remove the nisplus entry ...
it will try to get info via nis , before trying dns ... is that what
you want?                                                

if you dont track it down with the other stuff (although I think
tcpdump should show whats going on) , stick your strace file for ping
on the web and post a url.
(strace -o/tmp/dbin -f -F -tt ping <wherever>
not that I think it will fork ... but who knows))            

Cheers,

Steve Houseman

--

currently  :                     | for strace afficionados, an annotator see -
steve at houseman demon co uk    | http://www.houseman.demon.co.uk/          

 
 
 

DNS not working, but host(1) command does. Advice on how to diagnose?

Post by Peter T. Breue » Mon, 12 Aug 2002 03:44:51



Quote:> Already tried it; couldn't make any sense out of what I was seeing.  The
> ping simply made a call to poll() and didn't come back.  I may actually go

a poll on WHAT? Likely tp be a socket, previously opened. And if you
look at the bind call on the socket, you shouls see that it's to
somewhere, port "domain".

Quote:> so far as to load up the source code and try to run it in a de*.

dns timeout.

Peter

 
 
 

1. DNS lookup working but connection sais host not found

Hi all,

I just stumbled upon a weird behaviour.
I have my DNS set up correctly, and can query for the
host www.vhsed.weihenstephan.org:

bash-2.03# nslookup www.vhsed.weihenstephan.org
Server:  dns0.juliet-z6.de
Address:  194.25.228.4

Non-authoritative answer:
Name:    merlin.weihenstephan.org
Address:  212.72.69.138
Aliases:  www.vhsed.weihenstephan.org

But when I try to connect to the thing, via Netscape, ping,
whatever I get a

bash-2.03# ping www.vhsed.weihenstephan.org
ping: unknown host: www.vhsed.weihenstephan.org
bash-2.03# traceroute www.vhsed.weihenstephan.org
traceroute: unknown host www.vhsed.weihenstephan.org
bash-2.03# telnet www.vhsed.weihenstephan.org 80
www.vhsed.weihenstephan.org: Unbekannter Rechner
bash-2.03#

Funny enough, all other hosts I tried work:

bash-2.03# telnet www.sme.de 80
Trying 212.29.0.187...
Connected to www.sme.de.
Escape character is '^]'.

Now, I have my Sun (Solaris 2.5) connected to the Linux
Box in question. Linux does masquerading, so Solaris can
use the Linux and it's dial-up connection to surf. There,
everything works as expected:

aurora% /usr/sbin/ping www.vhsed.weihenstephan.org
merlin.weihenstephan.org is alive

aurora% telnet  www.vhsed.weihenstephan.org 80
Trying 212.72.69.138...
Connected to merlin.weihenstephan.org.
Escape character is '^]'.

I am no newbie on TCP/IP networking and I'm quite astonished
that I can be unable to connect to a host that is reachable
via nslookup. Some final info:

bash-2.03# cat /etc/resolv.conf
domain juliet-z6.de
nameserver 194.25.228.4
nameserver 194.25.0.125
nameserver 194.221.86.98

bash-2.03# cat /etc/host.conf
#
# /etc/host.conf
#
# Automatically generated by SuSEconfig on Sat May  2 17:10:49 MEST
1998.
#
# PLEASE DO NOT EDIT THIS FILE!
#
# Change variables (NAMESERVER + YP_SERVER) in /etc/rc.config instead.
#
#
order hosts bind
# order hosts
multi on

bash-2.03# cat /etc/nsswitch.conf
# passwd: db files nis
# shadow: db files nis
# group:  db files nis

passwd: compat
group:  compat

hosts:          files dns
networks:       files dns

services:       db files
protocols:      db files
rpc:    db files
ethers: db files
netmasks:       files
netgroup:       files
bootparams:     files

automount:      files
aliases:        files

And: no, the host is not listed in /etc/hosts. And my machine
is not in domain weihenstephan.org.

Any hints, suggestions etc are appreciated.

kind regards from Bavaria,
Tom.

Sent via Deja.com http://www.deja.com/
Before you buy.

2. FTP is not working

3. DNS: named.hosts worked for 1.2.13, but not 2.0.27

4. Help me!!!

5. 'host' command not using /etc/hosts?

6. Shoutcast SERVER on OpenBSD 3.0

7. Host command not working properly?

8. cua1: 1 input overrun(s)

9. host -l command is not working

10. Dynamic DNS not working with Solaris DHCP/DNS server and win clients

11. hosts.deny and hosts.allow not working properly for nfs exports

12. Dynamic DNS not working with Solaris DHCP/DNS server and win clients

13. My hosts.deny/hosts.allow not working