title: Why does getaddrinfo not return all IP Addresses?
body: <p>I am trying to get all IP Addresses for: earth.all.vpn.airdns.org
  In Python: </p>
  
  <pre><code>def hostnamesToIps(hostnames):
    ip_list = []
  
    for hostname in hostnames:
        try:
            ais = socket.getaddrinfo(hostname, None)
            for result in ais:
                #print (result[4][0])
                ip_list.append(result[-1][0])
        except:
            eprint("Unable to get IP for hostname: " + hostname)
  
  return list(set(ip_list))
  </code></pre>
  
  <p>(fyi eprint is a function for printing error). 
  The Output gives me 29 Addresses.</p>
  
  <p>But when i do:</p>
  
  <pre><code>nslookup earth.all.vpn.airdns.org
  </code></pre>
  
  <p>I get about 100 entrys.</p>
  
  <p>How to achieve this in python? Why i am not getting all entrys with "getaddrinfo"?</p>
  
  <p>This behaviour only appears using windows (python 3). When i am executing the code on my Linux (python 2.7) it gives me the same result as using nslookup.</p>
  
  <p><strong>info:</strong> As in the answer explained it does not depend on the system.</p>
  
  <hr>
  
  <p>Without changing anything the results of nslookup and getaddrinfo are the same now.</p>