Consider a URN that uses the hypothetical DUNS namespace. DUNS
numbers are identifiers for approximately 30 million registered
businesses around the world, assigned and maintained by Dunn and
Bradstreet. The URN might look like:
urn:duns:002372413:annual-report-1997
The first step in the resolution process is to find out about the
DUNS namespace. The namespace identifier, "duns", is extracted from
the URN, prepended to urn.net, and the NAPTRs for duns.urn.net looked
up. It might return records of the form:
duns.urn.net
;; order pref flags service regexp replacement
IN NAPTR 100 10 "s" "dunslink+N2L+N2C" "" dunslink.udp.isi.dandb.com
IN NAPTR 100 20 "s" "rcds+N2C" "" rcds.udp.isi.dandb.com
IN NAPTR 100 30 "s" "http+N2L+N2C+N2R" "" http.tcp.isi.dandb.com
The order field contains equal values, indicating that no name
delegation order has to be followed. The preference field indicates
that the provider would like clients to use the special dunslink
protocol, followed by the RCDS protocol, and that HTTP is offered as
a last resort. All the records specify the "s" flag, which will be
explained momentarily. The service fields say that if we speak
dunslink, we will be able to issue either the N2L or N2C requests to
obtain a URL or a URC (description) of the resource. The Resource
Cataloging and Distribution Service (RCDS)[7] could be used to get a
URC for the resource, while HTTP could be used to get a URL, URC, or
the resource itself. All the records supply the next domain name to
query, none of them need to be rewritten with the aid of regular
expressions.
RFC 2168 Resolution of URIs Using the DNS June 1997
The general case might require multiple NAPTR rewrites to locate a
resolver, but eventually we will come to the "terminal NAPTR". Once
we have the terminal NAPTR, our next probe into the DNS will be for a
SRV or A record instead of another NAPTR. Rather than probing for a
non-existent NAPTR record to terminate the loop, the flags field is
used to indicate a terminal lookup. If it has a value of "s", the
next lookup should be for SRV RRs, "a" denotes that A records should
sought. A "p" flag is also provided to indicate that the next action
is Protocol-specific, but that looking up another NAPTR will not be
part of it.
Since our example RR specified the "s" flag, it was terminal.
Assuming our client does not know the dunslink protocol, our next
action is to lookup SRV RRs for rcds.udp.isi.dandb.com, which will
tell us hosts that can provide the necessary resolution service. That
lookup might return:
;; Pref Weight Port Target
rcds.udp.isi.dandb.com IN SRV 0 0 1000 defduns.isi.dandb.com
IN SRV 0 0 1000 dbmirror.com.au
IN SRV 0 0 1000 ukmirror.com.uk
telling us three hosts that could actually do the resolution, and
giving us the port we should use to talk to their RCDS server. (The
reader is referred to the SRV proposal [4] for the interpretation of
the fields above).
There is opportunity for significant optimization here. We can return
the SRV records as additional information for terminal NAPTRs (and
the A records as additional information for those SRVs). While this
recursive provision of additional information is not explicitly
blessed in the DNS specifications, it is not forbidden, and BIND does
take advantage of it [8]. This is a significant optimization. In
conjunction with a long TTL for *.urn.net records, the average number
of probes to DNS for resolving DUNS URNs would approach one.
Therefore, DNS server implementors SHOULD provide additional
information with NAPTR responses. The additional information will be
either SRV or A records. If SRV records are available, their A
records should be provided as recursive additional information.
Note that the example NAPTR records above are intended to represent
the reply the client will see. They are not quite identical to what
the domain administrator would put into the zone files. For one
thing, the administrator should supply the trailing '.' character on
any FQDNs.
RFC 2168 Resolution of URIs Using the DNS June 1997
Example 2
---------
=4= |