On 01/05/14 13:00, Brett Parker wrote:
On 01 May 00:57, steve-ALUG@hst.me.uk wrote:
<cut />
Your WIFI router will be running a DHCP server, but is almost certainly NOT running a DNS server for your LAN. This is why your devices aren't visible by name.
Erm, that's not true for any router that I've had in the last 10 years, nearly all of them run a caching local DNS server (at the minimum) and add records of the form machinename.lan to the DNS server. Nearly all of them run dnsmasq (or a varient) that does this.
The main reason for routers running a thing DNS client is that then when they give out the DHCP lease they give out themselves as the DNS server, and if the WAN connection is reset and gets different IPs or DNS servers, it's the DNS server on the router that gets refreshed *NOT* all the clients behind it. This is fairly much common sense.
Interesting. The main reason I started using dnsmasq in the first place was that machine names were not being used on my system and I had to type and remember IP addresses.
[However, DNS will be working for things outside your network, so you can access BBC.CO.UK for instance] How to arrange so that you know IP addresses or Names? Several ways.
Static IP addresses. Probably not a good idea as these would probably only work on your boat - Dynamic addressing is good for devices that move between networks or locations. But if you do go for static, you can edit your hosts file on devices. Include names and IP addresses of devices. Might not won't work for phones though, and probably no end of hassle to maintain - e.g. if you change an IP address for a device, you'll have to update all the hosts files.
Or get each to update something dyndns alike with the right details...
Which for a diverse system of devices (printer, nas, IP phones etc) may be difficult. Also, their hosts files may be different formats, different locations, different (or no) external access to them, (assuming that you were suggesting something updates the hosts files)
Investigate if your router can run a DNS server. If it can, you may be sorted. If it can't you might be able to install a new BIOS (or operating system) to a version that does - either a new one from the manufacturer, or something like DDWRT (or similar). DDWRT can run dnsmasq.
Most can, most also allow you to set the name at the router end and bind a specific mac to a specific IP.
If you can't get internal DNS on your router, you need to run a DNS server somewhere. For this you need a device that's on all the time. Presumably your Beaglebone Black is. Hopefully there's a version of dnsmasq for whichever OS it's running. Either
- configure dnsmasq to work without issuing dhcp addresses, DNS only. or
- Set up the router with a static IP address (it probably has one already)
Turn off DHCP on the router Set the Beaglebone Black to have a static IP address Install dnsmasq to do dhcp and dns. Investigate the DNSMASQ config file. Look for the examples in the file that lets you fill in MAC addresses and specify an IP address. This is how I do it e.g.
Or don't bother editing the dnsmasq config and edit /etc/ethers instead, which dnsmasq uses.
Interesting, never come across /etc/ethers before and my system doesn't have it.
I Live & learn! Steve