Prefer Ethernet Over Wi-Fi on Raspberry Pi¶
Use a lower route metric on the Ethernet profile to make it the primary route. Keep a higher-metric Wi-Fi default route available for when the Ethernet route disappears. First check the routes already installed on your Pi, since NetworkManager can assign suitable metrics automatically. NetworkManager route metrics
Check which connection the Pi uses¶
Run these on Raspberry Pi OS with NetworkManager. The route lookups use example addresses and show the choice Linux would make without sending traffic.
Compare the metrics for the default routes and read dev in each lookup. For two otherwise comparable default routes in the same routing table, the lower metric wins. A route to a specific network or a VPN policy can send traffic elsewhere. Use the actual destination IP when checking an application. If IPv6 has no usable route, focus first on the address family you use. Linux route lookup and metrics
Set the NetworkManager route metrics¶
Use a local console or a separate management connection before reactivating either profile. Copy the UUID for the active Ethernet profile and the Wi-Fi profile from the first command above. Record any existing values so you can restore them.
IPv4 and IPv6 each have their own route metric. With these example values, Ethernet wins when both profiles supply comparable default routes for the relevant protocol. A value of -1 lets NetworkManager choose a metric based on the device. NetworkManager IPv4 settings · NetworkManager IPv6 settings
Reactivate one connection at a time to apply the saved settings. Replace eth0 and wlan0 with the interface names from your Pi.
Rerun the route lookups. If you need to undo the change, restore the original values in each profile and reactivate them again. nmcli connection commands
Check what happens when Ethernet goes away¶
On Pi 4B with Trixie, two simulated links in an isolated network had default routes with metrics of 100 and 600. Both IPv4 and IPv6 lookups selected the lower metric. Removing that link made the lookups select the remaining route. In a separate check, NetworkManager saved both metric fields in a test profile without activating it.
With local access, you can test the same behavior by checking the route, disconnecting Ethernet, and checking again. Start a fresh application connection over Wi-Fi. Existing sessions can drop when their source address changes. If the Ethernet link stays up while the router loses internet access, the preferred route can remain installed. In that case check reachability separately. Network and DNS checks