错误(网络不可达)解决

错误(网络不可达)解决

尝试使用该sudo named -g命令重新加载我的绑定配置时出现错误:

02-Aug-2018 15:42:51.472 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:500:2f::f#53
02-Aug-2018 15:42:51.472 error (network unreachable) resolving 'sdns2.ovh.net/AAAA/IN': 2001:500:2f::f#53
02-Aug-2018 15:42:51.472 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:dc3::35#53
02-Aug-2018 15:42:51.472 error (network unreachable) resolving 'sdns2.ovh.net/AAAA/IN': 2001:dc3::35#53
02-Aug-2018 15:42:51.473 error (network unreachable) resolving './NS/IN': 2001:500:2f::f#53
02-Aug-2018 15:42:51.473 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:500:2d::d#53
02-Aug-2018 15:42:51.473 error (network unreachable) resolving './NS/IN': 2001:dc3::35#53
02-Aug-2018 15:42:51.473 error (network unreachable) resolving 'sdns2.ovh.net/AAAA/IN': 2001:500:2d::d#53
02-Aug-2018 15:42:51.474 error (network unreachable) resolving './NS/IN': 2001:500:2d::d#53
02-Aug-2018 15:42:51.722 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:503:eea3::30#53
02-Aug-2018 15:42:51.722 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:503:83eb::30#53
02-Aug-2018 15:42:51.724 error (network unreachable) resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53
02-Aug-2018 15:42:51.825 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:41d0:1:4a82::1#53
02-Aug-2018 15:42:51.826 error (network unreachable) resolving 'sdns2.ovh.net/A/IN': 2001:41d0:1:4a84::1#53

/etc/bind/149.202.46.110.in-addr.arpa文件包含:

$TTL 12H
@          IN              SOA             vps36036.ovh.net. postmaster.europasprak.com. (
           2018080201      ; Serial
           8H              ; Refresh
           30M             ; Retry
           4W              ; Expire
           8H              ; Minimum TTL
)
           IN NS   vps36036.ovh.net.
           IN NS   sdns2.ovh.net.
           IN PTR  europasprak.com.

/etc/bind/db.europasprak.com文件包含:

$TTL 12H
$ORIGIN europasprak.com.
@          IN              SOA             vps36036.ovh.net. postmaster.europasprak.com. (
           2018080201      ; Serial
           8H              ; Refresh
           30M             ; Retry
           4W              ; Expire
           8H              ; Minimum TTL
)
           IN              NS              vps36036.ovh.net.
           IN              NS              sdns2.ovh.net. 
           IN              MX      10      mail.europasprak.com.
europasprak.com.  IN       A 149.202.46.110
ns         IN              A 149.202.46.110
mail       IN              A 149.202.46.110
fu         IN              A 149.202.46.110
lerum      IN              A 149.202.46.110
www        IN              CNAME           europasprak.com.
ftp        IN              CNAME           europasprak.com.
ownercheck IN              TXT             "144b57c8"

如果注释掉sdns2.ovh.net每个文件中包含的两行,那么我会得到以下输出(但命令随后挂起):

02-Aug-2018 15:45:23.194 zone 149.202.46.110.in-addr.arpa/IN: loaded serial 2018080201
02-Aug-2018 15:45:23.197 zone europasprak.com/IN: loaded serial 2018080201
02-Aug-2018 15:45:23.199 all zones loaded
02-Aug-2018 15:45:23.199 running

添加条目后,我需要重新加载绑定配置lerum

我使用的是 Linux 数据 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u5 x86_64 GNU/Linux

listen-on-v6 { none; };更新:我在文件中也有该配置,文件中也/etc/bind/named.conf.options有该配置。但命令挂起了。路线如下:RESOLVCONF=no OPTIONS="-u bind -4"/etc/default/bind9sudo /etc/init.d/bind9 reload

stephane@data:~$ sudo route -6
Table de routage IPv6 du noyau
Destination                    Next Hop                   Flag Met Ref Use If
::1/128                        [::]                       U    256 0     0 lo
fe80::/64                      [::]                       !n   256 0     0 lo
fe80::/64                      [::]                       U    256 0     0 eth0
[::]/0                         [::]                       !n   -1  1  1385 lo
::1/128                        [::]                       Un   0   1 50901 lo
fe80::f816:3eff:fe0a:409/128   [::]                       Un   0   1     0 lo
ff00::/8                       [::]                       U    256 0     0 eth0
[::]/0                         [::]                       !n   -1  1  1385 lo

ip以下是服务器上该命令的输出:

stephane@data:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fa:16:3e:0a:04:09 brd ff:ff:ff:ff:ff:ff
    inet 149.202.46.110/32 brd 149.202.46.110 scope global eth0
    inet6 fe80::f816:3eff:fe0a:409/64 scope link 
       valid_lft forever preferred_lft forever
stephane@data:~$ ip -6 route
unreachable fe80::/64 dev lo  proto kernel  metric 256  error -101
fe80::/64 dev eth0  proto kernel  metric 256 

答案1

2018 年 8 月 2 日 15:42:51.472 错误(网络不可达)解析“sdns2.ovh.net/A/IN”:2001:500:2f::f#53

这实际上与您的区域文件无关。(Bind 会尝试解析它在 NS 记录中找到的名称,以便它可以发送 NOTIFY 消息,但错误本身与您的记录无关。)

当您拥有 IPv6 地址时远程 DNS 服务器有一个 IPv6 地址,Bind 将尝试通过 IPv6 联系该服务器。但您的网络配置不完整——我猜您有一个地址,但没有配置网关(默认路由)。(要么就是 OVH 的 IPv6 又坏了……)

一旦您修复服务器上的 IPv6 连接,这些消息就会消失。

但命令随后挂起

named -g它没有挂起。这是“命名”服务器正在运行。重新加载配置后,它会在你的终端上启动该服务的一个新实例:

   -g
       Run the server in the foreground and force all logging to stderr.

要重新加载现存的例如,使用rndc reconfigrndc reload、 或pkill -HUP named

相关内容