rfc1034 3rd step question.

Barry Margolin barmar at alum.mit.edu
Mon May 17 22:31:43 UTC 2004


In article <c8bcrg$2kh1$1 at sf1.isc.org>,
 "William Stacey" <staceyw at mvps.org> wrote:

> Trying to figure out the 3rd step and running into some mental blocks.
> Assume the following:
> Non-RD Query: www.sub1.test.com. A
> 
> ;;test.com.db
> ; no record for www.sub1.test.com.
> sub1.test.com.  NS ns1.test.com.
> ....
> 
> 1) label www.sub1.test.com. does not exist.  look to see if "*" exists.
> 2) "*" does not exist.  QName equals orig qName so set nxdomain and exit.
> 
> Q1)  This does not seem right.  It seems like 2 about will reply with
> nxdomain instead of continuing marching down looking for next lable to find
> the NS record for sub1.test.com.  What am I missing here.

You seem to have missed step 3b:

         b. If a match would take us out of the authoritative data,
            we have a referral.  This happens when we encounter a
            node with NS RRs marking cuts along the bottom of a
            zone.

            Copy the NS RRs for the subzone into the authority
            section of the reply.  Put whatever addresses are
            available into the additional section, using glue RRs
            if the addresses are not available from authoritative
            data or the cache.  Go to step 4.

The sub1.test.com NS record means that anything.sub1.test.com is out of 
this authoritative zone

> 
> Q2)  Seems to gloss over what "exit" means here in two spots in 3c.
> "...error in the response and exit.  Otherwise just exit.".  What do these
> "exists" mean?  Exit just step 3 and goto 4?  Or exit whole process by
> returning current reply to client?  Or  other?

It means the entire algorithm is done.  The server sends the reply that 
it has built up.

> 
> Q3)  At start of 3a.  Assume we found a label match.  If Type matches
> "...copy all RRs which match QTYPE into the answer section and go to step
> 6.".  What happens if label matches, but Type does not match?  Is that
> nxdomain right there and return to client or continue matching down labels?

You copy all the RRs which match QTYPE into the Answer section.  If 
there are none, that means you copy zero RRs into the answer section.  
You don't return an error code -- if that were desired, the algorithm 
would say so.

Try it and see: dig google.com ptr

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


More information about the bind-users mailing list