I have a rpi 3 model b and am currently trying to set it up so that it connects to my wireless network and then connects through an ethernet cable to a copier in hopes of eventually being able to use cups and share this printer to the network. now when I have the rpi unplugged from the printer it connects just fine (I can ping it, ssh into it, etc) but the second I plug the ethernet cable in I no longer get any connectivity. Is the rpi only allowed to use one interface at a time? Is there some setting I am missing? please help.

  • Can you add details from the command "ifconfig" also add the config details from your "/etc/network/interfaces"
    – Varad A G
    Sep 1, 2016 at 15:36
  • Does the WiFi drop out if you start the Pi with both connected? How are you powering the Pi? Sep 1, 2016 at 17:41

1 Answer 1


In the initial question, you don't provide too many details about the configuration, so this is a bit of a guess: the WLAN gets a higher metric than the LAN does. You can consider metric as "cost". And as always, you want it as cheap as possible ;-)

As long as only the WLAN is connected, it's the only way and you have to bear those higher cost. As soon as LAN gets connected, the cost on the LAN is cheaper, so all the traffic goes out on LAN (as long as not explicitly told otherwise).

You can configure the metric of interfaces in /etc/dhcpcd.conf. Find a line that reads

interface eth0

or add it at the end of the file if it does not exist. Directly after that line, enter

metric 300

Then, find a line that is

interface wlan0

or add it at the end of the file if it does not exist. Directly after that line, enter

metric 200

That way, the WLAN will be cheaper than the LAN, so it will be used by default.

Apply the changes with a sudo service dhcpcd restart.

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.