What is the difference between "No address associated with name" and "Unknown host"

Nagy László Zsolt nagylzs at freemail.hu
Mon Dec 4 12:11:39 PST 2006


a at zeos.net wrote:
> What is the difference between "No address associated with name" 
> and "Unknown host":
>
> $ ping accounts.eirtrade.ie
> ping: cannot resolve accounts.eirtrade.ie: No address associated with name
>
> and
>
> $ ping accounts.eirtrade.i
> ping: cannot resolve accounts.eirtrade.i: Unknown host
>   
If the host is unknown, then it means that the primary domain name 
server is not registered for the given domain. Because the domain name 
server cannot be found, it is not possible to tell the IP address of the 
given hostname.

You get the second message when there is a primary domain name server 
for the given domain, but it does not return any IP address for your 
(named) address. It means that there is no A record for the given hostname.

For me, I get these results:

#ping acconts.eirtrade.ie
ping: cannot resolve acconts.eirtrade.ie: Unknown host
#ping eirtrade.ie
ping: cannot resolve eirtrade.ie: No address associated with name

If you have the "dig" command available on your machine, you can read 
its documentation, and play with it. It will make things clear. Look 
below: in the first case, there is no A record, but there is a SOA 
record. However, the hostname of the SOA is different from the queried 
hostname. In the second case, there is no A record, there is a SOA and 
the hostname of the SOA and the queried hostname are the same. So in the 
first case, we cannot know if the host is registered at all. In the 
second case, the hostname is registered for sure, but it has no A 
record. (However, subdomains like www.eirtrade.ie can have A records...)

#dig accounts.eirtrade.ie

; <<>> DiG 9.3.2 <<>> accounts.eirtrade.ie
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50610
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;accounts.eirtrade.ie.          IN      A

;; AUTHORITY SECTION:
eirtrade.ie.            10515   IN      SOA     auth01.ns.eircom.net. 
hostmaster.eircom.net. 2001031301 28800 7200 604800 86400

;; Query time: 1 msec
;; SERVER: 195.228.240.249#53(195.228.240.249)
;; WHEN: Mon Dec  4 15:02:25 2006
;; MSG SIZE  rcvd: 105

#dig eirtrade.ie

; <<>> DiG 9.3.2 <<>> eirtrade.ie
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 932
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;eirtrade.ie.                   IN      A

;; AUTHORITY SECTION:
eirtrade.ie.            10800   IN      SOA     auth01.ns.eircom.net. 
hostmaster.eircom.net. 2001031301 28800 7200 604800 86400

;; Query time: 37 msec
;; SERVER: 195.228.240.249#53(195.228.240.249)
;; WHEN: Mon Dec  4 15:03:17 2006
;; MSG SIZE  rcvd: 96

Best,

   Laszlo

p.s.: I think I'm right, but please do not trust me blindly. :-)


More information about the freebsd-questions mailing list