I have setup a local raspberry pi to be a DNS server for the office. It worked (almost) perfectly, until we moved down a floor in the office.

The firewall and setup for the network is exactly the same, however my RaspberryPI DNS host doesn't.

The zones are correct and I can lookup the local domain and get the correct result. However, it doesn't ping.

From my Mac:

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

Name:   mobile.domain.office

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

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

--- 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

;mobile.domain.office.  IN  A

mobile.domain.office. 7200  IN  A

domain.office.  7200    IN  NS  raspberrypi.domain.office.

raspberrypi.domain.office. 7200 IN  A

;; Query time: 1 msec
;; WHEN: Wed Apr 27 15:05:42 2016
;; MSG SIZE  rcvd: 100

The address of mobile.domain.office is My mac can reach it perfectly, so can the DNS "server". The DNS server also resolved the DNS as well as my mac, yet I can't reach it. However, the DNS "server" does have a high latency and is slow to respond:

root@raspberrypi:/etc/bind# ping -c 3 mobile.domain.office
PING mobile.domain.office ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=64 time=977 ms
64 bytes from icmp_req=2 ttl=64 time=360 ms
64 bytes from 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

As suggested here, I also changed /etc/nsswitch.conf to have dns after files, that didn't help either.

From what I can see, the zones are correct too. This is the zone for 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
raspberrypi         IN  A
mobile              IN  A

I have also done a new reload on the name server control utility:

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

Also, both my Mac and the raspberry pi have the correct settings.

Ifconfig for my mac:

Pauls-MacBook-Pro:~ paulp$ ifconfig
    ether ac:bc:32:95:04:bb
    inet6 fe80::aebc:32ff:fe95:4bb%en0 prefixlen 64 scopeid 0x4
    inet netmask 0xfffffe00 broadcast
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active

The raspberry pi:

root@raspberrypi:/etc/bind# ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:f4:2b:3c
          inet addr:  Bcast:  Mask:
          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)

What am I doing wrong?

  • And the Pi is in the same subnet as your MacBook?
    – Run CMD
    Apr 27, 2016 at 13:25
  • Yes. It seems to. I'll update the question. Apr 27, 2016 at 13:39

1 Answer 1


It turned out, for me, to be a network issues. We reset the primary DNS in the router once again to the DNS server. Also, did a DNS flush on my mac. Afterwards it all worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.