Can connect to wifi but not to Internet with nm-applet.
DebianThis forum is for the discussion of Debian 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.
Can connect to wifi but not to Internet with nm-applet.
I just installed Debian 8 amd64 on my laptop and when I go to nm-applet to connect to wifi and it connects just fine (I can ping my gateway) but I can't ping external IP address or resolve names.
After I run as root:
Code:
# dhcpclient wlan0
RTNETLINK answers: File exists
I can access the Internet and resolve names just fine but logging in as root and running "dhcpclient wlan0" every time I turn on the computer is getting annoying.
How can I avoid having to go through the whole "dhcpclient wlan0" mess every time?
I haven't used nm-applet (or network manager) for years. I assume you're using nm-applet because you're running a window manager? If so then how are you starting it?
Is your Network Manager connection configured as DHCP or using static addresses? (The configuration file located in /etc/NetworkManager/system-connections/ might us here.)
Apparently I can use the Internet just fine as long as I never switch to another tty (e.g. ctrl+alt+f6), once I switch to another tty (even if I don't log in) I have to run "dhcpclient wlan0" as root. However, after I run that I can switch ttys all I want and the Internet won't go out.
EDIT: I just found out that if I close my laptop lid shut, I have to redo "dhcpclient wlan0" to get Internet again (but once again it automatically connects to the LAN).
Quote:
Originally Posted by cynwulf
I assume you're using nm-applet because you're running a window manager? If so then how are you starting it?
Lightdm logs me into an LXDE on openbox session and nm-applet appears in the system tray, already connected to my router via wifi (and I can access the Internet until I switch ttys).
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
inet 169.254.7.94/16 brd 169.254.255.255 scope link eth0:avahi
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
inet 192.168.1.14/24 brd 192.168.1.255 scope global dynamic wlan0
valid_lft 85639sec preferred_lft 85639sec
inet6 fe80::260a:64ff:feab:e5b9/64 scope link
valid_lft forever preferred_lft forever
ip route:
Code:
default via 192.168.1.1 dev wlan0
default dev eth0 scope link metric 1002
default via 192.168.1.1 dev wlan0 proto static metric 1024
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.7.94
169.254.0.0/16 dev wlan0 scope link metric 1000
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.14
Apparently I can use the Internet just fine as long as I never switch to another tty (e.g. ctrl+alt+f6), once I switch to another tty (even if I don't log in) I have to run "dhcpclient wlan0" as root. However, after I run that I can switch ttys all I want and the Internet won't go out.
EDIT: I just found out that if I close my laptop lid shut, I have to redo "dhcpclient wlan0" to get Internet again (but once again it automatically connects to the LAN).
Your NM connection is defined as a system-wide connection (as opposed to user connection), so I would expect it to be available in other VT's. As ondoho suggested, have you stopped using other network services? Is the wlan0 interface excluded in /etc/network/interfaces?
So, just to check that the device is not unmanaged...
As ondoho suggested, have you stopped using other network services?
Sorry to display my ignorance but how would I do that?
Quote:
Is the wlan0 interface excluded in /etc/network/interfaces?
So, just to check that the device is not unmanaged...
Code:
$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
Code:
$ nmcli dev status
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected MY-SSID
eth0 ethernet unmanaged --
lo loopback unmanaged --
Sorry to display my ignorance but how would I do that?
sorry i'm not using debian, but on my archlinux system i once had a rather similar problem, which turned out to be that there were conflicting services (now that debian is using systemd, too, there is more common ground) for dns resolving, iirc.
anyhow, for me something like
and before & after you should always have a look with e.g.
Code:
systemctl status dhcpcd
btw, have you tried:
Code:
$ ping google.com
$ ping 8.8.8.8
if the latter is succesful, but not the former, that means you have a dns problem - you are connected to the internet, but domain names are not being resolved.
but in any case you should consult the debian wiki.
which i'm sure you have done before posting here.
Changing VTs was a miss attributed cause. The Internet stops working after about 100 seconds of uptime. I just normally switch VTs quickly so I attributed it to that.
I created this Bourne script to test when the Internet goes out:
So something either executes to stop Internet access around that time or finishes executing something to stop Internet access.
Before Internet loss:
Code:
$ systemctl status dhcpcd
● dhcpcd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
$ nmcli dev status
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected MY-SSID
eth0 ethernet unmanaged --
lo loopback unmanaged --
The output is identical after Internet loss. Keep in mind that I can still access network resources on the LAN (like my router), yet I can not ping external address by IP so it looks like this is more than a DNS problem.
I didn't run the systemctl stop and disable commands as the status argument didn't find the service loaded.
Changing VTs was a miss attributed cause. The Internet stops working after about 100 seconds of uptime. I just normally switch VTs quickly so I attributed it to that.
As I suspected. A system-wide NM connection is exactly that.
Quote:
The output is identical after Internet loss. Keep in mind that I can still access network resources on the LAN (like my router), yet I can not ping external address by IP so it looks like this is more than a DNS problem.
So, your wifi connection remains associated. So, not a NetworkManager issue. Check if you still have a valid default route when that occurs and can still ping the router. If that checks out but you can't reach the internet then that would suggest a router issue.
well it's a bit late now, but in addition to what has been suggested already:
i vaguely remember something about certain wifi cards having similar problems with encryption.
there was workarounds; but first, one way to troubleshoot is to temporarily completely disable encryption and see how that works.
that would be somewhat hardware/driver related and you should also check
Code:
dmesg
before and after connection loss.
anyhow with your newly gained insight, have you made further searches into your problem?
also the info requested here would be good, if you want further assistance.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.