TLD:
gov, edu, net, com, org, mil, int
查询模式:
递归,迭代
资源记录类型Resource Record type:
SOA 起始授权记录
NS
A
PTR
MX
CNAME 正式名称
TXT
UDP 53
区域传送
DNS服务器的类型:
主域名服务器
辅助域名服务器
缓存域名服务器
转发器
Bind: Berkeley Internet Name Daemon
PowerDNS
MyDNSng
bind的远程控制器:
rndc,端口953
rndc flush 清空缓存
rndc-confgen > /etc/rndc.conf
tail /etc/rndc.conf | head -9 | sed 's/^# //g' >> /etc/named.conf
解析域名和IP:
dig -t NS . @a.root-servers.net > /var/named/named.ca
dig -t A localhost.
dig -x 127.0.0.1
完全区域传送axfr:
dig -t axfr a.com 用TCP协议
allow-transfer { none; }; 在/etc/named.conf添加
TCP:53
增量区域传送:ixfr
查询软件版本号:
dig txt chaos version.bind @127.0.0.1
DNS:
UDP:53
bind 软件包
named 进程
DNS 服务
database:
zonefile ,fqdn-->ip
reverse zone file ,ip-->fqdn
localhost ,127.0.0.1
file,root dns server
软件包
bind
bind-libs
bind-utils
bind-chroot
caching-nameserver
主配置文件:
/etc/named.conf
acl trust {
172.16.100.0/24;
127.0.0.1;
};
options {
// listen-on port 53 { 127.0.0.1; };
// listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// allow-query { localhost; };
// allow-recursion { trust; }; 允许trust的递归查询// recursion yes;
// dnssec-enable yes;
// dnssec-validation yes;
// dnssec-lookaside auto;
/* Path to ISC DLV key */
// bindkeys-file "/etc/named.iscdlv.key";
// managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "abc.com" IN {
type master;
file "named.abc.com";
allow-transfer { 192.168.222.129; };
};
//include "/etc/named.rfc1912.zones";
//include "/etc/named.root.key";
从库配置:
zone "abc.com" IN {
type slave;
masters { 192.168.222.128; };
file "slaves/named.abc.com";
};
数据文件:
/var/named/named.test.com
$TTL 86400 //time to live 生存时间
@ IN SOA abc.com. admin.abc.com. (
2014111709 ; serial //更新序列号
5M ; refresh //更新时间
1M ; retry //重试延时
1H ; expire //失效时间
1D) ; minimum //无效地址解析记录的默认缓存时间
@ IN NS ns
@ IN NS ns2
ns IN A 192.168.222.128
ns2 IN A 192.168.222.129
www IN A 192.168.222.129
chown :named /etc/named.conf
chown :named /var/named/* -R
启动服务的脚本:
/etc/init.d/named