[CLUE-Tech] Failed DNS lookup with 'host' command

Dave Anselmi anselmi at americanisp.net
Tue Jan 22 16:29:21 MST 2002


Jeffery Cann wrote:

[...]


> $  ping yahoo.com
> PING yahoo.com (216.115.108.243) from 192.168.254.8 : 56(84) bytes of data.
> 64 bytes from img3.yahoo.com (216.115.108.243): icmp_seq=0 ttl=241
> time=54.967 msec

Well, looks like everything worked fine for this part, including the DNS lookup.
I don't know why host would do anything different.

> $ host -l yahoo.com
> ;; Connection to 192.168.254.254#53(192.168.254.254) for yahoo.com failed:
> connection refused
>
> In my /etc/resolv.conf, the nameserver IP address is:  192.168.254.254.
> Given my inexperience with networking, I think this makes sense because it
> should indicate that I need to exit my LAN for DNS lookup (no, I'm not
> running BIND).

Your resolv.conf should point to an external nameserver, probably at your ISP.
Typically, your router gets the numbers when it sets up its ppp connection to
your ISP.  Then it passes them out when it gives out IPs over dhcp.  If you
aren't using dhcp, or you use something other than your router for it, then you
have to maintain resolv.conf by hand which can be a pain if the ISP's nameservers
change.

The right way to handle this if you don't have an automatic way to update when
your ISP changes numbers is to run your own nameserver.  I have a network that
falls in that category, but I haven't gotten the time to make bind work.


> Since my Linux box is running on the internal (192) network, I assume this is
> a problem with my router configuration.  Is this correct?

No.  Routing is something else.


> What do I need to fix to get the 'host' command working?  Again, web
> browsing, ssh, ftp all work correctly.

Well, this is puzzling.  Fixing your resolv.conf should solve the problem.  The
question is why do other things work?  Beats me.

Dave





More information about the clue-tech mailing list