My pi is connected to two different networks, one by ethernet and one by a wifi dongle. The ethernet network is not connected to the internet but the wireless one is. The pi automatically uses ethernet to try to access the internet and obviously fails. How can I force it to use wifi?


Your default route most likely points the traffic to that wired interface's default gateway. You may see the routes by issuing for example ip route show, also simple route shows the details. So, you'll have to change the default route to wireless' interfaces gateway and add a another (static) route for the internal (wired) network traffic.

There are many examples available. See here and here for examples. Google for more.

Hopefully this helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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