0

I have a win10 machine in a rural area with no ability to connect to a private network. The computer is used to track measurements of specific sensors which are connected with ethernet to the computer. I want it to upload data to my cloud using a huawei internet stick.

And here is the problem: When I plug in my internet stick it will not connect to the internet (no response ping 8.8.8.8 or visit google with browser possible). So I figured out that I need to uncheck the "automatic metric" in the ethernet adapter settings. I've set them to 1 (also 2, 3, 4..) and was able to connect to the internet. But then I faced another problem, I was unable to connect to my sensors. As soon as I unplug my internet stick, I was able to connect to the sensors again.

This is driving me nuts. I have no manual of the sensors since it was a development product of 3rd party. But I assume that the IP is given from the sensors (dhcp most likely on that sensor-hardware). I haven't try it out but do I need to set the default gateway of the sensor-connection to the IP of my internet stick? So in case it can not find a route at the sensor, it would redirect to the default gateway to the internet?

Thanks in advance, sorry I am quite new in networking.

V.Hunon
  • 111
  • 1
  • 3
  • This more a routing then a metric problem. Just remove the default gateway from your LAN adapter(s) and use the default gateway of the USB connection as the only one on your windows machine. – bjoster May 28 '21 at 14:28

1 Answers1

1

A lot (most? all?) USB-based celluar modems act as a NAT gateway and simulate a regular ethernet connection. What it sounds like is happening here is that the IP range that the USB stick uses is the same as the IP range your sensors use.

So when you plug it in, the computer sees two adapters with the same range, and so it assumes that they are both on the same network - when they are not. Changing the metric will make Windows use the lower metric'd interface for all its network traffic - but it doesn't know that the two interfaces are actually different.

If this is what's happening (and it's just an assumption), then you will have to re-number one of the networks.

The way to validate this is to run ipconfig when you have the dongle plugged in. If the first 3 sets of digits in the IP addresses on both adapters are the same (e.g. 192.168.0, then it's a 99% chance that this is the problem.

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • No they are in different subnetworks. 192.168.8.XXX and 172.22.22.XXX. I figured out that the 172.XX network is using dhcp and using that router as default network seems mandatory because the PC can not know which router to use for the sensors. The internet stick itself acts as gateway/router as well. So theres no point in my eyes to set metric here. I probably achieve best results if I connect the 172.X network with the internet directly. – V.Hunon May 26 '21 at 15:27