11

So far I've tried to prioritize LAN the following:

Sadly that didn't change anything. I have to deactivate my wireless adapter to get Windows to use the LAN connection. Any ideas?

I am running Windows 7 Ultimate on a Lenovo G580 with a Broadcom 802.11n network adapter and a "Atheros AR8162/8166/8168 PCI-E Fast Ethernet Controller (NDIS 6.20)".

My router supports 54 MBit/s which should be beaten by the 10/100 Base-T standard ethernet, right?

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.178.1   192.168.178.57      2
          0.0.0.0          0.0.0.0    192.168.178.1   192.168.178.46      4
        127.0.0.0        255.0.0.0   Auf Verbindung (German: on-link) 127.0.0.1    306
        127.0.0.1  255.255.255.255   Auf Verbindung         127.0.0.1    306
  127.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    306
    192.168.178.0    255.255.255.0   Auf Verbindung    192.168.178.57    257
    192.168.178.0    255.255.255.0   Auf Verbindung    192.168.178.46    258
   192.168.178.46  255.255.255.255   Auf Verbindung    192.168.178.46    258
   192.168.178.57  255.255.255.255   Auf Verbindung    192.168.178.57    257
  192.168.178.255  255.255.255.255   Auf Verbindung    192.168.178.57    257
  192.168.178.255  255.255.255.255   Auf Verbindung    192.168.178.46    258
        224.0.0.0        240.0.0.0   Auf Verbindung         127.0.0.1    306
        224.0.0.0        240.0.0.0   Auf Verbindung    192.168.178.57    257
        224.0.0.0        240.0.0.0   Auf Verbindung    192.168.178.46    258
  255.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    306
  255.255.255.255  255.255.255.255   Auf Verbindung    192.168.178.57    257
  255.255.255.255  255.255.255.255   Auf Verbindung    192.168.178.46    258
===========================================================================
Persistent Routes:
  None

and heres the same with 100 wlan metric:

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.178.1   192.168.178.57      2
          0.0.0.0          0.0.0.0    192.168.178.1   192.168.178.46    102
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
    192.168.178.0    255.255.255.0         On-link    192.168.178.57    257
    192.168.178.0    255.255.255.0         On-link    192.168.178.46    356
   192.168.178.46  255.255.255.255         On-link    192.168.178.46    356
   192.168.178.57  255.255.255.255         On-link    192.168.178.57    257
  192.168.178.255  255.255.255.255         On-link    192.168.178.57    257
  192.168.178.255  255.255.255.255         On-link    192.168.178.46    356
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link    192.168.178.57    257
        224.0.0.0        240.0.0.0         On-link    192.168.178.46    356
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link    192.168.178.57    257
  255.255.255.255  255.255.255.255         On-link    192.168.178.46    356
===========================================================================
Persistent Routes:
  None

Any idea why the one and two become metric two and four and one and 100 become two and 102?

Both wired and wireless adapters connected are connected to the same subnet. The only thing that runs on startup is my anti-virus program. At least from what I can control in msconfig.

0

3 Answers 3

9

To make the wired LAN connection take priority you need to change the metric for the WIFI connection in the advanced settings pane of the WIFI connections' properties.

enter image description here

Untick the 'Automatic metric' and set the metric to 9999 manually

enter image description here

Next open a commandline with admin rights and submit this command to clear the routing tables:

route /f

After this step reboot windows to make sure the new metric value gets used.

Upon rebooting the routing tables will be rebuilt using ARP-discovery, causing the new metrics to be assigned to the routes. The net effect will be that to your TCP/IP stack it will look as if hosts/devices connected to the wired LAN have a more efficient route than those connecting via WIFI only.

https://support.microsoft.com/en-us/kb/299540

7
  • 1
    More detail would improve this answer.
    – Dave M
    Commented Jan 30, 2014 at 17:59
  • Added extra info, this is to my limited knowledge (had the same problem, this fixed it) but if someone has a more in-depth technical explanation of why Windows behaves this way please add.
    – Jake
    Commented Jan 30, 2014 at 20:35
  • Windows is still using the wlan connection.
    – qwertz
    Commented Feb 2, 2014 at 13:53
  • Did your clear the routing tables after setting the metric?
    – Jake
    Commented Feb 2, 2014 at 14:21
  • 2
    A note for anyone else who hits this - set the metric for IP6 and IP4.
    – miltonb
    Commented Nov 11, 2014 at 1:02
1

The automatic metrics are based on connection speed, so while a 100Mbps LAN connection beats a 54Mbps 802.11g network, a 150 or 300Mbps 802.11n network will win.

The adapter binding order in your first bullet is unlikely to be useful here. The interface metrics in your second bullet should have done the trick... Perhaps a more extreme value is needed (say 1 for LAN, 100 for WLAN).

Can you provide the "IPv4 Route Table" section of a netstat -rn command? Those are the final metrics as the TCP/IP stack actually evaluates them and should be the source of truth.

2
  • the route tables ares too large for a comment...
    – qwertz
    Commented Jan 30, 2014 at 17:01
  • @BowlesCR, He's asking how to change them, not read them.
    – Pacerier
    Commented Oct 9, 2015 at 6:18
1

On Windows 7

  1. type in "ncpa.cpl" at the run dialog
  2. press alt / F10 if the menu bar is not visible
  3. Advanced > Advanced Settings > Adapters and Bindings Tab > use up-down arrow key to set priority of selected connection

reference: LNN howtogeek

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .