prefer IPv6, but fall back to IPv4 if it is unavailable