WLAN/WIFI and DNS but no Internet

Hi. First things first:

############## openhabian ##################################################
##############################################################################
Ip = 192.168.1.2
Release = Debian GNU/Linux 10 (buster)
Kernel = Linux 5.10.17-v8+
Platform = Raspberry Pi 4 Model B Rev 1.4
Uptime = 0 day(s). 0:23:40
CPU Usage = 1.26% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
CPU Load = 1m: 2.46, 5m: 2.17, 15m: 1.12
Memory = Free: 5.68GB (74%), Used: 1.99GB (26%), Total: 7.67GB
Swap = Free: 2.58GB (100%), Used: 0.00GB (0%), Total: 2.58GB
Root = Free: 22.75GB (81%), Used: 5.08GB (19%), Total: 29.06GB
Updates = 28 apt updates available.
Sessions = 1 session(s)
Processes = 133 running processes of 32768 maximum processes
###############################################################################

3.0.1 - Release Build

Make it short: I wanted to update my System but there are no packages loaded, although 28 are availible. After some hours, the issue is, that I cannot get any data from the internet.

  1. SSH via w-lan: ok
  2. Ping within my w-lan: ok
    2.1. Desktop PC can ping the Raspberry and Raspberry can ping Desktop

Ping www.heise.de: not

  • openhabian@openhabian:~ $ ping www.heise.de
  • PING www.heise.de (193.99.144.85) 56(84) bytes of data.
  • ^C
  • www.heise.de ping statistics —
  • 2 packets transmitted, 0 received, 100% packet loss, time 19ms

Since I ping www.heise.de the DNS translates it correctly into its IP

All other devices in the same w-lan can access the internet.
I am just using Linux and have some rough idea of the theory. But how all the settings in Linux are made? I have no clue. Just searching the internet:
ip a
was always requested. This is the output:

openhabian@openhabian:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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 mq state DOWN group default qlen 1000
    link/ether dc:a6:32:ed:7c:37 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:ed:7c:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic wlan0
       valid_lft 85844sec preferred_lft 85844sec
    inet6 fe80::dea6:32ff:feed:7c39/64 scope link
       valid_lft forever preferred_lft forever

And

