sort the list of IPs