How to determine the best network adapter to select in a multihomed network environment. Clarificati

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
The Iphlpapi.dll GetBestInterface function is described as "The GetBestInterface function retrieves the index of the interface that has the best route to the specified IPv4 address".
I have two physical network cards, one on network 135.x.x.x and the other on network 192.x.x.x. I can ping hosts on both networks. When calling GetBestInterface() with a reachable 135.x.x.x host the 135.x.x.x NIC is identified as the best interface
expected. However, when calling GetBestInterface() with the reachable 192.x.x.x host, the 135.x.x.x NIC is identified. From the description of the GetBestInterface() function I was expecting the 192.x.x.x NIC to be identified as the best interface since the
192.x.x.x hosts are only reachable via this NIC.
Can you clarify the behaviour of the GetBestInterface function?
thank you,
Paul

View the full article
 
Back
Top