1

In short lan connection went down so I connected my computer to my phone via Wi-Fi hotspot. Despite my computer reporting internet access through the Wi-Fi I still cannot use the internet unless I unplug the Ethernet cable. Is there any way to have it so I don't have to unplug the ethernet cable to use the Wi-Fi(and vise versa)? This is also making me wonder if my computer is only using one connection (my slower LAN) when both are connected.

os: windows 7 sp1

enter image description here

  • Can you just manually tell the home network to disconnect while you're connected to the phone's wifi? – Xen2050 Sep 15 '18 at 7:45
  • 2
    your LAN connection is not down (your screenshot says you have multiple networks), you probably meant the Internet connection of your LAN device is down. And because of this of course you have no Internet as the default gateway is still set to the LAN connection. as @Xen2050 said, disconnect your cable and you are fine. another option is to set your default gateway for the 0.0.0.0 route to your mobile hotspot instead to the LAN connection. – Zina Sep 15 '18 at 8:02
  • I meant a "software disconnect", or disable, without having to physically pull the plug, but it essentially does the same thing. I remember reading about ways to get two networks like this to work together, but right-clicking to disconnect is probably a lot faster & easier – Xen2050 Sep 15 '18 at 8:07
0

Such a network is very unstable and it is not recommended to set up our network because the system automatically creates a default route when the network is reconnected. However, we can try to set it as below:

For example, we can set the ethernet setting as below:

local IP address: 192.168.1.2

subnet mask: 255.255.255.0

gateway: 192.168.1.1

And the wifi setting as below:

local IP address: 192.168.42.2

subnet mask: 255.255.255.0

gateway: 192.168.42.1

We can set network discard as usual, now there are two gateways pointing to "0.0.0.0", so we need to configure the routing table.

  1. Open command prompt, run as administrator.

  2. Type "route print ", click "Enter".

enter image description here

  1. Type "route delete 0.0.0.0" (delete all the routing table of "0.0.0.0" ), click "Enter".

  2. Type "route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.1" ("-p" means permanent or static, it prevents configuration from disappearing on next reboot), click "Enter".

-->Add an static route to force computer to go to the wifi.

We can refer to the article: Why can’t I use my Wi-Fi and USB tethering at the same time? Whenever I turn my USB tethering option on, it switches off automatically and resets USB tethering to charging only.

| improve this answer | |

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.