Link to home
Start Free TrialLog in
Avatar of Dave Messman
Dave MessmanFlag for United States of America

asked on

Options for prioritizing wired LAN connection over wireless LAN connection

Like most networks, my LAN consists mostly of laptops.  And like most networks, I supplement my LAN connections at user's desks with a wireless network with multiple wireless access points.  

In every single case where it's available, I want the wired connection to be prioritized over the wireless.  


I've tried manually setting the metric for the IPv4 connections to no avail.  I've tried putting Local Area Connection at the top of Adapters and Bindings to no avail.  In all cases, I'm using Windows 7 Pro and a standard gigabit network with wireless connectivity typically either provided by Unifi devices or Aruba devices.

Most of the time, it's fine if the wireless is being used as there's plenty of wireless bandwidth.  But occasionally, the user has poor signal at his/her desk or the laptop has not let go of a wireless access point that isn't optimal.

The only reliable method I've come across is to disable the wireless card when a LAN connection is detected.  Dell WLAN cards used to have a setting for this.  I have found the Intel Adapter Switching method very unreliable (where based on your status when you put the laptop to sleep - the laptop does not redetect its status properly when woken up).  

The best method for Intel cards I've found is to disable the wireless via Wireless Autoswitch:
http://www.wirelessautoswitch.com/

Has anyone come across a more elegant and free way (preferably built into Windows that actually works) for prioritizing the wired connection over the wireless?

Thanks
metric.jpg
bindings.jpg
Avatar of Richard Daneke
Richard Daneke
Flag of United States of America image

I use a wireless and ethernet and have had some success with editing the route table.  Here is my text reminder on setup:
This is decided by the routing table on your computer. 
Open a command prompt and run "route print" to see what it looks like. 
The interface that has 0.0.0.0 assigned to it will be the one used for internet access. 
If there are more than one with 0.0.0.0 then the one with the lowest metric will be used. 
One way to force internet traffic to go through a certain interface is to add a route with a low metric for 0.0.0.0 to this interface.

Run "route print". 
	1. Look at the Interface List and remember the number of the interface you want to create a route for.
	2. Run "route delete 0.0.0.0 if <number of wanted interface>". This is because you cannot have two entries for the same route on the same interface.
	3. Run "route -p add 0.0.0.0 mask 0.0.0.0 <ip of gateway> metric 1 if <number of wanted interface>". The -p switch makes it permanent. Metric 1 will give it the lowes cost, hence it will be the preferred entry to use for requests to addresses not specified in the routing table.

Open in new window

BTW, having default gateways on more than one interface is generally not a good idea.
If you have a lot of devices to setup, I found mention of the following, but I have NOT tried this software:
a utility to ease adjusting the route table is this one: NetRouteView by NirSoft.
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Messman

ASKER

This matches my experience and thinking.  Setting the metric does not work reliably.  If you are wireless and hot dock your laptop, more often than not - your wireless is still the primary no matter what the metrics are.  

I tried this which had problems if putting your laptop to sleep and the event log doesn't track NIC connection/disconnection:
https://www.raymond.cc/blog/auto-disable-wireless-when-lan-connected/2/

In my experience, the only non-manual way to get the wired connection to consistently take priority over wireless is by disabling the wireless via Wireless AutoSwitch:
http://www.wirelessautoswitch.com/

Oh well.  It is what it is, I guess.
> to get the wired connection to consistently take priority over wireless is by disabling the wireless

Exactly my experience, too.

> Oh well. It is what it is, I guess.

Sad, but true.