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.

4
  • 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, 2020 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, 2020 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? Feb 10, 2020 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, 2020 at 21:30

2 Answers 2

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

4
  • 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, 2020 at 19:28
  • 1
    it's not unknown if you can read the sourcecode... Feb 10, 2020 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.
    – J-M
    Feb 11, 2020 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, 2020 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.

3
  • 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, 2020 at 11:11
  • have you tried this? docs.microsoft.com/en-us/windows-server/networking/technologies/…
    – k010mb0
    Feb 6, 2020 at 15:51
  • Yes, long time ago, it has no effect on order in Win2016.
    – pablo285
    Feb 6, 2020 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .