I am still learning linux, and so far having great trouble in the networking and DNS areas - I think due to misunderstandings.

My understanding is if we provide nameservers in /etc/resolv.conf these will be used when trying to resolv domains.

Therefore if I specify a dead nameserver such as

nameserver 452.102.210.88

when running the following code, shouldn't we get a result like timed out, or couldn't find etc...

host google.com

Instead we get

google.com has address
google.com has address

I expected that as we have a broken DNS "phonebook", when host cmd tries to get info on google.com it shouldn't be able to get any IP. Apparently not.

nslookup google.com


Non-authoritative answer:
Name:   google.com
Name:   google.com

dig google.com

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43950
;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 4, ADDITIONAL: 4

;google.com.                    IN      A

google.com.             188     IN      A
google.com.             188     IN      A

google.com.             170629  IN      NS      ns1.google.com.
google.com.             170629  IN      NS      ns2.google.com.

ns1.google.com.         170629  IN      A
ns2.google.com.         170629  IN      A


/etc/hosts       localhost
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters       raspberrypi


dns-nameservers 452.102.210.88 (dead dns)
dns-search home.lan
dns-domain home.lan
  • Can you share the output of nslookup google.com and dig google.com ns ?
    – Sreeraj
    Commented Dec 23, 2014 at 2:03
  • @Sree updated, seems to show some localhost activity...
    – UnixUnix
    Commented Dec 23, 2014 at 2:11
  • This looks like google.com is getting resolved from some cache on your server. Is there a nameserver entry in your resolv.conf ? Could you restart /etc/init.d/nscd and check whether google.com is still resolving? I assume there are no entries in the /etc/hosts file.
    – Sreeraj
    Commented Dec 23, 2014 at 2:16
  • @Sree /etc/resolv.conf has only one entry(the non-repsonsive dead NS), I couldnt seem to run /etc/init.d/nscd so I rebooted the whole machine, Is this sufficent? I have appendded /etc/hosts contents to my original post, along with /etc/network/interfaces - where I placed the non-responsive dead nameserver too.
    – UnixUnix
    Commented Dec 23, 2014 at 2:21
  • Do you use Network Manager? Can you paste contents of /etc/NetworkManager/NetworkManager.conf?
    – kirill-a
    Commented Dec 23, 2014 at 10:54

1 Answer 1


You have failed to change the nameserver in resolve.conf to a "dead" namesever. Instead you put in an invalid IP address which cannot be properly parsed. Your old nameserver is probably and is still being used. Try some ip address like and you should get the result you are looking for.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .