We are trying to setup a computer to have remote access via internet (TeamViewer) and also have access to a small LAN, that connects to some control systems.
Essentially here is the setup.
Desktop running Windows 10 Professional. It has two network cards. One connects to the Internet only. The other to the LAN (the computer is set with a static IP address in Windows). When only one is connected, you can get either the internet or the LAN but when both are connected, neither connection seems to work.
The internet connection is DHCP and provides the computer with an IP when it connects.Currently this is what is being assigned when I open a command prompt and type ipconfig:
IPv4 Address. . . . . . . . . . . : 192.168.0.169
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1The other network LAN needs manual configuration, and the computer should have the following details (which I was provided and have set in windows)
- IP: 172.17.13.11
- Gateway: 172.17.13.1
- Mask : 255.255.255.0
This computer using the LAN needs to connect only to the following IP to do what needs to be done : 172.18.4.4
Again these details above work fine when only the LAN is connected to the computer. But when we connect the wire for the Internet to the other network card, we don't have either connection.
Any ideas how we can get things to work?
Thank you for your help.
51 Answer
To summarise, your computer has the following network interfaces:
- "To Internet"
192.168.0.169/24, Gateway:192.168.0.1(aka default route)
- "Internal" / "To Control System"
172.17.13.11/24, Gateway:172.17.13.1
With these connections established, you'll end up with two gateways, and I'm not sure how Windows will handle this... You may find:
- That you intermittently have access to the internal network or to the internet (possibly swapping after a reboot)
- That you only have access to the internal network
- That you only have access to the internet
I'd suggest that your "Internal" network doesn't have a gateway configured, and you instead set up an explicit route so that you can access your "control system" at 172.18.4.4, via this router. Get a privileged command prompt and type the following:
route -p add 172.18.4.4/32 172.17.13.1If you need access to other hosts (or to the whole subnet, possibly 172.18.4.0/24), then either run the command again for each host, or run the following for access to the full /24 subnet:
route -p add 172.18.4.0/24 172.17.13.1NOTE: You didn't provide details on the subnet that the 172.18.4.4 host is on, and I've presumed it's a /24 subnet.
Routes can be viewed with:
route printRoutes can be removed with:
route delete 172.18.4.0/24 1