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 192.168.1.19 from 192.168.1.1
TAIA.
[Edit 1]
Added IP address of router which is both DHCP and DNS server
$ sudo cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 1.1.1.1
$ ping beeb4
PING beeb4 (192.168.1.72) 56(84) bytes of data.
64 bytes from BEEB4 (192.168.1.72): icmp_seq=1 ttl=128 time=10.3 ms
64 bytes from BEEB4 (192.168.1.72): icmp_seq=2 ttl=128 time=2.49 ms
[Edit 0]
~$ ping dev-k1s
PING dev-k1s (127.0.1.1) 56(84) bytes of data.
64 bytes from dev-k1s (127.0.1.1): 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 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.19
$ sudo cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 8.8.8.4
$ 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