02.07.2013 Views

BIND 9

BIND 9

BIND 9

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 6. <strong>BIND</strong> 9配置参考 6.2. 配置文件语法<br />

// This is the start of a comment. The next line<br />

// is a new comment, even though it is logically<br />

// part of the previous comment.<br />

Shell风格(或者称为perl风格,只要你愿意)的注释以字符#(井号)开始并持续到一行的结束,<br />

与C++注释一样。例如:<br />

# This is the start of a comment. The next line<br />

# is a new comment, even though it is logically<br />

# part of the previous comment.<br />

警告<br />

你不能象在区文件中一样,使用分号(‘;’)字符来开始一个注释。分号表<br />

示一个配置语句的结束。<br />

6.2 配置文件语法<br />

<strong>BIND</strong> 9的配置文件由语句和注释组成。语句以分号结束。语句和注释是仅有的可以出现在花括号之外<br />

的元素。许多语句包含由子语句组成的块,子语句也以分号结束。<br />

以下是所支持的语句:<br />

acl 定义一个命名的IP地址匹配列表,用于访问控制或其它用<br />

途。<br />

controls 声明控制通道,用于rndc应用程序。<br />

include 包含一个文件。<br />

key 指定在使用TSIG时,用于的认证和授权的密钥信息。<br />

logging 指定服务器记录哪些日志,和在哪里记录日志消息。<br />

lwres 配 置named, 使 其 也 充 当 轻 量 级 解 析 器 看 守 进 程<br />

(lwresd)。<br />

masters 定义一个命名的主服务器列表,一般包含在存根服务器和辅<br />

服务器的区中的masters子句中。<br />

options 控制全局服务器配置和为其它语句设置缺省参数。<br />

server 为基于单个服务器的配置设置某个配置选项。<br />

statistics-channels 声明通信通道,以访问named统计信息。<br />

trusted-keys 定义信任的DNSSEC密钥。<br />

managed-keys 列 出 通 过RFC 5011信 任 锚 点 维 护 来 保 持 更 新 的DNSSEC密<br />

钥。<br />

view 定义一个视图。<br />

zone 定义一个区。<br />

logging和options语句在每个配置文件中只能出现一次。<br />

6.2.1 acl语句语法<br />

acl acl-name {<br />

address_match_list<br />

46

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!