Wildcard matching logic for NAPTR Records (bind9)
Jeffrey
jeffrey_ch_chang at yahoo.com
Wed Mar 17 20:15:39 UTC 2004
I have the following 3, and only these 3, NAPTR records in my named
server (bind v9.2.3):
(output of "dig -t AXFR e164.localdomain @localhost")
*.e164.localdomain. 3600 IN NAPTR 100 100 "u" "SIP+E2U"
"!^(.*)sip:\\1 at any.com!" .
*.6.6.e164.localdomain. 3600 IN NAPTR 100 100 "u" "SIP+E2U"
"!^(.*)sip:\\1 at six.com!" .
*.7.6.e164.localdomain. 3600 IN NAPTR 100 100 "u" "SIP+E2U"
"!^(.*)sip:\\1 at seven.com!" .
If I do a query of "dig -t NAPTR 8.e164.localdomain", the named server
gives me the expected answer, with dig output of:
;; ANSWER SECTION:
8.e164.localdomain. 3600 IN NAPTR 100 100 "u" "SIP+E2U"
"!^(.*)sip:\\1 at any.com!" .
If I do a query of "dig -t NAPTR 8.6.6.e164.localdomain", it also
generates the expected answer of:
;; ANSWER SECTION:
8.6.6.e164.localdomain. 3600 IN NAPTR 100 100 "u" "SIP+E2U"
"!^(.*)sip:\\1 at six.com!" .
But, if I do a query of either
(A): dig -t NAPTR 8.6.e164.localdomain
,or
(B): dig -t NAPTR 6.6.e164.localdomain
The named server gives me no ANSWER section in dig output. Is this
the expected behavior of DNS/NAPTR key matching logic? I would expect
query (A) to return me the NAPTR record corresponding to key
"*.e164.localdomain.", and query (B) to return the NAPTR record that
matches key "*.6.6.e164.localdomain.".
Can anyone point me to the detailed logic explaining the key lookup
logic of DNS/named when there's a wildcard (*) in the key? I couldn't
find it in RFCs.
Thanks,
--- Jeffrey
More information about the bind-users
mailing list