Determining network connectivity