I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
At home I run dnsmasq but that's overkill for where I am now with just three or four devices on the LAN:-
root@acer-aspire:~# arp-scan -l Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.13.102 d0:ff:50:07:b7:96 (Unknown) 192.168.13.103 00:0c:43:4a:55:66 Ralink Technology, Corp. 192.168.13.100 00:21:04:f5:7c:a0 Gigaset Communications GmbH 192.168.13.254 10:fe:ed:50:8f:fa (Unknown)
So, I know that 192.168.13.100 is the Gigaset DECT phone but for the other three I'm stuffed. Surely there's supposed to be a way to know how to talk to these things! (One's a Beaglebone Black, two are TP-Link routers)
It can take a while guessing which is which and trying to ssh to them.
It's especially frustrating because I only see this for a few days every few months so I *don't* remember what's what and much of it is powered down so gets different IP addresses next time around. It's just not stable (as in the same all the time) enough to get the router to always assign the same IPs and it wouldn't help all that much anyway as I don';t remember after two months absence.
On 04/07/14 20:42, Chris Green wrote:
I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
At home I run dnsmasq but that's overkill for where I am now with just three or four devices on the LAN:-
root@acer-aspire:~# arp-scan -l Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.13.102 d0:ff:50:07:b7:96 (Unknown) 192.168.13.103 00:0c:43:4a:55:66 Ralink Technology, Corp. 192.168.13.100 00:21:04:f5:7c:a0 Gigaset Communications GmbH 192.168.13.254 10:fe:ed:50:8f:fa (Unknown)
So, I know that 192.168.13.100 is the Gigaset DECT phone but for the other three I'm stuffed. Surely there's supposed to be a way to know how to talk to these things! (One's a Beaglebone Black, two are TP-Link routers)
It can take a while guessing which is which and trying to ssh to them.
It's especially frustrating because I only see this for a few days every few months so I *don't* remember what's what and much of it is powered down so gets different IP addresses next time around. It's just not stable (as in the same all the time) enough to get the router to always assign the same IPs and it wouldn't help all that much anyway as I don';t remember after two months absence.
I'm sorry I don't know the answer to your question.
HOWEVER
The fact that you're struggling with it suggests to me that dnsmasq is *NOT* overkill!
Turn the devices on one at a time and work out which one's which. Note down the mac addresses for each - I doubt that the mac addresses will change. If all else fails, you have a list and it will save you time next time.
Install dnsmasc and put in some entries like dhcp-host=00:21:04:f5:7c:a0,DECT_phone,192.168.13.100
then you'll be able to address devices by a consistent name or a consistent ip address.
That's my 2p anyway. Good luck
Steve
On Fri, Jul 04, 2014 at 09:54:02PM +0100, steve-ALUG@hst.me.uk wrote:
On 04/07/14 20:42, Chris Green wrote: I'm sorry I don't know the answer to your question.
I don't know that there is one really! :-)
HOWEVER
The fact that you're struggling with it suggests to me that dnsmasq is *NOT* overkill!
Yes, but what do I run it on? I suppose that the BeagleBone can run it but then I have to turn off DHCP on the router, etc., etc. it all gets stupidly complicated for what is actually a trivial system.
Turn the devices on one at a time and work out which one's which. Note down the mac addresses for each - I doubt that the mac addresses will change.
They certainly shpuldn't!
If all else fails, you have a list and it will save you time next time.
Yes, though looking for things in a list of MAC addresses is hardly neat is it!
I just wonder what 'the man in the street' does in this situation?
On 05/07/14 12:55, Chris Green wrote:
On Fri, Jul 04, 2014 at 09:54:02PM +0100, steve-ALUG@hst.me.uk wrote:
HOWEVER
The fact that you're struggling with it suggests to me that dnsmasq is *NOT* overkill!
Yes, but what do I run it on? I suppose that the BeagleBone can run it but then I have to turn off DHCP on the router, etc., etc. it all gets stupidly complicated for what is actually a trivial system.
Yes, the BeagleBone sounds like the best thing. TBH, turning off the DHCP on the router should be trivial, and a one-off job. It should also be trivial to install and configure DHCP.
Yes, though looking for things in a list of MAC addresses is hardly neat is it!
<Cheeky>Which is why you get the computers to do it for you with DNSMasq</Cheeky>
I just wonder what 'the man in the street' does in this situation?
"The man in the street" uses Windows, which run all sorts of unnecessary services, and some that you may actually need. I think (I'm massively out of date with Windows), that it'll do DHCP, DNS, and is it WINS (Windows Internet Naming System) to work out machine names for you?
Seriously, it may be a little hassle to set it up initially (1/2 and hour?), but then it shouldn't be a problem ever again. Compare that with repeatedly not being able to remember which machine is which and what their IP addresses are. Which is better?
Good luck! Steve
On 04/07/14 20:42, Chris Green wrote:
I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
[SNIP]
I use dhcpd to assign persistent IP addresses by MAC Address to devices I need to know about. I also have a numbering convention as follows:
a.b.c.1 - a.b.c.199 Workstations etc a.b.c.200 - a.b.c.219 Printers a.b.c.220 - a.b.c.229 Miscellaneous ie. routers a.b.c.230 - a.b.c.249 Servers a.b.c.250 - a.b.c.253 DNS servers (if separate) a.b.c.254 Gateway/Firewall/Router
I allow "guest" devices, mainly phones, laptops etc., to be given any address in the .1-.199 range as I don't care about them.
Cheers, Laurie.
On Sun, Jul 06, 2014 at 01:36:52PM +0100, Laurie Brown wrote:
On 04/07/14 20:42, Chris Green wrote:
I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
[SNIP]
I use dhcpd to assign persistent IP addresses by MAC Address to devices I need to know about. I also have a numbering convention as follows:
a.b.c.1 - a.b.c.199 Workstations etc a.b.c.200 - a.b.c.219 Printers a.b.c.220 - a.b.c.229 Miscellaneous ie. routers a.b.c.230 - a.b.c.249 Servers a.b.c.250 - a.b.c.253 DNS servers (if separate) a.b.c.254 Gateway/Firewall/Router
Yes, I guess that's one way to do it. At least then the devices (e.g. printer, BeagleBone and second router) will always have the same IP address and I can either remember them or write them down.
However it would still be nicer to be able to say 'ssh bbb' to connect to the BeagleBone rather than 'ssh 192.168.1.100', apart from anything else it's generally easier to type a text string than a series of digits and dots.
On 04/07/14 20:42, Chris Green wrote:
I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
At home I run dnsmasq but that's overkill for where I am now with just three or four devices on the LAN:-
root@acer-aspire:~# arp-scan -l Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.13.102 d0:ff:50:07:b7:96 (Unknown) 192.168.13.103 00:0c:43:4a:55:66 Ralink Technology, Corp. 192.168.13.100 00:21:04:f5:7c:a0 Gigaset Communications GmbH 192.168.13.254 10:fe:ed:50:8f:fa (Unknown)
So, I know that 192.168.13.100 is the Gigaset DECT phone but for the other three I'm stuffed. Surely there's supposed to be a way to know how to talk to these things! (One's a Beaglebone Black, two are TP-Link routers)
It can take a while guessing which is which and trying to ssh to them.
It occurred to me after reading Laurie's post, are you certain that the router doesn't do dns locally. Even if it doesn't, I'm fairly sure most routers will be able to allocate specific IP addresses for a specific mac address. If you did this, you'd just have a number to remember for each important device e.g. with a base address of 192.168.13. you could have important ip addresses grouped together e.g. .1 Router 1 .2 Router 2 .3 Beaglebone and addresses you don't need to know (dect phone?) higher up .100 Dect phone
Any use?
On Mon, Jul 07, 2014 at 09:32:37AM +0100, steve-ALUG@hst.me.uk wrote:
On 04/07/14 20:42, Chris Green wrote:
I know, I've been here before, but it's bitten me again. With most modern routers/switches not providing local DNS how is one supposed to find out who's who on a small LAN?
At home I run dnsmasq but that's overkill for where I am now with just three or four devices on the LAN:-
root@acer-aspire:~# arp-scan -l Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.13.102 d0:ff:50:07:b7:96 (Unknown) 192.168.13.103 00:0c:43:4a:55:66 Ralink Technology, Corp. 192.168.13.100 00:21:04:f5:7c:a0 Gigaset Communications GmbH 192.168.13.254 10:fe:ed:50:8f:fa (Unknown)
So, I know that 192.168.13.100 is the Gigaset DECT phone but for the other three I'm stuffed. Surely there's supposed to be a way to know how to talk to these things! (One's a Beaglebone Black, two are TP-Link routers)
It can take a while guessing which is which and trying to ssh to them.
It occurred to me after reading Laurie's post, are you certain that the router doesn't do dns locally. Even if it doesn't, I'm fairly sure most routers will be able to allocate specific IP addresses for a specific mac address. If you did this, you'd just have a number to remember for each important device e.g. with a base address of 192.168.13. you could have important ip addresses grouped together e.g. .1 Router 1 .2 Router 2 .3 Beaglebone and addresses you don't need to know (dect phone?) higher up .100 Dect phone
That "router doesn't do dns locally" is where I came in. Most routers of a few years ago *did* do local DNS but none seem to nowadays.
As you say most do allow one to assign fixed IPs to specific MAC addresses and that helps a bit, but as I said to Laurie it's *much* easier to type 'ssh bbb' than 'ssh 192.168.1.102'.
Yes, I could script the ssh connection but I use my laptop in several locations each of which has two or three things I want to connect to and hard-coding all that isn't ideal.
On 08/07/14 13:56, Chris Green wrote:
[SNIP] together e.g.
That "router doesn't do dns locally" is where I came in. Most routers of a few years ago *did* do local DNS but none seem to nowadays.
As you say most do allow one to assign fixed IPs to specific MAC addresses and that helps a bit, but as I said to Laurie it's *much* easier to type 'ssh bbb' than 'ssh 192.168.1.102'.
Yes, I could script the ssh connection but I use my laptop in several locations each of which has two or three things I want to connect to and hard-coding all that isn't ideal.
You probably need this:
http://en.wikipedia.org/wiki/Dnsmasq http://www.thekelleys.org.uk/dnsmasq/doc.html
I use dhcpd & djbdns here, but I also use dnsmasq on the firewall to control the IP addresses of the DMZ, which internally need to be RFC compliant, but externally have "proper" IP addresses. I've never used its other capabilities, but it looks ideal for you.
Cheers, Laurie.
On Tue, Jul 08, 2014 at 02:36:30PM +0100, Laurie Brown wrote:
On 08/07/14 13:56, Chris Green wrote:
[SNIP] together e.g.
That "router doesn't do dns locally" is where I came in. Most routers of a few years ago *did* do local DNS but none seem to nowadays.
As you say most do allow one to assign fixed IPs to specific MAC addresses and that helps a bit, but as I said to Laurie it's *much* easier to type 'ssh bbb' than 'ssh 192.168.1.102'.
Yes, I could script the ssh connection but I use my laptop in several locations each of which has two or three things I want to connect to and hard-coding all that isn't ideal.
You probably need this:
http://en.wikipedia.org/wiki/Dnsmasq http://www.thekelleys.org.uk/dnsmasq/doc.html
I use dhcpd & djbdns here, but I also use dnsmasq on the firewall to control the IP addresses of the DMZ, which internally need to be RFC compliant, but externally have "proper" IP addresses. I've never used its other capabilities, but it looks ideal for you.
I already use dnsmasq at home, it's excellent.
I could use it at one of the locations I'm talking about as there's a BeagleBone Black there that could happily run dnsmasq.
However other locations don't have anything to run dnsmasq on. It can't be run on the laptop that I carry around as there wouldn't be any DHCP except when the laptop was there.
On 08/07/14 15:12, Chris Green wrote:
[SNIP]
I already use dnsmasq at home, it's excellent.
I could use it at one of the locations I'm talking about as there's a BeagleBone Black there that could happily run dnsmasq.
However other locations don't have anything to run dnsmasq on. It can't be run on the laptop that I carry around as there wouldn't be any DHCP except when the laptop was there.
Ok, static IP by MAC address and custom entries in the hosts file sounds the way to go here...
Cheers, Laurie.
On 8 July 2014 15:24, Laurie Brown laurie@brownowl.com wrote:
Ok, static IP by MAC address and custom entries in the hosts file sounds the way to go here...
You beat me to saying the same thing: surely a good old fashioned hosts file solves this?
Also, I haven't tried this but I would imagine that there's nothing stopping the real hosts file being stored in (eg) Dropbox and /etc/hosts just being a symlink to it, making it easy to synchronise between systems if you need to.
On Wed, Jul 09, 2014 at 10:14:02AM +0100, Mark Rogers wrote:
On 8 July 2014 15:24, Laurie Brown laurie@brownowl.com wrote:
Ok, static IP by MAC address and custom entries in the hosts file sounds the way to go here...
You beat me to saying the same thing: surely a good old fashioned hosts file solves this?
Not really. My hosts file (on the laptop I carry from place to place) would have to have entries for all the devices at every location.
This would mean that I'd have to firstly think of different names for the same router in different places (yes, I do have the same model of router in more than one place) and secondly I'd have to make sure that the DHCP server in each location used a different range of addresses to make sure that there are no clashes. (I suppose I could make the routers at different locations have the same IP address but 'this way lies madness')
Also, I haven't tried this but I would imagine that there's nothing stopping the real hosts file being stored in (eg) Dropbox and /etc/hosts just being a symlink to it, making it easy to synchronise between systems if you need to.
I think you'd find that would produce all sorts of weird errors at boot time.
Top posting a initial thoughts: 1) Can you flash your routers and install something like DDWRT that can run DNSMasq? 2) Get another router that does do DNS for the 3rd problem location (without any on-site processor) 3) Get a low cost low power device for the problem site. A Raspberry Pi perhaps? 4) Examine "Zero Config" networking, AVAHI on Linux. I don't know much about this. Will this work for you?
On 09/07/14 11:29, Chris Green wrote:
On Wed, Jul 09, 2014 at 10:14:02AM +0100, Mark Rogers wrote:
On 8 July 2014 15:24, Laurie Brown laurie@brownowl.com wrote:
Ok, static IP by MAC address and custom entries in the hosts file sounds the way to go here...
You beat me to saying the same thing: surely a good old fashioned hosts file solves this?
Not really. My hosts file (on the laptop I carry from place to place) would have to have entries for all the devices at every location.
Yes it would. So?
This would mean that I'd have to firstly think of different names for the same router in different places
Names can easily be of the format Location Device or Device Loction e.g. HomeRouter, OfficeRouter, BoatRouter. Not a big problem I suspect.
(yes, I do have the same model of router in more than one place)
Well if it is the same, is there scope for, rather than having ranges, assign IP addresses on the router by mac address. Backup the configuration and restore it to the other routers.
and secondly I'd have to make sure that the DHCP server in each location used a different range of addresses to make sure that there are no clashes.
Yes you would. It'd take a couple of minutes.
<SNIP>
So either 1) Each router doles out IP addresses based on Mac addresses. Each router has a range of IP addresses that doesn't overlap with other locations. One hosts file on your laptop that lists all the IP addresses and friendly names for them. Zero cost. A bit tedious to set up, but shouldn't take too long or be too hard to maintain.
2) Run DNSMasq everywhere. Quite easy to set up, with possibly the cost of one processing device to run it on. Simple to maintain.
3) See if Avahi/Zero Config will do it for you
4) do 1) but without the hosts file. Maintain a manual list of IP addresses and refer to it.
5) Do nothing and put up with not knowing which IP address each device has, except by trail and error.
6) Run something like nmap or nbtscan or other tool listed here http://manpages.ubuntu.com/manpages/saucy/man1/nbtscan.1.html to work out which IP address is which.
Good luck Steve
On Wed, Jul 09, 2014 at 12:19:17PM +0100, steve-ALUG@hst.me.uk wrote:
So either
- Each router doles out IP addresses based on Mac addresses. Each
router has a range of IP addresses that doesn't overlap with other locations. One hosts file on your laptop that lists all the IP addresses and friendly names for them. Zero cost. A bit tedious to set up, but shouldn't take too long or be too hard to maintain.
Yes, tedious, I was looking/hoping for something simpler.
- Run DNSMasq everywhere. Quite easy to set up, with possibly the
cost of one processing device to run it on. Simple to maintain.
See if Avahi/Zero Config will do it for you
do 1) but without the hosts file. Maintain a manual list of IP
addresses and refer to it.
- Do nothing and put up with not knowing which IP address each
device has, except by trail and error.
- Run something like nmap or nbtscan or other tool listed here
http://manpages.ubuntu.com/manpages/saucy/man1/nbtscan.1.html to work out which IP address is which.
This last is what I do at present really, a combination of nmap and arp-scan.
On 9 July 2014 11:29, Chris Green cl@isbd.net wrote:
I think you'd find that would produce all sorts of weird errors at boot time.
I don't see why it would; the file would be there at boot time (albeit not the latest copy if you've made changes and Dropbox hasn't sync'd them yet), and there's no reason why you can't edit the file after booting (changes take effect immediately, albeit that applications frequently cache DNS results).
A bit of clever scripting might even allow you to pull in a different hosts file depending on something location specific (eg the IP address you've received via DHCP), generating the link to the appropriate hosts file in a network startup script. That might accommodate some of your other concerns.
Mark
On Tue, Jul 08, 2014 at 01:56:41PM +0100, Chris Green wrote:
That "router doesn't do dns locally" is where I came in. Most routers of a few years ago *did* do local DNS but none seem to nowadays.
I'm amazed you're finding routers that don't do DNS, I'm sure that every router I've seen in recent years does do DNS. Failing that just pay a few quid and buy something cheap that will run openwrt and let you run dnsmasq for each network.
I bought a TP-Link MR3020 recently for under £20, slapped openwrt on it and took it with me for a 10 day business trip so I had my own access point and DNS (and other nice network things) in my hotel room, if you buy one of these for each network you will be able to setup working DNS.
Failing that a more fully featured TP-Link that will run OpenWrt should not be more than £40-£50 and use that to replace your existing router. If you need something that does ADSL then you should be able to run your ADSL router in bridge mode.
Adam
On Thu, Jul 10, 2014 at 05:01:46PM +0100, Adam Bower wrote:
On Tue, Jul 08, 2014 at 01:56:41PM +0100, Chris Green wrote:
That "router doesn't do dns locally" is where I came in. Most routers of a few years ago *did* do local DNS but none seem to nowadays.
I'm amazed you're finding routers that don't do DNS, I'm sure that every router I've seen in recent years does do DNS. Failing that just pay a few quid and buy something cheap that will run openwrt and let you run dnsmasq for each network.
Well lets see:-
Daytek Vigor 2820n - no DNS TP-Link TL-WR743ND - no DNS TP-Link TL-WA7210N - no DNS TP-Link TL-WA5210N - no DNS Solwise 434T 3G router - no DNS (not absolutely sure on this one) Tenda W311R+ - no DNS
I bought a TP-Link MR3020 recently for under £20, slapped openwrt on it and took it with me for a 10 day business trip so I had my own access point and DNS (and other nice network things) in my hotel room, if you buy one of these for each network you will be able to setup working DNS.
Failing that a more fully featured TP-Link that will run OpenWrt should not be more than £40-£50 and use that to replace your existing router. If you need something that does ADSL then you should be able to run your ADSL router in bridge mode.
By 'no DNS' I mean that the router doesn't provide the names registered by DHCP clients. They mostly 'do DNS' in the sense that they will forward DNS requests upstream and will cache DNS but that's not a lot of use for local names.
On Thu, Jul 10, 2014 at 05:37:44PM +0100, Chris Green wrote:
Well lets see:-
Daytek Vigor 2820n - no DNS TP-Link TL-WR743ND - no DNS TP-Link TL-WA7210N - no DNS TP-Link TL-WA5210N - no DNS Solwise 434T 3G router - no DNS (not absolutely sure on this one) Tenda W311R+ - no DNS
OK, maybe I should have been more clear, I am surprised that you are finding routers that do not do local DNS if you need this feature.
By 'no DNS' I mean that the router doesn't provide the names registered by DHCP clients. They mostly 'do DNS' in the sense that they will forward DNS requests upstream and will cache DNS but that's not a lot of use for local names.
Yes, I know, you already explained that. Why don't you just acquire some hardware or routers with the features that you require? Or as has been suggested use a hosts file.
In fact your assertion that you can't use a hosts file because you have the same router in multiple locations is very likely false unless you have purchased some really rubbish routers. If you assign the local IP range at each location to a different network, so 192.168.100.X/24 in one place and then 192.168.101.X/24 in another place and so on and then give everything a static lease via the DHCP server in each location. Then you can have a hosts file with all the entries in and it won't matter as they'll all be on different subnets.
Adam
On Thu, Jul 10, 2014 at 08:58:55PM +0100, Adam Bower wrote:
On Thu, Jul 10, 2014 at 05:37:44PM +0100, Chris Green wrote:
Well lets see:-
Daytek Vigor 2820n - no DNS TP-Link TL-WR743ND - no DNS TP-Link TL-WA7210N - no DNS TP-Link TL-WA5210N - no DNS Solwise 434T 3G router - no DNS (not absolutely sure on this one) Tenda W311R+ - no DNS
OK, maybe I should have been more clear, I am surprised that you are finding routers that do not do local DNS if you need this feature.
The Draytek Vigor provides load balancing and is one of the very few ADSL routers that provides this at a semi-reasonable price.
The TP-Link TL-WA7210N and TL-WA5210N are both 'High Power Wireless Access Points" and again there are few if any reasonably priced alternatives. The Solwise 3G router doesn't get used much now (hence why I'm not sure about its DNS abilities).
I could buy a cheap alternative for the Tenda router.
I think most of the ways of identifying local devices have been pretty well aired now! Thanks everyone for all your input, it has provided me with various ideas and possible strategies.