Doing ping in a loop of IPs