Host Name Resolution Failure

Kernels & Hardware, configuring network, installing services

Host Name Resolution Failure

Postby gmweezel » 2011-08-15 03:29

I am experimenting with installing a bare minimum, network capable installation of Debian Squeeze. Right now, I am having trouble getting proper host name resolution. I have provided the output of ping (which is able to resolve names), wget (which is unable to resolve names), and the contents of the files I believe to be relevant to the problem. When I installed Debian, I installed *only* the SSH Server from the list of available configurations. Since then, I have installed mdns4, dnsmasq, mdns-scan, and libnss-mdns to get name resolution to work with no success so far. All packages were installed with no recommends -- aptitude -R package name. What am I missing to get host name resolution working?

Resolution failures
Code: Select all
root@sinister:~# ping -w1 google.com
PING google.com (74.125.73.104) 56(84) bytes of data.
64 bytes from tul01m01-in-f104.1e100.net (74.125.73.104): icmp_req=1 ttl=48 time=22.4 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 22.499/22.499/22.499/0.000 ms

root@sinister:~# wget google.com
--2011-08-14 22:20:37--  http://google.com/
Resolving google.com... failed: Name or service not known.
wget: unable to resolve host address “google.com”


dig google.com @192.168.7.254
Code: Select all
; <<>> DiG 9.7.3 <<>> google.com @192.168.7.254
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2891
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             193     IN      A       74.125.73.106
google.com.             193     IN      A       74.125.73.105
google.com.             193     IN      A       74.125.73.147
google.com.             193     IN      A       74.125.73.104
google.com.             193     IN      A       74.125.73.99
google.com.             193     IN      A       74.125.73.103

;; Query time: 76 msec
;; SERVER: 192.168.7.254#53(192.168.7.254)
;; WHEN: Sun Aug 14 22:19:14 2011
;; MSG SIZE  rcvd: 124


/etc/resolv.conf
Code: Select all
root@sinister:~# cat /etc/resolv.conf
nameserver 192.168.7.254


/etc/nsswitch.conf
Code: Select all
root@sinister:~# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37

Re: Host Name Resolution Failure

Postby dasein » 2011-08-15 03:54

gmweezel wrote:I am having trouble getting proper host name resolution.

I suspect that your diagnosis is incorrect. If your problem were a true DNS failure, then nothing would work: not ping, not dig, etc. Much more likely is some sort of weird issue with wget.

A Google search for wget resolution (name OR DNS) returns literally hundreds of thousands of hits. Several of them seem to describe a problem exactly like yours--everything works except wget.

Maybe you'd find an answer among those pages.
The most commonly asked questions are also the least frequently researched questions.

Debian Wiki | Debian FAQ | Debian Installation Guide | Debian Reference | Grokking Debian
User avatar
dasein
 
Posts: 4930
Joined: 2011-03-04 01:06

Re: Host Name Resolution Failure

Postby smallchange » 2011-08-15 04:06

The wget currently in Squeeze is able to resolve google.com for me. I suspect this is a problem with the DNS server at 192.168.7.254. More specifically I suspect this may be a ipv6 problem. You might try changing resolv.conf to use the openDNS servers and see if the problem gets fixed.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: Host Name Resolution Failure

Postby gmweezel » 2011-08-15 12:37

smallchange wrote:The wget currently in Squeeze is able to resolve google.com for me. I suspect this is a problem with the DNS server at 192.168.7.254. More specifically I suspect this may be a ipv6 problem. You might try changing resolv.conf to use the openDNS servers and see if the problem gets fixed.


I used the same settings from my Windows laptop that was automatically configured when it connected to the network. However, upon switching to Google's nameservers, I am able to resolve domains using wget and iceweasel albeit quite slowly.
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37

Re: Host Name Resolution Failure

Postby smallchange » 2011-08-15 14:30

