A similar question was asked for windows Automatically prefer Ethernet over WLAN but I'm on linux and am using NetworkManager.
Right now if the ethernet cable is plugged in and is available while wifi connections are also available NetworkManager chooses the wifi connection. How can I tell it to always choose the wired connection if available?
I'm on Fedora 17 using NetworkManager-0.9.4.0-9.git20120521
Best Answer
Just a couple things:
You could try these commands in your environment to see if they work and bring desired results:
Alternatively, you can have a look at your IP routes found by issuing:
By looking at the output, see if wlan0 is on all routes.
Several other questions have been asked with this and the only way to get Linux to favour an interface (by default it is eth0 but in your case, something went awry) is to manipulate the metrics.
You can configure the metric for an interface using ifmetric which manipulates the metric on an interface you specify. I haven't tested this on Fedora per se, but I can see it is in the repositories. So, issue:
Then when it is installed, you will want to go to:
Use vi, nano, emacs, whatever editor you use and then add underneath whichever interface you want to configure (in this case eth0):
X relates to a number determining the priority, 0 by default is the highest priority, but to avoid hitting static/default routes, use something above 2. Then you will want to add a higher number to wlan0. So:
and under wlan0:
Your file should be looking like this:
Let us know if it helps!
EDIT: Just come across a few links:
EDIT 2:
There is also a metric field in Network Manager GUI!