foreach (System.Net.NetworkInformation.NetworkInterface f in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) { if (f.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up) { var i = f.GetIPProperties().DhcpServerAddresses.Count; } }