0

I have a Raspberry Pi 3B+ connected over ethernet to Network X, which is not connected to the internet. It's also connected using the WiFi interface to Network Y, which is connected to the internet. It is able to ping and interact with other devices on Network X, but it cannot access anything on the internet through Network Y. When I attempt to ping something on the internet, google.com for example, it fails with an error message referencing Network X's router's IP address. If I disconnect the ethernet cable (and therefore disconnect the pi from Network X), it is able to successfully ping and connect to the internet and works as expected. Other (non-pi) devices connected to both Network X (wired) and Y (wireless) are working correctly.

Any ideas on what might be going on?

3
  • Please specify what OS you're using - you can use a tag to specify that.
    – Seamus
    Nov 26, 2023 at 23:41
  • This is the latest 32-bit Raspberry Pi OS Lite version, released on October 10th (based on Debian Bookworm) Nov 27, 2023 at 0:11
  • OK, you can also get that as follows from the CLI: lsb_release -d | cut -f 2... Anyway - I see you've got an answer now - it looks pretty good.
    – Seamus
    Nov 27, 2023 at 2:28

1 Answer 1

0

You haven't specified how you setup networking (presumably NetworkManager) or how you are using "Network X".

In general WiFi has a lower priority than Ethernet.

You will need to specify routing. You can see current settings using route.

Mine is

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.1.2.1        0.0.0.0         UG    100    0        0 eth0
default         10.1.2.1        0.0.0.0         UG    600    0        0 wlan0
10.1.2.0        0.0.0.0         255.255.255.0   U     100    0        0 eth0
10.1.2.0        0.0.0.0         255.255.255.0   U     600    0        0 wlan0

which shows eth0 will be used as default; wlan0 has a lower priority and would be used if no Ethernet network is connected.

It is usual to have a single default if there are multiple interfaces (I do not do this as both are connected to the same router.)

The process to set no gateway in dhcpcd for a specific interface is documented in How to set up networking/WiFi.

It would be possible using NetworkManager but as this is new to Raspberry Pi OS there is no current Pi specific documentation but as this is a common Linux system it would be documented.

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.