Subject: Interpretation of RFC 2136

From: "Tom Schmitt" <[email-masked]>
Date: Wed, 8 Sep 2004 10:30:24 +0200 (MEST)

Hi,

in RFC 2136 (Dynamic Updates in the Domain Name System) there are a section
explaining the behavior how a server react to the updates where is a section
which refers to Prerequisites:

> 
>       (2)  RRset exists (value dependent).  A set of RRs with a
>            specified NAME and TYPE exists and has the same members
>            with the same RDATAs as the RRset specified here in this
>            Section.
> 

My understanding of this is, that when I sent

     prereq yxrrset foo.baa.com A 10.0.0.2

I'll get NOERROR if there is a record "foo.baa.com A 10.0.0.2" and I will
get NXRRSET if there is no such a record.
Now I discovered, there are circumstances in which the Bind does not react
in this way. If there is such a record but also another record with the same
name and type, but another IP-Adress, then the Bind answer NXRRSET even
though such a record exist.

I send a question regarding this to the bind-mailinglist, but the answer
was, that it is no bug, but a question of interpreting RFC 2136:

> 
>       (2)  RRset exists (value dependent).  A set of RRs with a
>            specified NAME and TYPE exists and has the same members
>            with the same RDATAs as the RRset specified here in this
>            Section.
> 
> 	The prerequisite section talks about RR sets.  This is a
> 	exact match.  Unfortunately there is no way to specify a
> 	partial match.  For a partial match it would have words to
> 	like.
> 	
>       (2)  RRset exists (value dependent).  A set of RRs with a
>            specified NAME and TYPE exists and has the same members
>            with the same RDATAs as the RRset specified here in this
> 	   Section plus possibly other RRs with the same NAME and TYPE.
> 
> 	If you feel our interpretation is wrong this should be discussed
> 	on namedroppers.
> 
> Mark Andrews, ISC

So what is the right interprtation? And if the version of Mark Andrews is
right, is there a way to determinate if a record exist which will word in
all circumstances?

Thanks,
Tom.

-- 
NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/namedroppers/>

---

From: Kevin Darcy <[email-masked]>
Date: Wed, 08 Sep 2004 17:46:20 -0400

Tom Schmitt wrote:

>So what is the right interprtation? 
>
"Has the same members" seems rather unambiguous to me. The RRset has to 
match in its entirety.

>And if the version of Mark Andrews is
Well, sure there's a way to determine whether a record exists. Look it 
up by name and type. Now, if you want something more *atomic* than that, 
which you can in a Dynamic Update prerequisite, then you might have to 
resort to some sort of local convention for round-robin names, where you 
create a separate "adjunct" record, with a unique name, for each record 
in the round-robin. For instance, if you have a name foo.example.com 
owning A records 10.0.0.1 and 10.0.0.2, you might have adjunct TXT 
records of the form 10_0_0_1.a-record.foo.example.com and 
10_0_0_2.a-record.foo.example.com. Then you could set a prerequisite of 
"prereq 10_0_0_1.a-record.foo.example.com txt" any time you want to 
ensure that the 10.0.0.1 A record existed with the name foo.example.com, 
*without* needing to even know about the existence of the other A record.

Seems like a lot of work, and superfluous DNS records, for very little 
benefit, though...

- Kevin

---

From: Robert Elz <[email-masked]>
Date: Thu, 09 Sep 2004 08:10:20 +0700

Date:        Wed, 8 Sep 2004 10:30:24 +0200 (MEST)
    From:        "Tom Schmitt" <[email-masked]>
    Message-ID:  <[email-masked]>

  | So what is the right interprtation? And if the version of Mark Andrews is
  | right, is there a way to determinate if a record exist which will word in
  | all circumstances?

Mark is correct in his interpretation, there's no question about that.

As to "how to ...?" - you need to understand the use of prerequisites.

They're not intended as a way to have the server decide for you whether or
not the update should be made, all they are intended for is to control
race conditions.

That is, the intended use is that you query the DNS, to the extent your
application needs, in order to discover whether or not your update should
be done.   Then you use the prerequisites to make sure the data in the
DNS hasn't been updated between when you queried to discover what is there,
and when your update is processed.    If the condition fails, you start
again at the beginning, discover whether or not the update should be made
in the current conditions (using whatever queries get you the data for that)
and then construct a prerequisite to check that conditions haven't changed.

To do more that that would require a much more complex way of stating the
conditions, and a much richer condition set.  But what is there is just
fine for the way it is intended to be used.

To do your "update if an A record exists" text, do an A query, save the
RRset that is the answer, check if the record you hope for is present.
If not, you simply stop (that's your intent, right?)   If the A record is
there, you send back the RRset that was fetched by the A query, and insist
that it be unaltered for the update to be performed.

If the update is performed, you know the A record of interest must still
have been present, as it was part of the RRset you sent back.

If the update wasn't performed, you know almost nothing, except that something
has changed - so you query for the A records again, and see if the address
which matters to you is still there - if it is, you repeat your update
with the new RRset as the "must be there" prerequisite.   And continue
till it works, or until sometime the A record isn't there (which would mean
you lost an update race).

kre