A laptop using windows-7 is connected to two WIFI connections using a built in wireless card and a USB wireless card.

  • WIFI-1 is a Tenda Router using IP range 192.168.0.*. This router is not supposed connected to internet on purpose.
  • WIFI-2 is a TP Link Router using IP range 192.168.1.*. This router is connected to the internet and needs to provide internet connectivity to the laptop.

Internet works as long as the laptop connects only to WIFI-2 using either the internal or the USB card. When the second card is used to connect to the WIFI-1, internet connectivity is lost in a few seconds. When we ping a website (like www.google.com) it shows that it is trying to ping google using IP which is the router with no internet connectivity.

How do we tell windows always to use a specific connection for internet? We also tried to set a higher priority for the Wireless Card that connects to WIFI-2 by going changing priority under:

Adapter Settings->Advanced

However, it still shows the same behavior. Also tried to move the internet router to a lower IP range in the hope that Windows may try to use it but it didn't work as well.


OPTION 1: Remove route. You currently have two routes to i.e. default gateway on both interfaces and route print tells something like:

IPv4 Route Table
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric

You can

  • remove this route by route DELETE MASK
  • manually assign an IP for the interface connected to the network without Internet (on interface's TCP/IPv4 settings) and leave Default gateway empty. (This will remove the route permanenty.)
  • configure DHCP server on TP-Link router. On DHCP > DHCP Settings, use empty default gateway. This is network wide solution and works directly on every computer: if there's no route, why use this router as a default gateway for anyone. In your situation, I'd advice doing this.

OPTION 2: Change metric value. It should be lower for the desired Default Gateway.

  • Decrease the metric value of the desired gateway. (Use the IP addresses from route print.)

  • Increase the metric value of the gateway you don't want to use:

  • Automate one of these by modifying my script for automated metric adjustment.

  • Really sorry, I corrected a couple of typos in my question. So to clarify WIFI-2/TP-Link/192.168.1.* is connected to internet and we need to prioritize it. So I believe, we'll need to delete the other route? – Aziz Apr 25 '17 at 16:11
  • Unfortunately Tenda Routers have anemic DHCP server configuration options: they will always set themselves as the default gateway, leaving my best advice (working with TP-Link) useless. Otherwise... if I show you how to use a hammer with my right hand, it works exactly the same way even if you happen to be left-handed. You just switch the IP addresses around. – Esa Jokinen Apr 25 '17 at 19:09
  • Right. So you believe removing the route should help get rid of the problem where it always tries to attempt to access internet through Tenda? – Aziz Apr 26 '17 at 10:41
  • Correct, but manually configuring a static IP without default gateway (instead of DHCP) will have a permanent affect. Otherwise you need to remove the route again every time you reconnect. Am I repeating myself?. – Esa Jokinen Apr 26 '17 at 10:51
  • Got it, yea I didn't fully understand it the first time :) – Aziz Apr 26 '17 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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