Increase the possibility of obtaining an IP address

The netweork names used, "public" and "private", may not exist.
In that case we grab the first available IP address.
Note the the original code is not very specific of what kind
of an IP it wants, that is IPv4 or IPv6. We keep the original
spirit here but surely this must be addressed.