Information about Naptr Record

NAPTR stands for Naming Authority Pointer and is a newer type of DNS record that supports regular expression based rewriting. Several NAPTR records can be chained together creating fairly sophisticated URI rewriting rules. A record can go through any number of rewrites before reaching a terminal condition.

For example, after translating the phone number +1-770-555-1212 into the URI 2.1.2.1.5.5.5.0.7.7.1.e164.arpa as described by E.164, DDDS is used to transform it using rewrite rules gathered from NAPTR records. The BIND configuration for the records returned from a query for 2.1.2.1.5.5.5.0.7.7.1.e164.arpa might look like:

$ORIGIN 2.1.2.1.5.5.5.0.7.7.1.e164.arpa. IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:information@pbx.example.com!i" . IN NAPTR 102 10 "u" "E2U+email" "!^.*$!mailto:information@example.com!i" .

Of these two records, the first has an order value of 100 which is lower than 102 so it is picked first. The preference of 10 is unimportant as no other rules have an order of 100. The "u" flag signifies a terminal rule in ENUM and URI applications, so the output of this rewrite will be the answer we are looking for. See RFC 2915 for a list of allowed flags.

If we support the service designated with the key "E2U+sip", we won't go on to investigate other rules with higher order values. The rewrite regular expression "!^.*$!sip:information@pbx.example.com!i" is evaluated transforming our original request of 2.1.2.1.5.5.5.0.7.7.1.e164.arpa into sip:information@pbx.example.com. In the regular expression, the exclamation mark '!' will be our delimiter (we avoid the use of '/' and '\' because they may be interpreted as escape sequences somewhere else). The "^.*$" in the RE (Regular Expression) says "starting at the beginning, including any characters and ending at the end" (in other words, everything) is changed to "sip:information@pbx.example.com" and 'i' ignores case. (Observant readers will notice that the 'i' doesn't matter, given the use of ".*") For those familiar with Perl REs, the equivalent RE could be written as "s/^.*$/sip:information@pbx.example.com/i". So the resulting URI "sip:information@pbx.example.com" will be used. If we didn't support SIP, we would effectively fall back to the rule resulting in "mailto:information@example.com".

References

See also

  • EDNS is generally also used in NAPTR implementations, to support the longer DNS packets that may be required by the use of multiple NAPTR records

External links

On the Internet, the Domain Name System (DNS) associates various sorts of information with so-called domain names; most importantly, it serves as the "phone book" for the Internet by translating human-readable computer hostnames, e.g. en.wikipedia.
..... Click the link for more information.
In computing, a regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules.

Regular expressions are used by many text editors, utilities, and programming languages to search and manipulate text based on patterns.
..... Click the link for more information.
Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. The main purpose of this identification is to enable interaction with representations of the resource over a network, typically the World Wide Web, using specific
..... Click the link for more information.
Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. The main purpose of this identification is to enable interaction with representations of the resource over a network, typically the World Wide Web, using specific
..... Click the link for more information.
E.164 is an ITU-T recommendation which defines the international public telecommunication numbering plan used in the PSTN and some other data networks. It also defines the format of telephone numbers. E.
..... Click the link for more information.
Things known as BIND or Bind include:
  • BIND - the Berkeley Internet Name Domain, a DNS server
  • Bind (wicca) - The Wiccan practice of stopping one's ability to do something through magical means.

..... Click the link for more information.
Telephone Number Mapping (ENUM or Enum, from TElephone NUmber Mapping) is a suite of protocols to unify the telephone numbering system E.164 with the Internet addressing system DNS by using an indirect lookup method, to obtain NAPTR records.
..... Click the link for more information.
EDNS is an extension of the DNS protocol which allows more flags, label types and return codes to be defined, and enhances the transport of DNS data in UDP packets. The version of EDNS specified by RFC 2671 is known as EDNS0.
..... Click the link for more information.
Things known as BIND or Bind include:
  • BIND - the Berkeley Internet Name Domain, a DNS server
  • Bind (wicca) - The Wiccan practice of stopping one's ability to do something through magical means.

..... Click the link for more information.
djbdns program is a simple and security-aware DNS implementation created by Daniel J. Bernstein due to his frustrations with repeated BIND security holes. There is an as-yet-unclaimed $500 prize[1]
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter