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: DHCPOFFER of 192.168.1.19 from 192.168.1.1
Added IP address of router which is both DHCP and DNS server
$ sudo cat /etc/resolv.conf nameserver 192.168.1.1 nameserver 188.8.131.52
$ 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
~$ 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 184.108.40.206 nameserver 220.127.116.11 nameserver 18.104.22.168
$ 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