This indicates that the problem is 192.168.7.254. It is not responding properly to the requests wget is sending. This is almost certainly a faulty ipv6 DNS implementation on 192.168.7.254, whatever that is. It may be your cable/dsl/modem/router. You should check for updates to whatever 192.168.7.254 is that might provide it with a good implementation of DNS. You could probably make this work by disabling ipv6 on the debian computer. How to disable ipv6 is described numerous places in this forum.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: Host Name Resolution Failure

Postby dasein » 2011-08-15 14:38

gmweezel wrote:...upon switching to Google's nameservers, I am able to resolve domains using wget and iceweasel albeit quite slowly.

Try disabling IPv6 (a multi-step process, much harder than it needs to be in Debian).

http://www.google.com/search?q=disable+IPv6+debian
The most commonly asked questions are also the least frequently researched questions.

Debian Wiki | Debian FAQ | Debian Installation Guide | Debian Reference | Grokking Debian
User avatar
dasein
 
Posts: 4930
Joined: 2011-03-04 01:06

Re: Host Name Resolution Failure

Postby gmweezel » 2011-08-15 15:49

When I was using a vanillia Debian install with network manager, my resolution worked fine. Is IPv6 disabled as part of the usual setup process?
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37

Re: Host Name Resolution Failure

Postby dasein » 2011-08-15 15:50

gmweezel wrote:Is IPv6 disabled as part of the usual setup process?

No. Exactly the opposite.
The most commonly asked questions are also the least frequently researched questions.

Debian Wiki | Debian FAQ | Debian Installation Guide | Debian Reference | Grokking Debian
User avatar
dasein
 
Posts: 4930
Joined: 2011-03-04 01:06

Re: Host Name Resolution Failure

Postby gmweezel » 2011-08-15 15:54

dasein wrote:No. Exactly the opposite.


Then why must it be disabled in order to get expedient name resolution? If enabling it properly is what it takes to make resolution quicker, that would be preferable.
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37

Re: Host Name Resolution Failure

Postby smallchange » 2011-08-15 20:47

Ipv6 is properly enabled in Squeeze. Does the nameserver respond properly to a proper ipv6 request? Disabling ipv6 is not hard. it is as simple as editing /etc/sysctl.conf to add this line
net.ipv6.conf.all.disable_ipv6 = 1
and rebooting. You can also do it by blacklisting the modules for it. Skip all the bullshit posts that google finds and search this site using google. It will provide good information.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: Host Name Resolution Failure

Postby gmweezel » 2011-08-16 02:05

smallchange wrote:Ipv6 is properly enabled in Squeeze. Does the nameserver respond properly to a proper ipv6 request? Disabling ipv6 is not hard. it is as simple as editing /etc/sysctl.conf to add this line
net.ipv6.conf.all.disable_ipv6 = 1
and rebooting. You can also do it by blacklisting the modules for it. Skip all the bullshit posts that google finds and search this site using google. It will provide good information.


I have no interest in disabling IPv6 if I can get it to work. Whenever I do a normal installation of Debian on the same system, I don't have to make any special tweaks to get networking to work properly.
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37

Re: Host Name Resolution Failure

Postby smallchange » 2011-08-16 13:45

I don't know that "normal installation" has any meaning. I would say that what you are installing now is as normal as any installation. I would be very surprised if installing Network-Manager causes wget to resolve addresses with this same resolver setup. I would not be surprised if a Lenny install did not have this problem, or if using this resolver with other programs did not show this problem. I think either of those are more likely what you have observed.

There has been confusion in the interpretation of the ipv6 spec that recently led to some implementations that did not work together. I think squeeze has a correct implementation, as does wget in squeeze and it is the DNS server at 192.168.7.254 that has an incorrect implementation.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: Host Name Resolution Failure

Postby gmweezel » 2011-08-16 21:43

smallchange wrote:I don't know that "normal installation" has any meaning.


The install I have right now was done with no other packages checked aside from "SSH Server" on an advanced install. This means no Desktop, or even Base and Standard Packages. A number of things included in the latter two packages are not included on a bare system such mdns4, and libnss.
gmweezel
 
Posts: 138
Joined: 2008-05-04 17:37


Return to System configuration

Who is online

Users browsing this forum: ckosloff and 12 guests

fashionable