add ping logic after assigning IP addresses