我在 PI 上安装了 bind9。并尝试设置一个简单的 ipv4 和 ipv6 配置。
对于 ipv4,正向和反向查找工作正常。另外,ipv6 的正向查找看起来也不错。但我无法让反向查找适用于 ipV6。
在进行区域检查时,我收到消息:
name-checkzone vl2.home.arpa db.rvlan2v6.in-addr.arpa db.rvlan2v6.in-addr.arpa:4:SOA 记录不在区域顶部(0.0.0.0.0.0.0.0.0.0.0.0.0.0 .2.0.0.0.bbd1.9.5.4.a.2.0.a.2.ip6.arpa.vl2.home.arpa) 区域 vl2.home.arpa/IN:从主文件 db.rvlan2v6.in-addr 加载。 arpa 失败:不在区域顶部 vl2.home.arpa/IN:由于错误而未加载。
有人可以解释我在这里做错了什么吗?
我的bind.conf.local看起来像:
zone "vl2.home.arpa" IN {
type master;
file "/etc/bind/vl2.home.arpa";
};
zone "200.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.rvlan2.in-addr.arpa";
};
zone "2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa" {
type master;
file "/etc/bind/db.rvlan2v6.in-addr.arpa";
};
包含 IPV4 和 IPV6 正向查找的区域文件包含以下内容:
;------------------------------------------------------------------------------
; include default db.soa for mappings below
;------------------------------------------------------------------------------
$include /etc/bind/db.soa
;
;
;------------------------------------------------------------------------------
; Adresses for canonical names
;------------------------------------------------------------------------------
;
; Local loopback address
;------------------------------------------------------------------------------
;
localhost IN A 127.0.0.1
localhost IN AAAA ::1
; local host aliases
loopback IN CNAME localhost
;------------------------------------------------------------------------------
;
;------------------------------------------------------------------------------
; Namesevers voor 192.168.200 prod-lan
;------------------------------------------------------------------------------
;
;@ IN NS cspi.vlan2.lan.
@ IN NS cspi.home.arpa.
@ IN NS cspiv6.home.arpa.
;
;------------------------------------------------------------------------------
; Hosts in 192.168.200 prod-lan
;------------------------------------------------------------------------------
;
cspi IN A 192.168.200.30
cspiv6 IN AAAA 2a02:a459:1dbb:2::1e
反向 ipv4 区域如下所示:
$TTL 2d ; default TTL for zone
@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
2022090201 ; serial
8H ; refresh
4H ; retry
4W ; expire
1H ; minimum
)
IN NS localhost.
30 IN PTR cspi.vl2.home.arpa.
给出错误并因此未加载的区域如下所示:
$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa
$TTL 2d ; default TTL for zone
@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
2022090201 ; serial
8H ; refresh
4H ; retry
4W ; expire
1H ; minimum
)
IN NS localhost.
e.1 IN PTR cspiv6.vl2.home.arpa.
任何帮助表示赞赏!
答案1
你的起源是相对的而不是绝对的,他们需要在末尾加一个点......
$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.bbd1.9.5.4.a.2.0.a.2.ip6.arpa。
和
区域“2.0.0.0.bbd1.9.5.4.a.2.0.a.2.ip6.arpa”。 {
答案2
感谢您的快速答复。现在可以使用了,但仍然遇到一些问题。
我现在将named.conf.local更改为:
"0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa" {
type master;
file "/etc/bind/db.rvlan2v6.in-addr.arpa";
};
我将反向区域查找文件更改为:
; line below does not work ??
;$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.b.b.d.1.9.5.4.a.2.0.a.2.ip6.arpa.
;
$TTL 2d ; default TTL for zone
@ IN SOA vl2.home.arpa. cs.vl2.home.arpa. (
2022090201 ; serial
8H ; refresh
4H ; retry
4W ; expire
1H ; minimum
)
IN NS localhost.
e.1 IN PTR cspiv6.vl2.home.arpa.
```
This configuration works, however I tried to understand why it already works without using the $OPTION statement?
Second question i liked to shorten the zone definition in the named.config.local
but it seems that is not allowed.
I will test tomorrow again with using the $OPTION statement this time with a . at the end.
Thanks so much for sharing this with me. I appreciate this!