System correctly resolves external hostnames (bbc.co.uk for example) but will not resolve any internal (LAN) ones.

The question here is how to automate LAN lookups without having to modify hosts and the like. Boards in question are likely to be installed in networks with completely different DHCP/DNS servers.

The following tells me which server offered DHCP etc. Is there a mechanism to get this address into resolvf.conf or something similar?

$ sudo grep -R "DHCPOFFER" /var/log/syslog
Jan 17 14:32:14 dev-k1s dhclient[1438]: DHCPOFFER of from


[Edit 1]

Added IP address of router which is both DHCP and DNS server

$ sudo cat /etc/resolv.conf
$ ping beeb4
PING beeb4 ( 56(84) bytes of data.
64 bytes from BEEB4 ( icmp_seq=1 ttl=128 time=10.3 ms
64 bytes from BEEB4 ( icmp_seq=2 ttl=128 time=2.49 ms

[Edit 0]

~$ ping dev-k1s
PING dev-k1s ( 56(84) bytes of data.
64 bytes from dev-k1s ( icmp_seq=1 ttl=64 time=0.083 ms

Attempting to ping another machine on the same network:

$ ping beeb4
ping: beeb4: Name or service not known

Various configuration details:

$ ip route
default via dev eth0 dev eth0 proto kernel scope link src
$ sudo cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
$ sudo cat /etc/nsswitch.conf

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          dns files
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis


You're confusing DNS service and hostname resolution which are not declared in the DNS server. You can ping dev-k1s because this is the hostname of your own machine where you opened the terminal. The name and IP address list should in the /etc/hosts file. You should something like this on dev-k1s server :

~# more /etc/hosts       localhost       dev-k1s

So the ping to dev-k1s is responding with the localhost address ( .

If you want your local server responding to ping command with its hostname you should add the IP adresse and the hostname associated at the bottom of the /etc/hosts file like this example :       localhost       dev-k1s
xxx.xxx.xxx.xxx beeb4

More info Click Here

I recommend you to ping its IP address first anyway

  • Thank you dubis. I have tried to better phrase my question. See edits above. – J Evans Jan 17 '19 at 15:29
  • The solution didn't change you've to add the ip address of beeb4 in your hosts file as you don't have local DNS server. – dubis Jan 17 '19 at 16:23

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.