NSD区域文件错误解析

NSD区域文件错误解析

我已经使用以下区域文件设置了 NSD:

$ORIGIN     ldom. ; my "Local DOMain"
@   IN      SOA         lserver         root.lserver (
                                        44         ;serial
                                        7200       ;refresh
                                        600        ;retry
                                        3600000    ;expire
                                        1200 )     ;minimum

@                   IN  NS              192.168.1.64      ; authority
ldom.               IN  A               192.168.1.64

无论我在 LAN 的哪个位置 ping/dig 它,都会得到以下明显错误的输出:

平:

[user@laptop ~]$ ping ldom
PING ldom (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.037 ms
^C
--- ldom ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.016/0.026/0.037/0.010 ms
[user@laptop ~]$

挖:

[user@laptop ~]$ dig ldom

; <<>> DiG 9.9.2-P2 <<>> ldom
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23335
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ldom.                                IN      A

;; ANSWER SECTION:
ldom.                 3600    IN      A       127.0.0.1

;; AUTHORITY SECTION:
ldom.                 3600    IN      NS      localhost.ldom.

;; Query time: 1 msec
;; SERVER: 192.168.1.64#53(192.168.1.64)
;; WHEN: Wed Apr  2 12:04:33 2014
;; MSG SIZE  rcvd: 75

[user@laptop ~]$

laptop“192.168.1.65”(DHCP),NSD 服务器是“192.168.1.64”,交换机是 DSL 路由器 (192.168.1.1),DNS1=192.168.1.64 且 DNS2=ISP

为什么我得到的是 127.0.0.1?我想要“192.168.1.64”!我做错了什么部分?

我尝试将 SOA 中的“lserver”更改为 192.168.1.64,但没有任何区别。我尝试的任何更改都会产生完全相同的响应,甚至更改 NS 和 A 记录目标。

答案1

答案:

数据库需要更新(一个新问题是:为什么手动?):

#zonec -v
zonec: reading zone "ldom".
zonec: processed 3 RRs in "ldom".

zonec: done with no errors.
#service nsd3 restart ; UBUNTU

一切都很好!

祝大家好运!

相关内容