Check if IP address responds to ping before assigning an address