How do I force traffic intended for one NIC to never travel through a second NIC?
The setup: I have a computer with Windows and two NICs; let's call them NIC1 and NIC2. NIC1 is used to interface with the corporate network, and NIC2 is used to interact with some equipment we'll call "the device". NIC1 uses DHCP, and NIC2 is assigned a static ip with no default gateway. The device on NIC2 is connected directly. I'm running some software on my computer that performs diagnostics on the device connected to NIC2, and occassionaly this requires the device to go through a reset/reboot cycle. When this happens, the diagnostic software will poll to see when the device reconnects.
The problem: Sometimes it takes a little longer for the device to finish this reset/reboot cycle, and if the device is still down when the software polls it, the OS goes from looking for it through NIC 2, where it should be, and starts looking on NIC 1.
The plot thickens: This would all be fine except that the device has a very common IP address, like 192.168.1.1, and people keep attaching equipment to the network with the same IP. I've tried to get the IT deparment to prevent the use of this IP on the network, or provide me with some other relief, to no avail. So when the software I'm running tries to connect to my device and it happens to still be finishing up its reset and doesn't respond, and Windows goes looking for it elsewhere, it actually finds it! Only it isn't it, it's something else with the same darn IP address. So then, a few seconds later when the device I want to talk to does come back up, the software is too busy talking to something else, and I get timeouts, and cascading failures, and all other kinds of headaches.
I'm tired of trying to fight the system through administrative controls or policy, so now I am looking for a technical fix.
So my question is this: is it possible to force traffic on a certain subnet, say 192.168.1.xxx, to always go through NIC 2 and never to even try to go through NIC 1 no matter what? Not even if it can't find what it was looking for on NIC 2?
Limitations and things I've already tried:
I need both NICs active simultaneously. Data I'm collecting is stored in a database on the network. I need NIC2 to collect data and NIC1 to store it.
For various reasons, both technical and political, I cannot change the IP addresses of any of my equipment, not even the device.
I do have complete control over my station, and I've tried to set up routing tables, but those only seem to control priority of where the OS starts looking, and does not control where it is and isn't possible to look. As far as I know there is no "don't use this interface to find this destination IP" entry you can put into a routing table.
The problem: Sometimes it takes a little longer for the device to finish this reset/reboot cycle, and if the device is still down when the software polls it, the OS goes from looking for it through NIC 2, where it should be, and starts looking on NIC 1.
Connect the device through a cheap Ethernet switch. This will ensure that the Ethernet link seen by your OS never goes down, even if the device reboots. That will allow routes through NIC 2 to always remain valid.