LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 02-15-2014, 08:41 AM   #1
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware
Posts: 169

Rep: Reputation: 22
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
 
Old 02-15-2014, 09:52 AM   #2
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,053

Rep: Reputation: 170Reputation: 170
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.
Old 02-15-2014, 10:25 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
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.
Old 02-15-2014, 11:37 AM   #4
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,960

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
Quote:
Originally Posted by Holering View Post
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.
Old 02-16-2014, 02:49 AM   #5
Holering
Member
 
Registered: Feb 2010
Distribution: Slackware
Posts: 169

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by mrclisdue View Post
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.
 
Old 02-16-2014, 05:26 AM   #6
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,960

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
It's maybe driver related. Just tell us the model of your wireless card (see post above).
 
1 members found this post helpful.
Old 02-16-2014, 08:14 AM   #7
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by Holering View Post
...
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.
Old 02-16-2014, 08:28 AM   #8
eloi
Member
 
Registered: Nov 2010
Posts: 227

Rep: Reputation: 61
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.
Old 02-16-2014, 09:04 AM   #9
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
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.
Old 02-16-2014, 09:04 AM   #10
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,520

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
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.
Old 02-16-2014, 09:07 AM   #11
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,053

Rep: Reputation: 170Reputation: 170
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.
Old 02-16-2014, 09:11 AM   #12
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,053

Rep: Reputation: 170Reputation: 170
Quote:
Originally Posted by tronayne View Post
...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.
Old 02-16-2014, 09:21 AM   #13
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,960

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
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.
Old 02-16-2014, 09:32 AM   #14
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
Quote:
Originally Posted by mrclisdue View Post
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.
Old 02-16-2014, 12:20 PM   #15
eloi
Member
 
Registered: Nov 2010
Posts: 227

Rep: Reputation: 61
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.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
After the kernel upgrade to 3.11 is not connected to the Internet via WiFi Gifrom Linux - Newbie 3 09-16-2013 04:12 PM
Fedora 18 on Toshiba Satellite, connected to Wifi but no internet blogugogu Linux - Wireless Networking 6 07-07-2013 05:08 AM
[SOLVED] WiFi is connected but unable to access internet in RHEL 6 and Fedora 17 aniruddha.jagdale Linux - Wireless Networking 6 04-28-2013 01:30 PM
Wifi connected but browser does not work! Patrick_Rhodes Linux - Newbie 6 12-07-2005 04:12 PM
connected to wifi network but no internet connection? mr.gizm0 Linux - Wireless Networking 3 03-21-2005 04:07 AM


All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration