Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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