openhabian@openhabian:~ $ sudo nano /etc/network/interfaces`
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

I would by happy, if someone could help me.

Hi Christoph,

did you check the routing configuration on RPI ?

netstat -r

traceroute www.heise.de

openhabian@openhabian:~ $ netstat -r
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
default         a1modem.home    0.0.0.0         UG        0 0          0 wlan0
default         a1modem.home    0.0.0.0         UG        0 0          0 eth0
link-local      0.0.0.0         255.255.0.0     U         0 0          0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
openhabian@openhabian:~ $ traceroute www.heise.de
-bash: traceroute: Kommando nicht gefunden.

Seems not to be installed. This is now too much for my level of Linux knowledge. Is this ok?

Meanwhile I connected the raspberry additionally via cable to the router. And as long as wlan is activated there is no connection. But if I switch wlan off via sudo openhabian-config pinging anything is fine. But if I activate wlan and keep the cable connection, too, there is no connection anymore. So it seems the wlan setting is messed up.

Based on what you have posted so far it seems like a IP conflict (but typically LAN access would be hit or miss), or the router/firewall has an issue with 192.168.1.2.

Have you tried a different IP address via DHCP or static IP on the Pi?
Does the LAN interface reach the Internet if you wire it up?

WLAN and LAN in parallel to the same Networkelement are no good idea.
As anonymous.o ne mention, looks like IP conflict

In the output of netstat bouth connections are enabled. Could you dissable WLAN, connect via LAN, wait until WLAN is timeout (no wlan0 in netstat output).
How about the output of
ip a
netstat -rn

First thanks for all the help. The behavior of the PI is strange. I have fixed IP via my Router this is was 192.168.1.2. To test it I changed it to 192.168.1.3. The PI now has 192.168.1.3 but still no connection.

openhabian@openhabian:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:ed:7c:37 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 86306sec preferred_lft 86306sec
    inet6 fe80::2819:e191:f93f:df2a/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:ed:7c:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic wlan0
       valid_lft 86300sec preferred_lft 86300sec
    inet6 fe80::dea6:32ff:feed:7c39/64 scope link
       valid_lft forever preferred_lft forever

With wlan is .3 and lan .5 Looks ok. With the wifi switched of it looks like this:

openhabian@openhabian:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:ed:7c:37 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 86259sec preferred_lft 86259sec
    inet 192.168.1.4/24 brd 192.168.1.255 scope global secondary dynamic noprefixroute eth0
       valid_lft 86264sec preferred_lft 75464sec
    inet6 fe80::2819:e191:f93f:df2a/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
openhabian@openhabian:~ $ netstat -rn
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
0.0.0.0         192.168.1.138   0.0.0.0         UG        0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

If only the wired Lan connection to the router is set, I can reach any page. eg. ping www.heise.de works. As soon as I activate and connect via wlan only the name service works but no reply.

The IP is resolved but no answer received. This the case even if the wired connection is set up, as soon as the wlan is connected. If I block the PI wlan at my router, so wlan is enabled but no connection the internet can be reached.

Having wlan and eth0 in parallel is only because wlan itself has no internet. Final setup should by wlan only with internet. This was the starting point. I had the PI in wlan only and now internet connection. Than I plugged the cable in but no connection, too. Only if I disconnect/switch of wifi and have only wired connection to the router it works.

If only WLAN used, DNS is working and default route is set to your HomeGateway on RPI, looks like the HomeGateway will drop the IP-Packets for the RPI (or NAT is not working)
You could ping HomeGateway, but I guess the next hop at your Provider could not be reached?
please check the config of your HomeGateway.

Hi Juergen this seems to be the case.
Just for test reasons, I set up a new Openhabian. The behavior is the same. No Internet if wlan is connected. It must be some interaction with the router. The strange thing is, that only RPI is blocked. All other devices in the network are working. This is why I think the interaction of RPI and my Router is the issue. I also found something called MULTICAST

Interestingly the RPI and some Shellys are in there. But neither do I have an idea what this is and does nor how to remove it. All what I can find in the internet is that multicast is requested by the client and not done by the router. The motioned settings “IGMP/MLD konfigurieren.” does not exist.

Hi Christoph,
IGMP/MLD (Multicast used normal for IPTV) should not be the issue, as it will not affect the routing.
Which Router did you use ?
In some HomeGateways you could set filter or need to enable internet access

Apologies for being MIA.

Two odd things from screenshots I saw, in one you had to entries in your routing table for a1modem.home (for netstat) and then I saw 2 IPs for eth0. Its odd to see that behavior on the OS unless you are setting it up for specific reasons.
Also to confirm have you done any pi firewall configurations? I would assume this is not the case but double checking.

With the LAN port working, I would focus on the wireless between the PI and access point. Are you able to ping other devices on wireless from the PI without eth0 active? (I would try to ping as many things in the subnet as possible)

If pings do work to other devices on the subnet, then it would be an issue access point/router device (assuming its the same device).

Another thought, have you tried Raspberry Pi Lite (or some other OS flavor) just to test?

1 Like

Thanks for the ongoing support. The only thing I set up is a fixed IP for the PI wlan0. This is fixed at the routers DHCP: a1modem.home But beside this there is nothing special for the PI. The fixed IP setup is used for the shellys, too. Of course they get different unique IPs.

I put the PI back to its place where no wired Lan is available, only wlan. Now it looks like:

openhabian@openhabian:~ $ netstat -r
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
default         a1modem.home    0.0.0.0         UG        0 0          0 wlan0
link-local      0.0.0.0         255.255.0.0     U         0 0          0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
openhabian@openhabian:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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 mq state DOWN group default qlen 1000
    link/ether dc:a6:32:ed:7c:37 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:ed:7c:39 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic wlan0
       valid_lft 80693sec preferred_lft 80693sec
    inet6 fe80::dea6:32ff:feed:7c39/64 scope link
       valid_lft forever preferred_lft forever

My Route is a Zyxel DX3101from A1 an Austrian Companie. There is a firewall included. But it has no influence on the behavior of the PI. I can switch it of and nothing changes.

A can ping any device in my own network and any device can ping the PI. The openhub installation works fine with all the components in my flat.

I haven’t tried any other OS yet. Only a completely fresh latest Openhabian. The behavior is the same. If I find time this week, I will check another OS.

SO final result. I check the original Raspberry Pi OS Lite and the same behavior.
Summery:
All device in the wlan have internet access, but the Pi.
There is no firewall setting active at the router.
DNS for the PI is working.
Ping within the network works from the Pi and to the Pi.
Any device within the wlan can access the Pi (ssh, Web Frontend Openhab)
→ my conclusion: The Pi os is the problem.

But after doing a hard reset of my router the PI has access. Please do not ask for the reason.

Thanks for all your help

I doubt because wouldn’t there be more reports then ?