DNS配置错误
错误1
dns_master_load: *:2: unexpected end of line
错误2
>linux.zzw.com
* Server: 127.0.0.1 *
* Address: 127.0.0.1#53 *
* *
*** server can't find linux.zzw.com: SERVFAIL *
linux下错误查看 /var/log/messages
该文件下有service named restart 的启动日志
当该服务启动时,过程如下:
Jan 27 18:14:33 linux named[1097]: starting BIND 9.2.4 -u named
Jan 27 18:14:33 linux named[1097]: using 1 CPU
Jan 27 18:14:33 linux named[1097]: loading configuration from '/etc/named.conf'
Jan 27 18:14:33 linux named[1097]: no IPv6 interfaces found
Jan 27 18:14:33 linux named[1097]: listening on IPv4 interface lo, 127.0.0.1#53
Jan 27 18:14:33 linux named[1097]: listening on IPv4 interface eth0, 192.168.1.110#53
Jan 27 18:14:33 linux named[1097]: command channel listening on 127.0.0.1#953
Jan 27 18:14:33 linux named[1097]: 127.0.0:1: no TTL specified; using SOA MINTTL instead
Jan 27 18:14:33 linux named[1097]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1998081901
Jan 27 18:14:33 linux named[1097]: dns_master_load: 192.168.1.db:12: TTL set to prior TTL (1)
Jan 27 18:14:33 linux named[1097]: dns_master_load: 192.168.1.db:13: TTL set to prior TTL (1)
Jan 27 18:14:33 linux named[1097]: dns_master_load: 192.168.1.db:14: TTL set to prior TTL (1)
Jan 27 18:14:33 linux named[1097]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2004071601
Jan 27 18:14:33 linux named[1097]: zone zzw.com/IN: loaded serial 2004071601
Jan 27 18:14:33 linux named[1097]: running
Jan 27 18:14:33 linux named[1097]: zone zzw.com/IN: sending notifies (serial 2004071601)
Jan 27 18:14:33 linux named: named startup succeeded
注意zzw.com.db文件 文件格式 注意linux.zzw.com.后面的. 还有不要加入无效字符 比如#
错误方式多样, 关键是定位错误发生的位置。
错误3(理解上的问题)
在输入 192.168.1.110
> 192.168.1.110
Server: 192.168.1.110
Address: 192.168.1.110#53
** server can't find 110.1.168.192.in-addr.arpa: NXDOMAIN
它查找的是逆向解析文件 1.168.192.db
文件内容
----------------------------------------------------------------------------------------------
$TTL 83601
@ IN SOA linux.zzw.com. root.linux.zzw.com. (
2005071601 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS linux.zzw.com.
1 IN PTR my.zzw.com.
5 IN PTR hq.zzw.com.
----------------------------------------------------------------------------------------------
文件中的标红表示的意思是192.168.1.1 对应的域名为 my.zzw.com
文件中的标蓝表示的意思是192.168.1.5 对应的域名为 hq.zzw.com
(注意:1 和5的前面不能有空格)
错误5
分析正向文件
----------------------------------------------------------------------------------------------
$TTL 83600
@ IN SOA linux.zzw.com. root.linux.zzw.com. (
2004071601 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS linux.zzw.com
linux IN A 192.168.1.110
my IN A 192.168.1.110
hq IN A 192.168.1.110
----------------------------------------------------------------------------------------------
(@ IN NS linux.zzw.com)NS记录 : 该区的一个名字服务器
A表示的是名字到地址的映射