nanog mailing list archives

RE: Detecting a non-existent domain


From: "David Schwartz" <davids () webmaster com>
Date: Tue, 23 Sep 2003 15:15:06 -0700



Getting practical for a minute.  What is the optimal way now to see
if a given host truly exists?

        You first have to define what you mean by 'exists'. I have a machine here
that I call 'stinky'. It's not on the Interent though. Does the 'host'
'stinky' exist?

Assume that I can't control the DNS
server--I need to have this code run in any (*ix) environment.
Assume also that I don't want to run around specialcasing specific IP
addresses or TLDs--this needs to work reliably no matter what the
domain.  User gives me a string, and I need to see if the given host
is a real machine.

        How would you do this before? Does an A record for a hostname mean that a
host with that name exists? If so, then all *.com 'hosts' now 'exist'. If
not, what did you mean by exist before?

An answer from Verisign would be most appropriate here, since they
have done "extensive research" on the impact of their new service, so
presumably they figured out the answer to this problem and have code
samples available for distribution.  However I get the feeling from
their press releases that they've forgotten there is more to the
internet than just the web.

        Forgive me for defending Verisign, but if you want to know if a given DNS
name corresponds with an A record, you can still determine that. If you want
to determine something else, you can still do that, depending upon what that
something else is.

        As for 'fsck.de', a good argument can be made that this is not really a
legal domain. It's a host. Checking for an SOA is a good way to tell if a
domain is valid, depending upon what you mean by 'domain' and 'valid'.

        I'm reminded of the classic programmers question, "how do you tell if a
machine is online?". The answer is "define what you mean by a machine being
online and test for that".

        So you aren't asking a comprehensible question yet.

        DS



Current thread: