What is the easiest way to find the next unused IP address on a local adaptors subnet?
IPAddress GetNextFreeIP(NetworkInterface intface)
{
...?
}
Update
I've written a BOOTP/TFTP server that could be used in many different scenarios (cross-over cable, small private network, large corporate network). I have to give the small embedded system I'm updating an IP address and would like to find a spare one for it to use...
If you have DHCP-managed IP ranges, you have an instance you can talk to - the DHCP server (like David recommended)
If you don't have managed IP ranges and no other instance you can talk to, there is no reliable way to tell if an IP is used or unused. IP does not offer such a service itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With