0

As described in the title, I can connect to my raspberry, via SSH connection, but raspberry has no internet access.

All of this is done through an WiFi connection (Windows PC <--> Router <--> Raspberry). Router has internet access and so, my Windows PC.

WiFi connections are managed by NetworkManager Applet.

It worked for a few days and this morning it simply doesn't.

Thanks in advance.

EDIT 1

I have wlan1 with a dongle configured as client and wlan0 with embedded wifi hardware configure as a hotspot.

Response of:

$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:9e:4f:42  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 78  bytes 29201 (28.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 78  bytes 29201 (28.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.0.1  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::94f2:3dc3:a727:21f1  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:cb:1a:17  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 6584 (6.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.13  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2e0:4cff:fe21:361f  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:21:36:1f  txqueuelen 1000  (Ethernet)
        RX packets 3786  bytes 553823 (540.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2984  bytes 1386025 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Response of:

$ iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11  Mode:Master  Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

wlan1     IEEE 802.11  ESSID:"Batman"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 70:54:D2:B0:44:DD   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry short  long limit:2   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=63/70  Signal level=-47 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:93  Invalid misc:114   Missed beacon:0

EDIT 2

To install NM and to disable dhcpcd the following commands were used:

sudo apt update 

sudo apt install network-manager network-manager-gnome openvpn \openvpn-systemd-resolved network-manager-openvpn \network-manager-openvpn-gnome 

sudo apt purge openresolv dhcpcd5 

sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf

EDIT 3

$ ping google.com
ping: google.com: Name or service not known

And

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=21.9 ms
...
64 bytes from 8.8.8.8: icmp_seq=37 ttl=52 time=31.5 ms
64 bytes from 8.8.8.8: icmp_seq=38 ttl=52 time=21.5 ms
^C
--- 8.8.8.8 ping statistics ---
38 packets transmitted, 35 received, 7.89474% packet loss, time 210ms
rtt min/avg/max/mdev = 20.707/26.294/91.040/15.970 ms
  • 1
    what's the response you are getting for ping google.com? – Arahasya Nov 18 '19 at 12:53
  • "It worked for a few days and this morning it simply doesn't" - then you must have changed something. – Dmitry Grigoryev Nov 18 '19 at 13:21
  • @Arahasya: pi@ESALQ:~ $ ping google.com ping: google.com: Name or service not known – Jonny Quest Nov 18 '19 at 18:40
  • @DmitryGrigoryev: Nothing at all. Even if I delete the connections and configure news ones the result still the same, no internet connection. – Jonny Quest Nov 18 '19 at 18:42
  • 1
    What OS? Why did you install Network Manager? How did you configure networking? – Milliways Nov 18 '19 at 21:42
  • NetworkManager isn't supported by Raspbian. You have to configure everything by yourself. Please edit your question and describe what you have done to disable default `dhcpcd` and configure NetworkManager. To avoid problems you should better use the default networking with `dhcpcd`. – Ingo Nov 19 '19 at 11:18
  • @Milliways 1) Raspbian. 2) Wlan0 is configured as a hotspot and wlan1 (dongle) as a Client. 3) Client is configured with static IP. – Jonny Quest Nov 19 '19 at 11:19
  • Raspbian is NOT an OS - it is a family (like Windows); current is Raspbian Buster. You have **NOT** said **HOW** you configured networking - unless you specify what you **ACTUALLY** did we can only guess. – Milliways Nov 20 '19 at 03:08

1 Answers1

1

As shown by your outputs DNS name resolution does not work. That isn't surprising by your mix up of different network management systems. You have openvpn-systemd-resolved installed together with openvpn but you don't enable systemd-resolved.service. If you have it enabled then your link to /etc/resolv.conf is wrong. According to /usr/share/doc/systemd/README.Debian you have to set the link:

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

But systemd-reolved.service only works with systemd-networkd.service enabled and you haven't.

In the same document you will also find:

You need to make sure that interfaces handled by networkd are not handled by ifupdown (/etc/network/interfaces) and NetworkManager.

I don't see that you have done anything with networking.service (that's ifupdown with /etc/network/interfaces). Are you sure that NetworkManger coexist without problems with it in the way ifupdown is configured to work with (deinstalled) dhcpcd?

Do you see the problems with your setup? I don't oversee the impact. If you know what you are doing (I do not) then you have to fix at least the resolver for DNS name resolution without enabling other side effects from the other three existing network systems. Maybe it is better to reinstall openresolv because it better fit to NetworkManager?

Otherwise you should decide which one of the three supported networking systems you want to use. For more details you may have a look at Compare networking, dhcpcd and systemd-networkd. The easiest is to use default dhcpcd. For more sophisticated setups I suggest to use systemd-networkd.

Ingo
  • 40,606
  • 15
  • 76
  • 189
  • First fo all, thanks a lot for your help!! You're right, I do not have an idea of what i'm doing... i'm not a linux user trying to set up a hotspot and client in raspberry pi, following 'tutorials' on the internet. What resolved my problem was you help. The steps are: 1) enable the link to /etc/resolv.conf ```ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf``` 2) Start & enable ```systemd-networkd.service ``` ```systemctl start systemd-networkd.service systemctl enable systemd-networkd.service``` 3) Stop & disable ```networking.service``` Thanks again! – Jonny Quest Nov 20 '19 at 12:23