# URNs in the DNS

Martin Hamilton (M.T.Hamilton@lut.ac.uk)
Tue, 13 Jul 1993 17:35:46 +0100 (BST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Larry Masinter: "Re: URLs for non-Internet networks?"
- Previous message: Rob Raisch: "Re: Registrar"
- Next in thread: Peter Deutsch: "Re: URNs in the DNS"
- Maybe reply: Peter Deutsch: "Re: URNs in the DNS"
- Maybe reply: Mitra: "Re: URNs in the DNS"
- Maybe reply: Mitra: "Re: URNs in the DNS"
- Maybe reply: Steve Putz: "Re: URNs in the DNS"
- Reply: Keith Moore: "Re: URNs in the DNS"

    Date: Tue, 13 Jul 1993 17:35:46 +0100 (BST)

    From: Martin Hamilton <M.T.Hamilton@lut.ac.uk>

    Subject: URNs in the DNS

    To: uri@bunyip.com, iiir@merit.edu

    Message-Id: <Pine.3.07.9307131746.D913-d100000@lust>

..so where's Eric? :-)

This is about as far from an ideal solution to the URN directory
problem as you could get, but I think it's a good pragmatic response
in the Internet tradition. Comments and/or flames welcome!

Cheers,

Martin

    --

    URNs in the DNS

    1 The Whyfores

    This document describes an interim approach to the provision of the
    URN to URL directory service described in [9], and goes on to show
    how this may be used to provide a partial solution to the problem
    of file caching in a global Internet.

    It is the author's contention that the Internet Domain Name System
    (DNS) may be used as is in the role of URN directory, by making use
    of the TXT Resource Record (RR) encoding of arbitrary attributes
    described in [6]. Should this experiment prove successful, it is
    envisaged that a formal RR for the URN to URL mapping might be
    defined.

    Sample source code is presented as appendices for a) a simple URN
    lookup program and b) a program to generate the appropriate TXT
    records automatically from the results of an archie [3] search.

    2 Jargon

    URNs - from [8]

      A Uniform Resource Name (URN) is an identifier which can be used to
      uniquely identify a resource and is designed to provide persistent
      naming for networked objects. This name would stay the same no matter
      what the current location(s) of the object was.

    URLs - from [2]

      Current names are basically location specifiers (addresses). These
      may be known as Uniform Resource Locators (URLs). They give the
      necessary parts of an address for a reader to access an information
      provider using the given protocol, and ask for the object required.

    DNS - from [5]

      The domain name system is a mixture of functions and data types
      which are an official protocol and functions and data types which
      are still experimental.  Since the domain system is intentionally
      extensible, new data types and experimental behaviour should always
      be expected in parts of the system beyond the official protocol.

    3 domain authority in URNs

    [8] describes an encoding for URNs which looks like this:

            URN:Naming_Authority_identifier::opaque_string:::
             ^  |                          ^             | ^
             |_________________ wrapper ___|_______________|

    This paper proposes that the authority registration domain be used as
    shorthand to imply that the object referred to exists as an entry in the DNS,
    and may have associated TXT resource records containing the URLs of network
    accessible copies of it, encoded in the form described in [6].

    4 Example

    So, if <URN:domain::finger.foobar.lut.ac.uk:::> were to be used as a
    identifier for the latest version of the GNU Finger program, the placement of
    the following entries in the DNS for the domain  finger.foobar.lut.ac.uk

      finger  TXT  "URL=ftp://sunsite.unc.edu/pub/gnu/.cap/finger-1.37.tar.gz"
      finger  TXT  "URL=ftp://theta.iis.u-tokyo.ac.jp/pub1/GNU/finger-1.37.tar.gz"
      finger  TXT  "URL=ftp://utsun.s.u-tokyo.ac.jp/ftpsync/prep/finger-1.37.tar.gz"

    would cause a URN lookup to result in:

      URL=ftp://sunsite.unc.edu/pub/gnu/.cap/finger-1.37.tar.gz
      URL=ftp://theta.iis.u-tokyo.ac.jp/pub1/GNU/finger-1.37.tar.gz
      URL=ftp://utsun.s.u-tokyo.ac.jp/ftpsync/prep/finger-1.37.tar.gz

    The DNS client is then free to sort these results according to some
    predetermined algorithm, e.g. by geographical weighting.

    5 Conclusions

    There is a pressing need amongst the Internet community for a widely
    available, prefably decentralised, means of managing URNs and associating
    them with URLs. This is necessary to avoid the problems associated with
    temporary names (URLs), which are stored in directory services such as archie
    and would be helpful in providing support for rudimentary file caching on the
    Internet, as it provides a mechanism which is suited to the automatic
    selection of geographically ``close'' copies of a widely distributed
    resource.

    Note that no attempt is made to define any metadata attributes for these
    objects beyond those which may be derived or implied from the URN and URLs.

    Likewise, no organisational scheme is described, though some variant of the
    aliasing scheme for multinational organisations in the OSI Directory outlined
    in [1] may be appropriate.

    Paradoxically, URN repositories may be bootstrapped from automatic searches
    of existing directories, e.g. archie - the information provider need only do
    this periodically, making the results available to everyone.

    Finally, it remains to be seen whether the DNS infrastructure is capable of
    coping with these new demands. In particular, at least one major vendor's
    distribution of the nameserver software does not support the TXT RRs, and it
    remains to be seen what limitations are commonly placed on their sizes.
    Likewise there is the problem of Internet address exhaustion, though this may
    already have been solved by the NAT effort [4] and related activities.

    References

    [1] Paul Barker and Steve Hardcastle-Kille.  Naming Guidelines for
      Directory Pilots.  Internet RFC 1384, University College London
      and ISODE Consortium, January 1993

    [2] Tim Berners-Lee.  Uniform Resource Locators.  *** Internet Draft ***,
      World-Wide Web Project, CERN, March 1993.

    [3] Alan Emtage and Peter Deutsch.  archie - An Electronic Directory
      Service for the Internet.  In Winter Usenix Conference 1992, pages
      93--110. Usenix Association, Berkeley CA, 1992.

    [4] Van Jacobson.  LNAT - Large scale IP via Network Address Translation.
      *** Draft ***, Lawrence Berkeley Laboratory, January 1992.

    [5] Paul Mockapetris.  Domain names - concepts and facilities.  Internet
      RFC 1034, Information Sciences Institute, November 1987.

    [6] Rich Rosenbaum.  Using the Domain Name System to Store Arbitrary
      String Attributes.  *** Internet Draft ***, Digital Equipment
      Corporation, April 1993.

    [7] Larry Wall and Randal L. Schwartz.  Programming Perl.  O'Reilly &
      Associates, Inc., 1990.

    [8] Chris Weider and Peter Deutsch.  Uniform Resource Names.  ***
      Internet Draft ***, Merit Network, Inc. and Bunyip Information Systems,
       Inc., May 1993.

    [9] Chris Weider and Peter Deutsch.  A Vision of an Integrated Internet
      Information Service.  *** Internet Draft ***, Merit Network, Inc. and
      Bunyip Information Systems, Inc., March 1993.

    Appendices

    A Generation of TXT RRs from archie searches

    This Perl [7] script constructs TXT RRs in a particular domain derived
    from the results of an archie search for the specified object, and sorted to
    contain the ten most recent matches. It makes use of the eponymous command
    line client - archie.

    If it were saved as urnpoke, producing the data used in the above example
    would be a matter of typing something like:

      urnpoke finger.foobar.lut.ac.uk finger-1.37.tar.gz

    The actual script is as follows:

      #!/usr/local/bin/perl
      $archie="/usr/local/bin/archie";
      $host="archie.sura.net";
      $target=$ARGV[1];
      $domain=$ARGV[0];

      chop(@archie=`$archie -ltm10 -h $host $target`);
      foreach(@archie){
        ($date,$size,$host,$dir) = split;
        print "$domain\t\tTXT\tftp://$host$dir\n";
      }

    B URN to URL lookup

    This Perl script exploits the popular Domain Internet Groper tool - dig - to
    carry out the actual DNS lookup, and then filters out the TXT records which
    do not point to URLs.

    If it were saved as urnpeek, producing the results used in the above example
    would be a matter of typing something like:

      urnpeek finger.foobar.lut.ac.uk

    The actual script is as follows:

      #!/usr/local/bin/perl
      $dig="/usr/local/bin/dig";
      $domain=$ARGV[0];

      chop(@pit=`$dig txt $domain`);
      foreach(@pit){
        next unless /$domain\.\s+\d+\s+TXT\s+(.*)/;
        print "$1\n" if $1 =~ /^URL=/;
      }

- Next message: Larry Masinter: "Re: URLs for non-Internet networks?"
- Previous message: Rob Raisch: "Re: Registrar"
- Next in thread: Peter Deutsch: "Re: URNs in the DNS"
- Maybe reply: Peter Deutsch: "Re: URNs in the DNS"
- Maybe reply: Mitra: "Re: URNs in the DNS"
- Maybe reply: Mitra: "Re: URNs in the DNS"
- Maybe reply: Steve Putz: "Re: URNs in the DNS"
- Reply: Keith Moore: "Re: URNs in the DNS"