-1

we have several RPIs 4 which work without issue when connected to wifi (hotspot or directly via router). However, we currently have one RPI 4, which is connected to a hotspot from a laptop but is not able to ping google.com or an IP like 8.8.8.8. Note that another RPI which is connected to the same hotspot works fine. I tried to compare the working and not working RPI, but couldnt find any differences in the settings. Moreover, I have no problems to ssh into the buggy RPI.

OS on the RPI 4:

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Here some further info:
Error msg:

$ ping google.com
PING google.com (172.31.255.254) 56(84) bytes of data.
From hi.link (192.168.8.1) icmp_seq=1 Destination Net Unreachable
From hi.link (192.168.8.1) icmp_seq=2 Destination Net Unreachable
$ sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.8.1     0.0.0.0         UG    204    0        0 eth1
0.0.0.0         192.168.137.1   0.0.0.0         UG    303    0        0 wlan0
192.168.8.0     0.0.0.0         255.255.255.0   U     204    0        0 eth1
192.168.137.0   0.0.0.0         255.255.255.0   U     303    0        0 wlan0
$ ifconfig
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.137.153  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::f95b:6e2e:769f:db7  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:6f:a7:c2  txqueuelen 1000  (Ethernet)
        RX packets 482  bytes 123685 (120.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 515  bytes 79005 (77.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 $ iwconfig
eth0      no wireless extensions.

eth1      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"secret"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 7A:2B:46:F4:A4:6B
          Bit Rate=57.7 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=53/70  Signal level=-57 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:189  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

My /etc/network/interfaces file is empty

What I noticed, when pinging to google.com from my laptop (or another RPI) it is not the same IP which is resolved by the laptop compared to the one RPI not workin. When I use the IP from the laptop it does not work either. It looks like the RPI can neither resolve the address correctly, nor ping to anything outside the network. Besides, I already tried the setup (laptop + RPI4) two different router (at home and in the office).

Using a new SD card image might solve the problem but I dont want to try since afterwards I cannot debug anymore and a new image would not be a suitable solution anyway when the RPIs fail in the field.

One final thing, searching the internet for a solution, I always read HOST is unreachable, but this time NET is unreachable, maybe this is interesting.

Can anyone help me with that issue?!

EDIT: A HUWAI wifi stick is also connected to the RPI. Sorry for not mentioning it before since this is a crucial fact. The stick is used when no WIFI is available. However, the other RPIs work just fine with the stick. Additionally, I noticed that the eth1 network is related to the stick. It vanishes when the stick is detached.

IMPORTANT: When I remove the stick, the RPI can ping IP addresses AND google.com, any idea how I can debug what goes wrong when the stick is attached?

10
  • You have two default routes, which is not good, and one of them is on eth0, which judging by the ifconfig output is not connected.
    – goldilocks
    Commented Dec 11, 2021 at 16:47
  • There's something odd going on as you've resolved google.com to 172.31.255.254 which is an RFC1918 private, non-routeable IP address block. Remove the invalid route (192.168.137.1 is used for Windows connection sharing). Try rebooting your home router. Try power cycling your RPi.
    – Dougie
    Commented Dec 11, 2021 at 16:50
  • hey guys, thank your for the reply. I removed the eth1 route and also the 192.168.137.1 route, restarted my router and the RPI. These are my routes now: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.137.1 0.0.0.0 UG 303 0 0 wlan0 192.168.137.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0 Unfortunately, this did not change anything. Since I am quite new to this routing business, maybe you could elaborate your thoughts. Thanks
    – Slev1n
    Commented Dec 11, 2021 at 19:07
  • UPDATE: A few minutes later, now all routes are back again...Shall I try to remove them permanently?
    – Slev1n
    Commented Dec 11, 2021 at 19:16
  • try a fresh install of raspberry pi OS, and/or remove whatever devices you have connected to that pi (USB, hats, etc)
    – Bravo
    Commented Dec 12, 2021 at 0:04

1 Answer 1

0

Well, I found a workaround solving this issue

$ sudo ifconfig eth1 down

The command down closes the network interface and up opens it again (more info here). After a reboot you have to close it again. Though, this could be considered a solution, it does not permanently solve the problem neither, does it provide a solid explanation WHY the interfaces are interfering and at what point. If anyone can provide an explanation I would mark it as solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.