Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed wheezy Release Candidate 1 to my old laptop (Benq Joybook A52) right now, and I have some problem with my wireless card (Atheros 5006). It can actually see the wireless networks, I can even connect to my home network, but if I unplug the ethernet cable the internet is not working, not a single page loads in the browser. I don't use any proxies, I don't have any special security settings on my router apart from the password, and it was working with Windows yesterday. Any ideas?

I'm new to linux, so please be patient, and give a detailed answer. Thanks.

Edit: I ran /sbin/ifconfig, here is the result:

eth0      Link encap:Ethernet  HWaddr 00:1b:24:2c:d1:9e  
      inet addr:192.168.0.106  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::21b:24ff:fe2c:d19e/64 Scope:Link
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:428 errors:0 dropped:0 overruns:0 frame:0
      TX packets:416 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:70208 (68.5 KiB)  TX bytes:37104 (36.2 KiB)
      Interrupt:20 Base address:0xa000 

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:45 errors:0 dropped:0 overruns:0 frame:0
      TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:6099 (5.9 KiB)  TX bytes:6099 (5.9 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:17:c4:04:28:a5  
      inet addr:192.168.0.105  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::217:c4ff:fe04:28a5/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:10072 errors:0 dropped:0 overruns:0 frame:0
      TX packets:7874 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:11775024 (11.2 MiB)  TX bytes:1303131 (1.2 MiB)

I also ran route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

And the result for ping -n 8.8.8.8 is this:

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=49 time=18.7 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=49 time=20.5 ms                           
64 bytes from 8.8.8.8: icmp_req=3 ttl=49 time=18.3 ms                           
64 bytes from 8.8.8.8: icmp_req=4 ttl=49 time=18.6 ms                           
64 bytes from 8.8.8.8: icmp_req=5 ttl=49 time=17.6 ms                           
64 bytes from 8.8.8.8: icmp_req=6 ttl=49 time=18.3 ms                           
64 bytes from 8.8.8.8: icmp_req=7 ttl=49 time=19.0 ms                           
64 bytes from 8.8.8.8: icmp_req=8 ttl=49 time=18.8 ms
64 bytes from 8.8.8.8: icmp_req=9 ttl=49 time=18.7 ms
64 bytes from 8.8.8.8: icmp_req=10 ttl=49 time=18.6 ms
64 bytes from 8.8.8.8: icmp_req=11 ttl=49 time=18.6 ms
64 bytes from 8.8.8.8: icmp_req=12 ttl=49 time=18.5 ms
64 bytes from 8.8.8.8: icmp_req=13 ttl=49 time=18.9 ms
64 bytes from 8.8.8.8: icmp_req=14 ttl=49 time=18.8 ms
64 bytes from 8.8.8.8: icmp_req=15 ttl=49 time=18.7 ms
64 bytes from 8.8.8.8: icmp_req=16 ttl=49 time=18.5 ms
share|improve this question
    
Does it work if you first unplug the cable (with the wifi off) then switch on the wifi? When the wifi isn't working, post the output of /sbin/ifconfig and route -n. Also run ping -n 8.8.8.8, what does that do? –  Gilles Mar 8 '13 at 22:08
    
Actually I cannot turn off the wifi.I just restarted the machine with the wifi turned off, but after startup a message was displayed that I successfully connected to the wifi network. I will run the commands, give me a few minutes. –  Andras Toth Mar 10 '13 at 10:30
    
It looks like the problem is with DNS, since ping works. Is the resolvconf package installed (dpkg -l resolvconf)? Do you control all network settings through the GUI (which one? If you don't know, it's probably a front-end for NetworkManager)? What is the content of /etc/resolv.conf with the wired network, and when it doesn't work with the wifi on? –  Gilles Mar 10 '13 at 16:24
    
dpkg -l resolveconf gave 'no packages found matching resolve conf'. /etc/resolve.conf contains only this: nameserver 192.168.0.1 And I use gnome as GUI. –  Andras Toth Mar 10 '13 at 19:04
    
resolvconf, not resolveconf. If it isn't installed, try this: install resolvconf, turn off all networking, turn networking back on (or reboot to test the case you're interested in). –  Gilles Mar 10 '13 at 19:09
show 1 more comment

1 Answer

up vote 0 down vote accepted

I don't pretend to know exactly what caused your problem, but from the symptoms, it was a DNS problem: ping -n 8.8.8.8 works but actually using Internet services such as web browsing doesn't. (By the way, 8.8.8.8 is a memorable IP address that you can be sure will respond to your ping (it runs Google's public DNS service).)

Normally your machine is configured to query some DNS server upstream from you, typically your ISP's DNS servers. I think what is happening here is that when you turn off the wired connection, it removes the associated DNS servers from /etc/resolv.conf, which is the file that lists the DNS server(s) your system should use. Since your wifi connection has the same servers associated to it, those go missing.

I generally recommend to install the resolvconf package on Debian and derivatives on computers that don't have a fixed Internet connection (i.e. primarily on laptops, though it doesn't hurt on desktops and servers). This package keeps track of the DNS servers associated with each connection and regenerates /etc/resolv.conf whenever a DNS source comes up or down. This should solve your issue (as well as other similar problems). Resolvconf is compatible with local DNS caches installed by Debian packages such as dnsmasq.

Sometimes, when you install resolvconf, it picks up the sources provided by your current connection and puts them on the permanent list. If that happens, edit /etc/resolvconf/resolv.conf.d/base, remove any DNS server that isn't permanently available, and switch networking off and back on (or just run resolvconf -u).

Another approach to resolving DNS problems is to use DNS servers other than your ISP's, such as OpenDNS or Google. Google's service has a memorable address 8.8.8.8, which is useful if you're stuck with no working DNS for some reason. Note that there are disadvantages to using alternate DNS services, so do this only if your ISP's DNS is bad, not “just because”.

share|improve this answer
    
Thanks for the detailed answer. –  Andras Toth Mar 11 '13 at 7:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.