I've got a Windows 2012 server that is multi-homed (for some specific monitoring purposes, definitely not ideal, but it is what it is). Only one interface has a gateway setup (as that's the one that should be used for traffic that needs to be routed). It has no problem selecting the appropriate interface for "directly connected" (same subnet) communications. However, when traffic is destined for an address that requires routing it doesn't always choose the interface that has the gateway. Obviously this is a bad thing as that traffic will never get anywhere. My expectation would be that Windows would not attempt to source non-local subnet traffic on an interface without a gateway, however, this server is proving me wrong... Is there a way to force the one particular interface with the gateway to be the preferred (except for directly connected traffic as those subnets are directly attached for a reason)?
edit
I have tried playing with the metrics on the interfaces and the gateway. No success, does not seem to influence which interface is actually chosen.
Problem solved.
Our IPS product on the firewall was blocking that device from making any connections. Windows would try the proper interface once, get blocked, and then was flipping to the wrong interface where it would just keep retrying.
Root cause was a misconfiguration of the IPS on the firewall, which has now been resolved.