How to validate SRV record?
n at shaplov.ru
Thu Aug 23 15:52:28 UTC 2012
I am trying to write a validator for name field of SRV record, and I met
several issues I can not understand. May be you can help me with that.
0. Bind does not really validate name of SRV record:
is considered to be correct record. (BIND 9.7.3) So I can not use bind to get
what is right and what is wrong.
1. RFC 2782 says that name field should have this format:
1.1. Name as far as I get, should be validated as a common hostname. Am I
1.2. Service should be validated according to RFC 6335
1.3. What algorithm should be used to validate Proto? I can use the same as
for Service, but are there any strict guide lines about that?
2. RFC 2782 has the following example:
@ SOA server.example.com. root.example.com. (
1995032001 3600 3600 604800 86400 )
; foobar - use old-slow-box or new-fast-box if either is
; available, make three quarters of the logins go to
_foobar._tcp SRV 0 1 9 old-slow-box.example.com.
SRV 0 3 9 new-fast-box.example.com.
; if neither old-slow-box or new-fast-box is up, switch to
; using the sysdmin's box and the server
SRV 1 0 9 sysadmins-box.example.com.
SRV 1 0 9 server.example.com.
server A 172.30.79.10
old-slow-box A 172.30.79.11
sysadmins-box A 172.30.79.12
new-fast-box A 172.30.79.13
; NO other services are supported
*._tcp SRV 0 0 0 .
*._udp SRV 0 0 0 .
From it I can get, that _Service can be replaced by '*' and both _Service and
_Proto can be ommited.
2.1. Where in 2782 or in other RFCs it is said that _Service can be replaced
with asterisk? Can _Proto be replaced whith asterisk too?
2.2. Where in 2782 or in other RFCs it is said that _Service._Proto can be
omitted as shown in example? how all this would work it this case?
More information about the bind-users