How to store SRV records in the database(mysql)? 

PRI、weight、port、target can be stored in  data field?
mysql> select zone,host,type,data from dns_records where zone='zzz.cn' and 
type='srv'; 
+--------+------------+------+-------------------------+
| zone   | host       | type | data                    |
+--------+------------+------+-------------------------+
| zzz.cn | _ldap._tcp | SRV  | 5 30 5060 ldap2.zzz.cn. |
| zzz.cn | _ldap._tcp | SRV  | 10 30 5060 ldap.zzz.cn. |
+--------+------------+------+-------------------------+
2 rows in set (0.00 sec)

C:\Users\Administrator>nslookup
默认服务器:  google-public-dns-a.google.com
Address:  8.8.8.8

> server 192.168.146.155
默认服务器:  [192.168.146.155]
Address:  192.168.146.155                       
> set type=srv
> _ldap._tcp.zzz.cn
服务器:  [192.168.146.155]
Address:  192.168.146.155

_ldap._tcp.zzz.cn       SRV service location:
          priority       = 5
          weight         = 30
          port           = 5060
          svr hostname   = ldap2.zzz.cn
zzz.cn  nameserver = ns2.mynameserver.com
zzz.cn  nameserver = ns1.mynameserver.com
> _ldap._tcp.zzz.cn
服务器:  [192.168.146.155]
Address:  192.168.146.155

_ldap._tcp.zzz.cn       SRV service location:
          priority       = 10
          weight         = 30
          port           = 5060
          svr hostname   = ldap.zzz.cn
_ldap._tcp.zzz.cn       SRV service location:
          priority       = 5
          weight         = 30
          port           = 5060
          svr hostname   = ldap2.zzz.cn
zzz.cn  nameserver = ns1.mynameserver.com
zzz.cn  nameserver = ns2.mynameserver.com

C:\Users\Administrator>dig @192.168.146.155 _ldap._tcp.zzz.cn srv

; <<>> DiG 9.3.2 <<>> @192.168.146.155 _ldap._tcp.zzz.cn srv
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1656
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;_ldap._tcp.zzz.cn.             IN      SRV

;; ANSWER SECTION:
_ldap._tcp.zzz.cn.      0       IN      SRV     10 30 5060 ldap.zzz.cn.
_ldap._tcp.zzz.cn.      0       IN      SRV     5 30 5060 ldap2.zzz.cn.

;; AUTHORITY SECTION:
zzz.cn.                 0       IN      NS      ns1.mynameserver.com.
zzz.cn.                 0       IN      NS      ns2.mynameserver.com.

;; Query time: 49 msec
;; SERVER: 192.168.146.155#53(192.168.146.155)
;; WHEN: Tue Jul 27 14:38:34 2010
;; MSG SIZE  rcvd: 145



Do this correct?

--------------
ShanyiWan
2010-07-27
_______________________________________________
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to