[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [sitefinder-tech-discuss Home]
Subject: Re: [sitefinder-tech-discuss] Pseudo code please
On Wednesday 22 October 2003 05:54 pm, Kee Hinckley wrote:
> I confess to not getting all the subtleties that
> are being tossed around here. I'm an application
> writer, not a DNS expert. In what way are these
> two questions different?
>
> 1. Given a host name in .com/.net, determine whether the host really
exists?
>
> 2. Given a hostname provided by a user (e.g.
> foo.example.com), how do I determine that the
> result I get back when I lookup the A record
> corresponds to something provided by example.com
> rather than something generated by Verisign?
#1 is a question about host existence, #2 is a question about determining
the origin of a result, whatever that result may be.
> The word "generally" is bothering me here.
There are situations where you will not get this information in the
authority section of the response. In particular, if you are getting an
answer from a cache (like your typical full resolver) and the zone's NS
set has expired, but the answer has not, you will typically just get the
answer. There may be other cases, but this is probably the most common.
However, this is somewhat unusual since zone NS sets usually have the same
or higher TTLs than other records in the zone.
> So are you saying that:
>
> perl -MNet::DNS -e '$r =
> Net::DNS::Resolver->new(); $q =
> $r->search("www.nyc.moma.museum"); foreach $a
> ($q->authority()) { print "$a->{name}\n" }'
>
> will return always return a value other than the
> particular domain if the name does not exist
> (e.g. "nyc.moma.museum" in the above case, but
> "museum" if I were to pass it "asdfasdf.museum")?
What I am saying is that the authority records (if you have them) will be
always from the zone that the answer came from. You can thus distinguish
between results from the TLD zone and a subzone, if that information is
useful to you.
> And is it the case that museum will never return
> in *any* of the authority records for the first
> case?
Correct.
--
David Blacka <davidb@verisignlabs.com>
Sr. Engineer Verisign Applied Research
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.elistx.com/unsubscribe>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [sitefinder-tech-discuss Home]
Powered by eList eXpress LLC