[SOLVED] Internet doesn't work despite being connected (WIFI)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Internet doesn't work despite being connected (WIFI)
Network manager icon (nm-applet) shows my wifi connected to access point with ip address but internet doesn't work. Links stays looking up host forever and wget can't download.
Only work around is dhclient. I don't even need to give a passphrase-key via iwconfig since nm-applet (NetworkManager) has already done that (and is supposedly connected).
Network manager icon (nm-applet) shows my wifi connected to access point with ip address but internet doesn't work. Links stays looking up host forever and wget can't download.
Only work around is dhclient. I don't even need to give a passphrase-key via iwconfig since nm-applet (NetworkManager) has already done that (and is supposedly connected).
What would cause this?
Regards
What's your wireless card? What does the following command return:
Code:
# lspci | grep -i net
Some cards like Broadcom wireless cards only have poor support unless you replace the drivers by something usable.
you are relaying in your router. Your router should have obtained before the DNSs from your internet provider. You can check that accessing to your router.
Or try what tronayne suggested you. But before you should add "nohook resolv.conf" to /etc/dhcpcd.conf to avoid dhcpcd to overwrite resolv.conf.
Code:
# echo "nohook resolv.conf" >> /etc/dhcpcd.conf
Using graphical applets you will need help with *the same issue* tomorrow, the next week, the next month and the next year. Learn how to fish is a better strategy ;-). Your choice.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
I always have this sort of problem with a lap top when I'm away from home using it with a wi-fi connection. At home, the lap top is connected to the router with an Ethernet cable and works just wonderfully; away, it's connected with WICD which promptly overwrites /etc/resolv.conf with the wi-fi router's DNS addresses (which do not provide DNS service).
I have fiddled, faddled and fubbled with WICD and have never found a way to prevent this from happening so I just keep a /etc/resolv.bak file and copy it to /etc/resolv.conf whenever I'm remote -- boot the lap top, connect to the wi-fi, run cp /etc/resolv.bak/etc/resolv.conf and I'm good to go.
It's engineering klugemanship to do that, I am well aware, but I've never found another way to make the damned thing work right so I just do that so I can get going and use the blasted lap top to do what I need to. At home it's hard wired with a fixed-IP address and I don't have any problem.
Bottom line: you get connected but routers really don't provide DNS services and you're not going to have Internet service without some sort of DNS (so you don't have to type dotted-quad Internet addresses, http://news.google.com is a whole lot easier than 74.125.224.201 to remember, that's what the Domain Name System -- DNS -- is there for).
I would do what eloi suggests just above here (I'm going to try that myself to see if it fixes the problem and I don't have to kluge it with copying). You will need to stop DHCP and restart it for the change to take effect.
And, put this in your /etc/resolv.conf file:
Code:
search com
nameserver 8.8.8.8
nameserver 8.8.4.4
and see what you get (and make sure it's still there after you restart DHCP).
From what I have observed, dhcpcd-6.0.5 first attempts to get an IPv6 address. If that fails, the interface in use is removed, rather than being preserved for an attempt to get an IPv4 address.
I have no problems using dhcpcd-5.6.6.
Well, a guess is that dhclient isn't invoked properly when nm connects, thus a proper route isn't established until you invoke dhclient yourself.
I'm not sure if stopping NetworkManager, then # strace /usr/sbin/NetworkManager will yield any clues ....
You may also consider removing nm and reinstalling; or editing the connection in nm-applet and trying a static, manual setup, though that may not suit your situation.
Yet another option may be using wicd instead, though again this may not suit your situation.
...it's connected with WICD which promptly overwrites /etc/resolv.con with the wi-fi router's DNS addresses (which do not provide DNS service).
I have fiddled, faddled and fubbled with WICD and have never found a way to prevent this from happening so I just keep a /etc/resolv.bak file and copy it to /etc/resolv.conf whenever I'm remote -- boot the lap top, connect to the wi-fi, run cp /etc/resolv.bak/etc/resolv.conf and I'm good to go.
It's engineering klugemanship to do that, I am well aware, but I've never found another way to make the damned thing work right so I just do that so I can get going and use the blasted lap top to do what I need to....
I know I'm repeating myself (sorry), but a Broadcom wireless card with native drivers instead of broadcom-sta shows exactly this kind of behaviour. Now the OP can encourage further fruitless speculation by NOT posting his chipset.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Quote:
Originally Posted by mrclisdue
Code:
# chattr +i /etc/resolv.conf
That's a great Kludge!
Doesn't really solve the problem (of /etc/resolv.conf file being overwritten in the first place), but does prevent it from happening.
I've tried, without success, un-commentiing
Code:
DHCP_KEEPRESOLV[4]="yes" # If you don't want /etc/resolv.conf overwritten
in /etc/rc.d/rc.inet1.conf (and everything else I can find to fiddle with) with no joy here in Snowville (it's about four feet deep outside as of today).
I mentioned dhcpcd because till I know is what Slackware uses by default. But I don't use NetworkManager, perhaps it calls dhclient instead so changing dhcpcd.conf like I've said above has no efect.
I know in dhclient.conf you can prepend some servers with:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.