[NCLUG] setting up wireless to use dns

Daniel Herrington nclug at iherr.com
Thu Jul 19 22:22:01 MDT 2007


Bob,

Thanks for the help.  I've put my responses below. Also, you  
mentioned Stephen, but I never saw his post. Maybe my spam filter is  
a little too aggressive. Anyway, let me know if my responses help  
narrow down the problem.

Daniel



On Jul 19, 2007, at 3:12 PM, Bob Proulx wrote:

>
> Sounds like a lot of fun.  What is the contents of your
> /etc/network/interfaces file?
>

Here's my /etc/network/interfaces file (with the key X'ed out):

# Configure Loopback
auto lo
iface lo inet loopback

iface wlan0 inet dhcp
         wireless_essid mywifi
         wireless_key [1] XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX

iface eth0 inet dhcp


>> When eth0 is enabled, it works fine with the current filesystem and
>> is able to resolve hostnames, but with wlan0 only enabled, it can't
>> resolve hostnames.
>
> What is in /etc/hosts?

Here's my /etc/hosts (only one line):

127.0.0.1       localhost



>
>> So my question is... what exact files and/or scripts do I need to
>> make the DNS resolving work? I've got the following for my
>> /etc/resolv.conf:
>>
>> search Belkin
>> nameserver 192.168.1.1
>
> That search statement is of course bogus but should not be the cause
> of your current problems.  But I would fix it just the same.  Either
> remove it entirely or correct the domains to search to be valid.
>
> Do you have 'resolvconf' installed?  If not then you might consider
> installing and configuring it.  Note that the resolvconf package will
> install event driven scripts to dynamically handle changes to the
> /etc/resolv.conf file when interfaces are brought online and offline.
>
> Can you ping your that nameserver above?
>
>   ping 192.168.1.1

Here's the result of the ping command:

~]# ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=3.6 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.5 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=2.6 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=3.4 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=3.3 ms

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 2.5/3.0/3.6 ms


>
> Can you from another host on the network look up domain names using
> that dns server?  This is the bind9 host command (in the bind9-host)
> package but there are alternatives with different syntax.  Or you may
> need to use one of the other ways to look up names against a specific
> dns server.
>
>   host example.com 192.168.1.1
>

I didn't have the "host" command, so after copying that from my  
desktop machine to the embedded one (and the necessary libraries), I  
get the following:

~]# host www.google.com 192.168.1.1
Using domain server:
Name: 192.168.1.1
Address: 192.168.1.1#53
Aliases:

www.google.com is an alias for www.l.google.com.
www.l.google.com has address 72.14.253.147
www.l.google.com has address 72.14.253.99
www.l.google.com has address 72.14.253.103
www.l.google.com has address 72.14.253.104




>   dig example.com @192.168.1.1 +short
>


Again, I didn't have "dig" installed, so after installing it, I get  
the following:

~]# dig www.google.com 192.168.1.1
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57120
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
www.google.com.         602394  IN      CNAME   www.l.google.com.
www.l.google.com.       247     IN      A       72.14.253.147
www.l.google.com.       247     IN      A       72.14.253.99
www.l.google.com.       247     IN      A       72.14.253.104
www.l.google.com.       247     IN      A       72.14.253.103

;; Query time: 65 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Aug 20 22:48:20 1998
;; MSG SIZE  rcvd: 116


; <<>> DiG 9.3.4 <<>> www.google.com 192.168.1.1
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 51952
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;192.168.1.1.                   IN      A

;; AUTHORITY SECTION:
.                       900     IN      SOA     A.ROOT-SERVERS.NET.  
NSTLD.VERISIGN-GRS.COM. 2007071901 1800 900 604800 86400

;; Query time: 79 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Aug 20 22:48:20 1998
;; MSG SIZE  rcvd: 104


>   nslookup example.com 192.168.1.1
>

My "nslookup" and "ping" are both just links to busybox (v1.2.2).  
Could that be my problem? How does busybox know to use a DNS server?

~]# nslookup www.google.com 192.168.1.1
*** Unknown host

nslookup: www.google.com: Unknown server error




> Similarly to Stephen I am suspicious that you actually have a dns
> server running on 192.168.1.1.  There have been reports of Belkin
> routers furnishing this information as part of a dhcp incorrectly.
>
>> The error I get when trying to ping a host by name is as follows:
>>
>> ~]# ping www.google.com
>> ping: www.google.com: Unknown server error
>> ~]#
>
> I know a lot of people use 'ping' to debug dns problems because ping
> needs to look up the dns name.  And on MS-Windows that is almost the
> only debugging command available.  But on modern operating systems it
> is much more direct to use the available dns utilities to look up dns
> names and to get more direct information.  Please use host, dig, or
> the old nslookup tools instead for this purpose.

I tried "wget" with the following result:

~]# wget http://www.google.com
wget: www.google.com: Unknown server error

I also tried the text-mode web browser "links", and it gives a pop-up  
with the following error:
~]# links http://www.google.com


                                              +----- Error ------+
                                              |                  |
                                              |  Host not found  |
                                              |                  |
                                              |    [ Cancel ]    |
                                              +------------------+

>
> Bob
> _______________________________________________
> NCLUG mailing list       NCLUG at nclug.org
>
> To unsubscribe, subscribe, or modify
> your settings, go to:
> http://www.nclug.org/mailman/listinfo/nclug




More information about the NCLUG mailing list