go through network interfaces and find a suitable ip