NetworkInterface issue when Hyper-v is enabled and a network bridge is active RRS feed

  • Question

  • Hi,

    This is w.r.t to the behavior of physical network adapters on Windows 8.1 (with Hyper-V enabled). When 2 LAN adapters are bridged the "NetworkInterface.GetAllNetworkInterfaces()" does not return the 2 LAN devices bridged as physical adapters and somehow it falls in the virtual adpater category. Is there any other reliable API that can be used to determine if there are actually 2 physical adapters bridged? How can we remove the 'Network Bridge' programmatically, if possible? Is there an equivalent API.


    Monday, May 19, 2014 9:03 AM


All replies

  • Did you use the cmd.exe command : Ipconfig/all

    The LAN devices may be configured in the Lan driver.  The LAN driver may be using a manufacture unique driver and you would need to refer to the manufuactures dll to make changes. 


    Monday, May 19, 2014 9:25 AM
  • It does show up when ipconfig /all is executed. But, I would want a way to enumerate actual devices programmatically. Something similar to NetworkInterface.GetAllNetworkInterfaces(). Even equivalent INetCfg call would do.
    Monday, May 19, 2014 12:44 PM
  • Have you checked on for any methods that may allow you to change the settings?


    Monday, May 19, 2014 1:26 PM
  • Even the native methods (iphlpapi) doesn't yield the network adapters (bridged). I am assuming the pinvoke that you made mention of is to interop with the native methods. No. That doesn't help.
    Tuesday, May 20, 2014 12:56 PM
  • The pivoke site has all the legacy windows dlls dcoumentation and code samples.  It sound like the feature is a custom method in the vendors Lan adapter and you need the vendor dll to make the changes


    Tuesday, May 20, 2014 1:40 PM