Influence automatic interface metrics assignment

  • Thread starter Thread starter Benjamin Kalytta
  • Start date Start date
B

Benjamin Kalytta

Hello everyone,

is there a way to influence the automatic metrics algorithm (interfaces
and per IP) in some way? Influence in the sense of manipulate.

This problem also covers following posts:

"multiple NICs; automatic metrics"
"Two NICs with identical gateway metric"

Very often there are several default routes but with different metrics.
In most cases automatic metrics algorithm works fine, but there should
be a better way to switch the "Default Gateway" other than setting
manual metrics for each belonging Adapter (and IP).

There SEEMS TO BE a promising way to control automatic metrics
assignment. There is a control panel dialog:

"Control Panel -> Network Connections"

If you click ALT key on your keyboard here, and then selects menu
"Advacned -> Advanced Settings..." a dialog is opened where you can
change the order of Connections in the "Adapter and Bindings" tab.

No one knows the purpose of changing the order here, but I expected to
influence the automatic metrics assignment which would make sense. But
changing this order will NOT change any metrics. Is this a bug in
Windows Vista or does this order have another purpose?

Is there a way to change this automatic metrics assignment in some way?
Are there some information (released by Microsoft) that shows the
algorithm for automatic metrics assignment?

I need this information because I'm currently developing a small Windows
tool to simplify the "Default Gateway" selection. My current tool still
lacks of some features and don't work as expected.

With Kind Regards,
Benjamin Kalytta
 
Some more information about the API:

I found out, that there is a IP Helper API to "obtains an adapter order
map that indicates priority for interfaces on the local computer."

It is "GetAdapterOrderMap". But what I'm miss is a corresponding
"SetAdapterOrderMap".

Maybe there is also a way to use INetCfg Interface in some way?
 
Does any one have an idea how to change the order of this Adapters and
Bindings connections programatically?

Benjamin Kalytta
 
Back
Top