How is one supposed to use a LAN with a mixed collection of 'things' on it such that you can actually connect to them without simply guessing their addresses?
I have just arrived on our boat in France where we have a TP-link WA5210 WiFi box connection to the local WiFi hotspot, on the 'local' side it uses 192.168.13.x. Then there's a standard domestic WiFi router whose WAN is 192.168.13.x hard-wired to the WA5210 that provides WiFi and wire ethernet within the boat.
On the boat there's the following:- My Acer Aspire netbook Seimens C475IP 'gigiaset' VOIP phones A Beaglebone Black computer nmiontoring various things An Android tablet (or two) Sometimes an HP printer
So it all works from the 'client' point of view in that I can use the iternet from my netbook, the phones work, my wife can read and send E-Mail from her tablet, etc.
However it's a total disaster if I want to connect from one system to another. How am I suppsed to find the address of, for example, the Beaglebone Black? Why do routers seem to have forgotten the ability to register names when DHCP clients come along? OK, with just four or five systems I can just try them all but it's a bit crude and painful. Once you get to ten or more it's hopeless.
It's why I run dnsmasq on a server on my LAN at home, all my systems (well, nearly all, one insists on being anonymous) have 'names', what an amazing concept!
On 30/04/14 20:54, Chris Green wrote:
How is one supposed to use a LAN with a mixed collection of 'things' on it such that you can actually connect to them without simply guessing their addresses?
I have just arrived on our boat in France where we have a TP-link WA5210 WiFi box connection to the local WiFi hotspot, on the 'local' side it uses 192.168.13.x. Then there's a standard domestic WiFi router whose WAN is 192.168.13.x hard-wired to the WA5210 that provides WiFi and wire ethernet within the boat.
On the boat there's the following:- My Acer Aspire netbook Seimens C475IP 'gigiaset' VOIP phones A Beaglebone Black computer nmiontoring various things An Android tablet (or two) Sometimes an HP printer
So it all works from the 'client' point of view in that I can use the iternet from my netbook, the phones work, my wife can read and send E-Mail from her tablet, etc.
However it's a total disaster if I want to connect from one system to another. How am I suppsed to find the address of, for example, the Beaglebone Black? Why do routers seem to have forgotten the ability to register names when DHCP clients come along? OK, with just four or five systems I can just try them all but it's a bit crude and painful. Once you get to ten or more it's hopeless.
It's why I run dnsmasq on a server on my LAN at home, all my systems (well, nearly all, one insists on being anonymous) have 'names', what an amazing concept!
Well....
A DHCP server (Dynamic Host Configuration Protocol) basically just doles out IP addresses and maintains a list of who asked for it when. This is tied up with MAC addresses.
A DNS (Domain Name System) server is the thing that works out what things are called within your LAN. If your devices are named, then it will associate names with IP addresses and allow you to connect by name rather than IP address.
(I think in a Windows system, WINS is used to work out naming as well, but we're not windows here are we...)
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. [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.
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.
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 1) configure dnsmasq to work without issuing dhcp addresses, DNS only. or 2) 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.
#WIFI Router dhcp-host=00:11:22:33:44:01,MyRouterName,192.168.1.1
#Printer dhcp-host=00:11:22:33:44:02,MyPrinterName,192.168.1.2
#Beaglebone Black dhcp-host=00:11:22:33:44:03,Beaglebone,192.168.1.3
#Phones dhcp-host=00:11:22:33:44:04,Phone1Name,192.168.1.10 dhcp-host=00:11:22:33:44:05,Phone2Name,192.168.1.11
If you do this, then you should have names working correctly.
Also, you should be able to use this approach to name the anonymous device on your other network.
Hope that helps. Steve
On Thu, May 01, 2014 at 12:57:44AM +0100, steve-ALUG@hst.me.uk wrote:
A DHCP server (Dynamic Host Configuration Protocol) basically just doles out IP addresses and maintains a list of who asked for it when. This is tied up with MAC addresses.
A DNS (Domain Name System) server is the thing that works out what things are called within your LAN. If your devices are named, then it will associate names with IP addresses and allow you to connect by name rather than IP address.
Yes, I know that (I do run dnsmasq at home to do both these things), what I want to know is how one deals with the reality of what happens with the 99% of domestic routers nowadays that don't seem to provide local DNS.
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
They used to once upon a time, most 'early' ADSL routers *were* local DNS servers as well. I have a couple of old ones that do this.
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
Yes, running dnsmasq on the BBB is a possibility, but I still don't understand how the non-techie sort of person is supposed to deal with 2 printers, a Siemens Gigaset, a NAS backup, etc. on their home network.
It was more of a rant than a request for help - sorry! :-)
On 01/05/14 09:43, Chris Green wrote: [SNIP]
Yes, running dnsmasq on the BBB is a possibility, but I still don't understand how the non-techie sort of person is supposed to deal with 2 printers, a Siemens Gigaset, a NAS backup, etc. on their home network. It was more of a rant than a request for help - sorry! :-)
Well most (typoed that as "moist" the first time!) will be using Windows. The last time I used Windows regularly, the situation was this (NB This may be out of date now).
Windows tends to run WINS and or DNS on all machines, so as soon as you turn one on it interrogates the local network to find out is there's a DNS server there. If there's not, the machine says "Right, I'll do it".
As an aside, sometimes I used to get into situations where there were machines that though they were in charge, that they were the "browse master", and then one of them would force an "election" to decide who won. This would inevitable result in loss of routing until they agreed. This is how I found out about this!
So on a typical system, DHCP on the router will dole (sp) out the IP addresses and a windows machine will take note of the names, and what each machine thinks it should be called. Generally, it's only a PC that might want to access things by name anyway, so most things will "Just Work" (for some value of just work).
A non-techie person might get the printer and the NAS set up, but may have to assign static IP addresses to them. They might just about get the phones working too. They will rely on the instructions which will be simple enough to follow, or they'll get their techy mate in to do it, or phone a helpline or get a shop or engineer to help.
We (non Windows-ey folks) will tend to get a harder time because the instructions don't cater for us, we're not blessed/cursed with windows machines running UPnP, DNS, WINS and every other service under the sun just in case something needs it - we have to install and configure them ourselves.
</My 2p*>
Steve
* which as it's been adjusted for inflation, now, in real terms would be worth about the same as a grain of flavouring left over in the dust at the bottom of a discarded packet of dry roasted peanuts.
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.
[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...
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.
Cheers,
On Thu, May 01, 2014 at 01:00:39PM +0100, Brett Parker wrote:
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.
Well that's not been my experience with all of my recent routers, none have run DNS, all they do is forward DNS to the upstream server.
On 01 May 13:35, Chris Green wrote:
On Thu, May 01, 2014 at 01:00:39PM +0100, Brett Parker wrote:
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.
Well that's not been my experience with all of my recent routers, none have run DNS, all they do is forward DNS to the upstream server.
Them "not running it" and them "not giving you an easy view of it" are different things, even the supplied plus.net ADSL router I got had an evil DNS server on it. The config for it, however, was best done over telnet with a lot of patience.
And forwarding DNS is still an operation for a DNS server, dear, pure forwarding is, indeed, a very simplistic DNS server, but one all the same.
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
On 01/05/2014 13:00, Brett Parker wrote:
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.
That's exciting, how do I find out if my router's doing this and what the .lan bit is? No mention of that sort of thing in its Web UI. I can see it's picked up device names in the DHCP section and it has indeed set itself as the local DNS server.
Maybe one day they might even merge the DHCP and Wifi whitelist MAC address lists!
RE what Steve was saying about Windows, it seems certain DOS commands (e.g. ping) also use WINS/NETBIOS broadcasts to do IP lookups so anything that has Samba in it might appear resolvable from them.
Cheers Neil
On 01 May 15:18, Neil Sedger wrote:
On 01/05/2014 13:00, Brett Parker wrote:
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.
That's exciting, how do I find out if my router's doing this and what the .lan bit is? No mention of that sort of thing in its Web UI. I can see it's picked up device names in the DHCP section and it has indeed set itself as the local DNS server.
Well, what's the router? There's bound to be a default domain setup for it, some abuse .local which is wrong.
Maybe one day they might even merge the DHCP and Wifi whitelist MAC address lists!
RE what Steve was saying about Windows, it seems certain DOS commands (e.g. ping) also use WINS/NETBIOS broadcasts to do IP lookups so anything that has Samba in it might appear resolvable from them.
You'll find a lot of modern systems also use mdns, which is multicast dns, each machine advertises itself. avahi-utils is quite handy.
Thanks,