2

Up to Server2012 it was possible to set up binding order via GUI. Since server 2016 Microsoft recommends using interface metric to configure NIC priority. However I have a legacy application that reports its own IP address to a different server and for this purpose it ignores interface metric and instead relies on binding order. It just reports the IP address of the first NIC that it gets from the system (tested this via disabling the other interfaces).

Is there any way to configure this via registry?

I tried changing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage but it has no effect, even after machine restart the order reported by Get-NetIPInterface stays the same.

I also tried nvspbind but it has no effect in Windows Server 2016.

  • Routing metrics are not at Application layer. A legacy application would go by default on the lowest metric, because that is dictated by the OS. If that does not happen, it means the application is specifically configured to take the other route. – Overmind Feb 3 at 12:19
  • The problem is that the application reports its own IP address and this is apparently connected to binding order. Updated the question accordingly. – pablo285 Feb 3 at 12:55
  • Better question, why did you dual home the server, if this is an enterprise application why not dedicate the server to this one application? – Jacob Evans Feb 10 at 17:39
  • The server is dedicated to that application, the other NICs are used for datacenter purposes (administration and backup), can't do much about that. – pablo285 Feb 10 at 21:30
2
+100

Try this - the software can bind connections from a process to a specific network adapter.

Maybe it will help you solve your problem.

https://github.com/falahati/NetworkAdapterSelector

  • While this might work, the server is in enterprise environment and installing any unknown software is out of the question. Thanks for the tip anyway. – pablo285 Feb 9 at 19:28
  • 1
    it's not unknown if you can read the sourcecode... – Jacob Evans Feb 10 at 17:37
  • I understand your concern about unsupported software on your server. But in the end it might be the best option left. And as Jacob mentioned above, since it is open source you can make sure there is nothing shaddy in it. Also, is the application you are trying to fix supported? Because if yes, you could try contacting the vendor to provide the solution. – Jevgenij Martynenko Feb 11 at 22:44
  • 1
    It's our internal software, very old and badly written. I tested this solution and it doesn't work since the starting .exe runs another .exe that does the network communication (this leads to only the first .exe is bound to the NIC I want). However I will award the bounty since it's the closest thing to a solution I got. – pablo285 Feb 12 at 8:45
1

You can try the following approach.
in registry editor open class "Net" Class {4d36e972-e325-11ce-bfc1-08002be10318}

HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}

You will find four digit keys in order they get listed/enumerated.

0000
0001
0002

The idea is to change the order so your device will be the last in the order. To achieve this simply rename the keys so yours has the last number. There is no need to rename all - just swap with the last one.

After that you have to fix the path for both renamed drivers. It has to be pointed by devices correctly.

You can find both device path into DeviceInstanceID values located at

HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\00xx\
DeviceInstanceID

This value will point to Enum [DeviceInstanceID]

HKLM\SYSTEM\CurrentControlSet\Enum\[DeviceInstanceID]\
Driver

You have to update these values with renamed (reordered) values

{4d36e972-e325-11ce-bfc1-08002be10318}\00xx

Both has to match new locations after renaming

Additionally. You can make sure you are looking into right device by matching NetCfgInstanceId to its configured IP addresses

HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\00xx\
NetCfgInstanceId

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\[NetCfgInstanceId]\
IPAddress

WARNING
Its not an official way.
Make sure you take backup.
Make sure you've found proper keys/values.
Practice first.
It will failure load network drivers during boot if miss configured.
Do it on your own risk.

  • Thanks for a great answer. This does not work for me unfortunately. This changed the order I got using wmic nicconfig however the order I get from Get-NetIPInterface stays the same and so does my application behavior. Any thoughts on that? – pablo285 Feb 6 at 11:11
  • Yes, long time ago, it has no effect on order in Win2016. – pablo285 Feb 6 at 18:45

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.