Ensure consistent order of IP addresses