Chinaunix首页 | 论坛 | 博客
  • 博客访问: 400691
  • 博文数量: 147
  • 博客积分: 5400
  • 博客等级: 大校
  • 技术积分: 1380
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-12 20:29
文章分类

全部博文(147)

文章存档

2013年(1)

2012年(44)

2011年(5)

2010年(4)

2009年(22)

2008年(71)

分类:

2008-03-23 00:05:47

Defined in RFC 2782. Defines the host(s) that will support the defined services. Allows some level of control over prioritisation of delivery and usage. Relatively new record format - poorly supported except notably by and increasingly by VoIP systems in conjunction with the . Ugly format may not be helping!
The theory behind SRV is that given a known domain name e.g. example.com, a given service e.g. web (http) which runs on tcp in this case, a DNS query may be issued to find the host name that provides such on behalf of the domain - and which may or may not be within the domain - see example 2 below.
SVR Syntaxsrvce.prot.name  ttl  class   rr  pri  weight port target_http._tcp.example.com. IN      SRV 0    5      80  
FieldDescriptionsrvceDefines the symbolic service name (see ) prepended with a '_' (underscore). Case insensitive. Common values are: _http - web service _ftp - file transfer service _ldap - LDAP service protDefines the protocol name (see ) prepended with a '_' (underscore). Case insensitive. Common values are _tcp - TCP protocol _udp - UDP protocol nameIncomprehensible description in RFC 2782. Leaving the entry blank (without a dot) will substitute the current zone root (the $ORIGIN), or you can explicitly add it as in the above _http._tcp.example.com. .ttlStandard TTL parameter. .priThe relative Priority of this service (range 0 - 65535). Lowest is highest priority.weightUsed when more thanone service with same priority. A 16 bit unsigned integer in the range 0 - 65535. The value 0 indicates no weighting should be applied. If the weight is 1 or greater it is a relative number in which the highest is most frequently delivered i.e. given two SRV records both with Priority = 0,one with weight = 1 the other weight = 6, theone with weight 6 will have its RR delivered first 6 times out of 7 by the name server.portNormally the port number assigned to the symbolic service but does this is not a requirement e.g. it is permissible to define a _http service with a port number of 8100 rather than the more normal port 80.targetThe name of the host that will provide this service. Does not have to be in the same zone (domain).ExamplesThis example is taken from the RFC and is designed to make everything clear(!). The second example shows a real world LDAP service definition.
$ORIGIN example.com.@               SOA server.example.com. hostmaster.example.com. (                          1995032001 3600 3600 604800 86400 )                NS  server.example.com.                NS  ns1.ip-provider.net.                NS  ns2.ip-provider.net.; foobar - use old-slow-box or new-fast-box if either is; available, make three quarters of the logins go to; new-fast-box._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.10old-slow-box     A   172.30.79.11sysadmins-box    A   172.30.79.12new-fast-box     A   172.30.79.13; NO other services are supported*._tcp          SRV  0 0 0 .*._udp          SRV  0 0 0 .
This example is taken from the site and allows for a simple discovery process of the LDAP server for the zone by interrogation of the DNS.
$ORIGIN example.com..........; defines an ldap service available at the host jim.example.com_ldap._tcp.example.com.    SRV 0 0 389 jim; if the service (LDAP) were hosted by another organization; the reference could be external; in this case the host ldap.example.net hosts the LDAP service for; example.com _ldap._tcp.example.com.    SRV 0 0 389 ldap.example.net.
OpenLDAP publish an SRV RR which may be obtained by issuing an SRV query to _ldap._tcp.openldap.
阅读(750) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~