how to make my pi 4 prefer wifi over ethernet

  • Hi everyone I run raspbian lite os on my raspberry pi 4.


    I installed openmediavault on it. I have both wifi and ethernet connected to my pi 4.


    ethernet is just for the local network. it doesn't have internet access.


    wifi has internet access.


    if eth0 is removed from omv network interfaces

    I can ping, update, etc.,


    but when I add eth0.


    I cannot ping any sites, cant run any updates. my pi 4 is preferring eth0 for the internet.


    I still want to connect to the ethernet. I want my local devices to talk to each other.


    how do I set my pi 4 to prefer wifi for the internet?

    any help would be appreciated.



    Version

    6.0.5-3 (Shaitan)

    Processor

    ARMv7 Processor rev 3 (v7l)

    Kernel

    Linux 5.10.63-v7l+




    edit: according to this link https://forums.raspberrypi.com/viewtopic.php?t=189582

    interface eth0

    metric 300

    interface wlan0
    metric 200


    adding this in /etc/dhcpcd.conf should fix the issue.


    but it is my understanding that omv doesn't use dhcpcd.conf file.


    so how do i fix this in omv?



  • KM0201

    Approved the thread.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!