Does bind 9 support regular expression in RR ?

Kevin Darcy kcd at daimlerchrysler.com
Fri Jun 15 21:02:50 UTC 2001


Kelvin Ng Chee Hoong wrote:

> Hi ;
>      I am a new  bind's mailing list subscriber . I would like to know
> is there anybody has configured regular expression for  host record
> (IN     A ) in DNS ?
>      In RFC 2915 , I understand that NAPTR does support regular
> expression . Does bind 9 support NAPTR resource record ? please advise

Sure, you can express a regular expression in the name of an A record, as
long as all of the characters are legal for an A record name (dot is
legal, but parentheses, square brackets, carets, dollar signs are not
legal, nor is asterisk legal unless it stands by itself). These
character-set limitations will undoubtedly cripple your ability to
express RE's in A record names. Also, the fact that the name of an
A record happens to be an RE doesn't necessarily have any effect on the
DNS name-matching algorithm, so if I look up, say "abc.example.com", it
won't be matched by an A record with the name "a.c.example.com", even
though "a.c" matches "abc" in most RE syntaxes.

Wildcards are a very crude form of RE which match any label in a
particular zone. So, for example, a "*.example.com" wildcard A record
entry would probably (depending on what else happened to be defined in
the example.com zone) match "abc.example.com". But, while wildcard
entries are simple from an RE-matching standpoint, they can have subtle
and unexpected results, especially when combined with the presence of
subdomains and/or subzones. They should be avoided unless you know
exactly how to use them correctly.


- Kevin




More information about the bind-users mailing list