1

I run Raspberries on Jessie in a home network, with quite a bunch of devices. I know many machines by IP, but it is slowly getting harder to keep on top of things. I use one machine as a server (rpiserver): it does dnsmasq, squid, DHCP, syslog (for other machines), and think it can easily handle DNS as well... which in turn should give me more transparency in the network.

I own a domain on the Internet; say example.net, running www and mail.

  1. Do I need to make my home network domain part of this domain? E.g. home.example.net? There is no need I can think of that these two domains "talk to each other" or external access is required to a local machine.
  2. I am not too familiar with Linux, hence, I am wondering which files do I need to change to get this working?
  3. Do I need to update the DHCP config and add the machine names, and it populates the DNS, or does it go the other way around?
  4. Above all, is there a benefit running the local DNS for what I am describing?
  5. I'd like an automatic solution; maybe update one 'thing' to propagate or resolve to/for others.
  6. The router to the Internet does just that: WLAN/LAN routing; meaning I should be able to use dnsmasq, rather than setting up a DNS server?
  7. Would having a local domain prevent a mail error when root sends notifications from rpiserver, and there is no 'domain' part to this name?

Any help appreciated.

4
  • For a local home network, the easiest thing would be to just add all the hosts in everyone's /etc/hosts file.
    – Kusalananda
    Jul 16, 2016 at 7:36
  • @Kusalananda: the problem is, there are machines which do neither have a hosts file nor the capability to have one. E.g Arduinos running the Ethernet stack... they get an IP address from rpiserver, but it would be good, if I could add the Arduino's name somewhere. Would this be dnsmasq or DHCP, where I add this name?
    – MaxG
    Jul 16, 2016 at 9:07
  • Most of your questions are already answered here: How to make a machine accessible from the LAN using its hostname Jul 16, 2016 at 20:37
  • @Gilles: thank you for the link; I used this brilliant description and it works for me!
    – MaxG
    Jul 19, 2016 at 0:12

1 Answer 1

2

You say it runs dnsmasq. Apart from DHCP, that software already does DNS! Just edit your /etc/hosts on that machine, and it should work. There is certainly a benefit to using DNS for this; after all, that's what it was made for.

No, it will not work outside your network, unless you have an NS record at a higher zone. That's fine. As long as every host on your LAN uses your dnsmasq machine as their primary (or only) DNS server, you should be fine.

You don't have to make it part of a domain, but if you have one, it is good practice to do so.

Whether sending out mail will cause problems depends on many things. I suggest you try it out, and if it doesn't work, open a different question with some more details (it's really a completely different question, after all).

4
  • Edit /etc/hosts on THAT machine... is THAT the rpiserver running dnsmasq; where I need to enter all IP name matches?
    – MaxG
    Jul 16, 2016 at 9:15
  • Yes, on the machine that runs dnsmasq, obviously. Otherwise there's no way it could read it... Jul 16, 2016 at 9:16
  • Hmm, what happens to hosts that get their IP dynamically? The DHCP server would know the names of the permanent leases, but what about dynamic ones?
    – MaxG
    Jul 16, 2016 at 9:41
  • If the client sends a name to the DHCP server, that should work. Jul 19, 2016 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .