title: host doing unnecessary dns lookup for localhost
body: <p>I have a centOS system(embedded and has very binaries) with the following /etc/hosts.</p>
  
  <pre><code>$cat /etc/hosts
  127.0.0.1 localhost localhost
  </code></pre>
  
  <p>Also the host is assigned a DNS server which returns some invalid IP for the domain name lookup of <em>localhost</em>. But I cannot avoid a connection to this DNS due to some network restrictions.</p>
  
  <p>My question is, when I already have a valid /etc/hosts file why is the system querying the DNS for <em>localhost</em>? And how can I stop that?</p>
  
  <p>Any help would be greatly appreciated.</p>