查找正确,但没有ping


1

我已经设置了一个本地覆盆子pi作为办公室的DNS服务器。它(几乎)完美地工作,直到我们在办公室的地板上移动。

网络的防火墙和设置完全相同,但我的RaspberryPI DNS主机没有。

区域是正确的,我可以查找本地域并获得正确的结果。但是,它没有ping。

从我的Mac:

Pauls-MacBook-Pro:~ paulp$ nslookup mobile.domain.office
Server:     10.0.0.196
Address:    10.0.0.196#53

Name:   mobile.domain.office
Address: 10.0.0.201



Pauls-MacBook-Pro:~ paulp$ ping mobile.domain.office
ping: cannot resolve mobile.domain.office: Unknown host



Pauls-MacBook-Pro:~ paulp$ ping -c 3 10.0.0.201
PING 10.0.0.201 (10.0.0.201): 56 data bytes
64 bytes from 10.0.0.201: icmp_seq=0 ttl=64 time=1.318 ms
64 bytes from 10.0.0.201: icmp_seq=1 ttl=64 time=2.562 ms
64 bytes from 10.0.0.201: icmp_seq=2 ttl=64 time=26.039 ms

--- 10.0.0.201 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.318/9.973/26.039/11.372 ms



Pauls-MacBook-Pro:~ paulp$ dig mobile.domain.office

; <<>> DiG 9.8.3-P1 <<>> mobile.domain.office
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44066
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;mobile.domain.office.  IN  A

;; ANSWER SECTION:
mobile.domain.office. 7200  IN  A   10.0.0.201

;; AUTHORITY SECTION:
domain.office.  7200    IN  NS  raspberrypi.domain.office.

;; ADDITIONAL SECTION:
raspberrypi.domain.office. 7200 IN  A   10.0.0.196

;; Query time: 1 msec
;; SERVER: 10.0.0.196#53(10.0.0.196)
;; WHEN: Wed Apr 27 15:05:42 2016
;; MSG SIZE  rcvd: 100

地址mobile.domain.office10.0.0.201。我的mac可以完美地达到它,DNS“服务器”也可以。DNS服务器也解析了DNS以及我的mac,但我无法达到它。但是,DNS“服务器”确实具有高延迟并且响应缓慢:

root@raspberrypi:/etc/bind# ping -c 3 mobile.domain.office
PING mobile.domain.office (10.0.0.201) 56(84) bytes of data.
64 bytes from 10.0.0.201: icmp_req=1 ttl=64 time=977 ms
64 bytes from 10.0.0.201: icmp_req=2 ttl=64 time=360 ms
64 bytes from 10.0.0.201: icmp_req=3 ttl=64 time=352 ms

--- mobile.domain.office ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 31348ms
rtt min/avg/max/mdev = 352.624/563.543/977.893/293.006 ms

正如这里所建议的那样,我也改变/etc/nsswitch.confdns以后files,也没有帮助。

从我所看到的,这些区域也是正确的。这是以下区域domain.zone

;
; BIND data file for local loopback interface
;
$TTL    7200
@       IN      SOA     domain.office. root.domain.office. (
                              2         ; Serial
                         172800         ; Refresh
                          14400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL

                        NS      raspberrypi.domain.office.
domain.office   IN  NS      raspberrypi.domain.office.
domain.office   IN  A       10.0.0.201
raspberrypi         IN  A       10.0.0.196
mobile              IN  A       10.0.0.201

我还在名称服务器控件实用程序上重新加载了一个:

root@raspberrypi:/etc/bind# rndc reload domain.office
zone reload up-to-date

此外,我的Mac和树莓派都有正确的设置。

我的mac的ifconfig:

Pauls-MacBook-Pro:~ paulp$ ifconfig
[...]
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:95:04:bb
    inet6 fe80::aebc:32ff:fe95:4bb%en0 prefixlen 64 scopeid 0x4
    inet 10.0.0.185 netmask 0xfffffe00 broadcast 10.0.1.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
[...]

树莓派:

root@raspberrypi:/etc/bind# ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:f4:2b:3c
          inet addr:10.0.0.196  Bcast:10.0.1.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3208 errors:0 dropped:2 overruns:0 frame:0
          TX packets:2353 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:844113 (824.3 KiB)  TX bytes:324170 (316.5 KiB)

我究竟做错了什么?


Pi与MacBook在同一子网中?
运行CMD 2016年

是。好像。我会更新这个问题。
Paul Peelen 2016年

Answers:


0

事实证明,对我而言,这是一个网络问题。我们再次将路由器中的主DNS重置为DNS服务器。另外,我的mac上有一个DNS刷新。之后一切都奏效了。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.