分类:
2007-07-17 13:31:37
zone zone_name [class] [{
type ( master | slave | hint | stub | forward | delegation-only ) ;
[ allow-notify { address_match_list } ; ]
[ allow-query { address_match_list } ; ]
[ allow-transfer { address_match_list } ; ]
[ allow-update { address_match_list } ; ]
[ update-policy { update_policy_rule [...] } ; ]
[ allow-update-forwarding { address_match_list } ; ]
[ also-notify { ip_addr [port ip_port] ; [ ip_addr [port ip_port] ; ... ] }; ]
[ check-names (warn
|fail
|ignore
) ; ]
[ dialup dialup_option ; ]
[ delegation-only yes_or_no ; ]
[ file string ; ]
[ forward (only
|first
) ; ]
[ forwarders { ip_addr [port ip_port] ; [ ip_addr [port ip_port] ; ... ] }; ]
[ ixfr-base string ; ]
[ ixfr-tmp-file string ; ]
[ maintain-ixfr-base yes_or_no ; ]
[ masters [port ip_port] { ip_addr [port ip_port] [key key]; [...] } ; ]
[ max-ixfr-log-size number ; ]
[ max-transfer-idle-in number ; ]
[ max-transfer-idle-out number ; ]
[ max-transfer-time-in number ; ]
[ max-transfer-time-out number ; ]
[ notify yes_or_no | explicit ; ]
[ pubkey number number number string ; ]
[ transfer-source (ip4_addr |*
) [port ip_port] ; ]
[ transfer-source-v6 (ip6_addr |*
) [port ip_port] ; ]
[ notify-source (ip4_addr |*
) [port ip_port] ; ]
[ notify-source-v6 (ip6_addr |*
) [port ip_port] ; ]
[ zone-statistics yes_or_no ; ]
[ sig-validity-interval number ; ]
[ database string ; ]
[ min-refresh-time number ; ]
[ max-refresh-time number ; ]
[ min-retry-time number ; ]
[ max-retry-time number ; ]
}];
master |
区域管理服务器:服务器拥有区域的主数据库,并对此区域提供管理数据。 |
slave |
区域从属服务器:拥有区域管理服务器的区域数据库的一个拷贝,管理服务器列表中的一个或多个IP地址,他们从管理服务器中获得区域数据更新。默认情况,传送使用服务器的53号端口,这可通过在一组IP地址前面指定端口号来改变,或者跟在IP地址后来为某个IP地址指定端口号。管理服务器也可以为每个服务器指定TSIG 密钥。如果指定一个文件,从属服务器在区域数据改变时会记录在这个文件中,在服务器重启时从此文件恢复。推荐使用这个文件,这通常会加速服务器启动,减少不必须的带宽损耗。注意:对很多区域的服务器(有几十个或者成百上千个),最好使用2级区域文件。例如,example.com 的从属服务器可能会把区域数据存入ex/example.com ,这里ex/ 只是区域名字的前两个字母。 (大多数操作系统在一个目录中有100K个文件时会非常慢。) |
Stub |
stub 区域与从属区域近似,但是它只复制管理区域的NS记录,而不像从属区域会复制所有区域数据。Stub 区域不是DNS标准部分,它们是BIND的一个特性。 Stub 区域用来减少粘合父区域的NS记录的需求,这降低了维护Stub区域和一组在named.conf中的域名服务器的成本。这个用法在新版本中已经不再推荐使用,BIND 9 只是有限的对它进行支持。在类(Class)
区域名称后面可选择跟一个类(class),如果没有指定类,默认是class IN (for Internet), 这适应大多数情况。 hesiod 类是MIT的项目名信息Athena,它用来共享不同系统数据库之间的信息,比如用户、组、打印机等,关键字HS 和hesiod意思相同。 另外一个MIT 开发的CHAOSnet,在1970年代中期建立的局域网协议,那里面的区域数据指定使用CHAOS 类。 allow-notify 参见 Section 6.2.14.3中的allow-notify allow-query 参见allow-query 在 Section 6.2.14.3 allow-transfer 参见 allow-transfer 在 Section 6.2.14.3. allow-update 指定哪台主机被允许为管理区域执行动态DNS更新,默认是禁止从所有主机更新。 update-policy 指定一个“简单安全更新”策略("Simple Secure Update"),参见Section 6.2.22.4. allow-update-forwarding 指定哪台主机被允许为从属服务器作为转发的动态DNS更新转发器,默认是{ none; },它意味着不会转发更新数据。为了允许转发,指定allow-update-forwarding { any; }, 指定不是{ none; } 或者 { any; } 的值通常会有不好的后果,因为是否更新应由管理服务器决定,而不是由从属服务器决定。 注意在从属服务器上使用更新转发会暴露基于不安全IP地址的存取控制的管理服务器,使之受到攻击。参见 Section 7.3 获得更详细信息。 also-notify 只在本区域的notify 有效时它才有效,一组接收本区域DNS NOTIFY 信息的域名服务器 (除了管理服务器) ,可以用also-notify添加任何IP地址。也可以为每个IP地址指定端口号,默认是53,also-notify 对stub区域是无效的。 默认值是空列表。 check-names BIND 8中限制域名字符组用,BIND 9中不用,也没有了。 This option was used in BIND 8 to restrict the character set of domain names in master files and/or DNS responses received from the network. BIND 9 does not restrict the character set of domain names and does not implement the check-names option. database 指定用来存储区域数据的数据库类型,跟在database 关键字后面的字符串解释为一组由空格分开的单词,第一个单词指数据库的类型,以后的单词都被解释为数据库的参数。 默认是"rbt",BIND 9 自带的数据库“红黑树”(red-black-tree),这个数据库没有参数。 如果其它数据库驱动程序链接到服务器,也可能会是其它值,发行版中已经包含了一些简单的数据库驱动程序,但是默认并不链接。 dialup 参见 Section 6.2.14.1。 delegation-only 这个标志只用在hint 和stub 区域,如果设为yes,这个区域同时也被当作是delegation-only 类型的区域。 forward 只在区域有forwarders 列表时有效。参数only 的意思是,查询转发器列表没有得到答案后失败,而参数first 允许尝试使用普通转发(不在转发器列表中的)查询。 forwarders 用来替代全局设置的forwarders,如果没有指定forward,这个区域就查询就不使用转发,全局中的设置也不被使用。 ixfr-base 已经不用。Was used in BIND 8 to specify the name of the transaction log (journal) file for dynamic update and IXFR. BIND 9 ignores the option and constructs the name of the journal file by appending ".jnl" to the name of the zone file. ixfr-tmp-file BIND 8中没有列入文档的选项,在BIND 9中忽略。 max-transfer-time-in 参见 Section 6.2.14.6。 max-transfer-idle-in 参见 Section 6.2.14.6。 max-transfer-time-out 参见 Section 6.2.14.6。 max-transfer-idle-out 参见 Section 6.2.14.6。 notify 参见 Section 6.2.14.1。 pubkey 已经不用。In BIND 8, this option was intended for specifying a public zone key for verification of signatures in DNSSEC signed zones when they are loaded from disk. BIND 9 does not verify signatures on loading and ignores the option. zone-statistics 如果设为yes,服务器会保存区域的统计信息,这些信息可以存成一个文件statistics-file ,在server选项里面有说明。 sig-validity-interval transfer-source 参见 Section 6.2.14.6。 transfer-source-v6 参见 Section 6.2.14.6 。 notify-source 参见 Section 6.2.14.6 。 notify-source-v6 参见 Section 6.2.14.6。 min-refresh-time, max-refresh-time, min-retry-time, max-retry-time |