Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
02-15-2014, 08:41 AM
|
#1
|
Member
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197
Rep:
|
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).
What would cause this?
Regards
|
|
|
02-15-2014, 09:52 AM
|
#2
|
Senior Member
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135
|
When you're connected via nm-applet, and you don't have internet access, what are the outputs of:
# route and # less /etc/resolv.conf ?
How does this change when you issue:
# dhclient
cheers,
|
|
1 members found this post helpful.
|
02-15-2014, 10:25 AM
|
#3
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
If you don't have any entries in /etc/resov.conf, try entering these:
Code:
search com
# Google Free DNS Servers
nameserver 8.8.8.8
nameserver 8.8.4.4
(if you know your ISPs DNS server address(es), enter those instead).
Once done, try
Code:
ping -c 5 news.google.com
PING news.l.google.com (74.125.224.201) 56(84) bytes of data.
64 bytes from lax02s02-in-f9.1e100.net (74.125.224.201): icmp_seq=1 ttl=55 time=733 ms
64 bytes from lax02s02-in-f9.1e100.net (74.125.224.201): icmp_seq=2 ttl=55 time=575 ms
64 bytes from lax02s02-in-f9.1e100.net (74.125.224.201): icmp_seq=3 ttl=55 time=578 ms
64 bytes from lax02s02-in-f9.1e100.net (74.125.224.201): icmp_seq=4 ttl=55 time=613 ms
64 bytes from lax02s02-in-f9.1e100.net (74.125.224.201): icmp_seq=5 ttl=55 time=613 ms
--- news.l.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4316ms
rtt min/avg/max/mdev = 575.139/622.937/733.473/57.681 ms
You should see the above.
Hope this helps some.
|
|
1 members found this post helpful.
|
02-15-2014, 11:37 AM
|
#4
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
Quote:
Originally Posted by Holering
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.
Last edited by kikinovak; 02-15-2014 at 11:38 AM.
|
|
1 members found this post helpful.
|
02-16-2014, 02:49 AM
|
#5
|
Member
Registered: Feb 2010
Distribution: Slackware - Gentoo - Debian
Posts: 197
Original Poster
Rep:
|
Quote:
Originally Posted by mrclisdue
When you're connected via nm-applet, and you don't have internet access, what are the outputs of:
# route and # less /etc/resolv.conf ?
How does this change when you issue:
# dhclient
cheers,
|
After nm-applet successfully connects, /etc/resolv.conf shows
Code:
# Generated by NetworkManager
nameserver 192.168.1.1
route hangs and doesn't continue showing
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
and I have to force quite or break (ctrl-backslash or ctrl-c).
After running dhclient wlan0, /etc/resolv.conf changes to
Code:
nameserver 192.168.1.1
After dhclient, route also shows
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.1.1 * 255.255.255.255 UH 0 0 0 wlan0
Last edited by Holering; 02-16-2014 at 02:54 AM.
|
|
|
02-16-2014, 05:26 AM
|
#6
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
It's maybe driver related. Just tell us the model of your wireless card (see post above).
|
|
1 members found this post helpful.
|
02-16-2014, 08:14 AM
|
#7
|
Senior Member
Registered: Dec 2008
Posts: 1,191
|
Quote:
Originally Posted by Holering
...
route hangs and doesn't continue showing
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
and I have to force quite or break (ctrl-backslash or ctrl-c).
...
|
Does "route -n" show something?
|
|
1 members found this post helpful.
|
02-16-2014, 08:28 AM
|
#8
|
Member
Registered: Nov 2010
Posts: 227
Rep:
|
Using:
Code:
nameserver 192.168.1.1
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.
Last edited by eloi; 02-16-2014 at 08:40 AM.
|
|
1 members found this post helpful.
|
02-16-2014, 09:04 AM
|
#9
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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).
Hope this helps some.
Last edited by tronayne; 02-16-2014 at 09:10 AM.
|
|
1 members found this post helpful.
|
02-16-2014, 09:04 AM
|
#10
|
LQ 5k Club
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,493
|
What version of dhcpcd are you trying to use? I have had problems with NetworkManager and dhcpcd-6.0.5. http://www.linuxquestions.org/questi...2/#post5069349
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.
|
|
1 members found this post helpful.
|
02-16-2014, 09:07 AM
|
#11
|
Senior Member
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135
|
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.
cheers,
|
|
1 members found this post helpful.
|
02-16-2014, 09:11 AM
|
#12
|
Senior Member
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135
|
Quote:
Originally Posted by tronayne
...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....
|
Code:
# chattr +i /etc/resolv.conf
cheers,
|
|
2 members found this post helpful.
|
02-16-2014, 09:21 AM
|
#13
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
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.
|
|
3 members found this post helpful.
|
02-16-2014, 09:32 AM
|
#14
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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).
Maybe the chattr thing will work, eh?
Thanks
|
|
1 members found this post helpful.
|
02-16-2014, 12:20 PM
|
#15
|
Member
Registered: Nov 2010
Posts: 227
Rep:
|
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:
Code:
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
Last edited by eloi; 02-16-2014 at 12:21 PM.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 10:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|