I am making a fresh install on a RaspberryPi 2. I have an older install on an original RaspberryPi. The older install will happily resolve local names, such as vigor, while the new install fails to do so when using ping or other commands, although drill returns the correct ip address..
Older system:$this->bbcode_second_pass_code('', '[root@upstairs ~]# uname -a
Linux upstairs 4.4.14-1-ARCH #1 Sun Jun 26 12:18:36 MDT 2016 armv6l GNU/Linux
[root@upstairs ~]# ping vigor
PING vigor (172.22.0.2) 56(84) bytes of data.
64 bytes from vigor.localdomain (172.22.0.2): icmp_seq=1 ttl=255 time=0.403 ms
64 bytes from vigor.localdomain (172.22.0.2): icmp_seq=2 ttl=255 time=0.395 ms
64 bytes from vigor.localdomain (172.22.0.2): icmp_seq=3 ttl=255 time=3.07 ms
^C
--- vigor ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.395/1.292/3.079/1.263 ms
[root@upstairs ~]# ^C
[root@upstairs ~]#')
On the new system:$this->bbcode_second_pass_code('', '[root@alarmpi alarm]# uname -a
Linux alarmpi 4.9.50-1-ARCH #1 SMP Thu Sep 14 01:28:33 UTC 2017 armv7l GNU/Linux
[root@alarmpi alarm]# drill vigor
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 2317
;; flags: qr aa rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; vigor. IN A
;; ANSWER SECTION:
vigor. 0 IN A 172.22.0.2
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 1 msec
;; SERVER: 172.22.0.1
;; WHEN: Sun Sep 17 18:00:38 2017
;; MSG SIZE rcvd: 39
[root@alarmpi alarm]# ping vigor
ping: vigor: Name or service not known
[root@alarmpi alarm]# ping 172.22.0.2
PING 172.22.0.2 (172.22.0.2) 56(84) bytes of data.
64 bytes from 172.22.0.2: icmp_seq=1 ttl=255 time=0.386 ms
64 bytes from 172.22.0.2: icmp_seq=2 ttl=255 time=0.298 ms
^C
--- 172.22.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1057ms
rtt min/avg/max/mdev = 0.298/0.342/0.386/0.044 ms
[root@alarmpi alarm]#
')
So drill correctly resolves vigor to 172.22.0.2, but "ping vigor" reports "Name or service not known". Pinging the ip address is successful.
I'm sure that I've forgotten to do something basic, but cannot figure out what. Suggestions please!
EDIT to add:
I should say that ping to a public address (eg http://www.bbc.co.uk) works fine. The behaviour is as if the system is using a public dns server, instead of my local dns server/relay. But why does drill, using the default (my local) dns, manage to resolve local addresses?