Live data from Hacker News

What domain name to use for your home network

ctrl.blog

161–170 of 174 posts

Re: What domain name to use for your home network

#161
post #145

Earlier quoted context omitted.

So you don't need to memorize and hard-code IP addresses for your network services. * router.home.arpa * nas.home.arpa * printer.home.arpa * htpc.home.arpa

Yes, but that can be achieved by using a hostname alone (router, nas, printer, htpc...). What does the domain bring?

How, exactly, is that hostname being resolved, though? There is no magical protocol to resolve TLD-less hostnames in DNS. Your router probably adds entries for `hostname.dhcp-domain` but since `dhcp-domain` is empty, you end up with just `hostname`. No, go ahead and name a device `com` and see what happens. Your router will have a hard time resolving `example.com`. This is why you put your stuff behind apurpose-built TLD like `home.arpa.`

Re: What domain name to use for your home network

#162

Earlier quoted context omitted.

Why is a local domain useful? I mean, what's wrong with your local machines having only a hostname with no domain at all?

I haven't seen many real world software supports lookup remote with a hostname, probably windows itself is the only one that I have seen? Meanwhile, url is almost the universal way for lookup remote machine (besides, of course, IP).

That's what mDNS (multicast-DNS) is for (mentioned in the article as the reason to never use .local as a DNS TLD because that conflicts with mDNS). The old Windows hostname lookup is predecessor of modern mDNS, but surprisingly Windows was one of the slowest to adopt modern mDNS. (In part because Microsoft backed a competitor named PNRP: they thought it would be great to have a Distributed Hash Table [DHT] as the data store for hostname lookup rather than just relying on pure "dumb" multicast shouting for anyone on the local segment who can here it. It wasn't a bad idea but managing DHTs is complex and mDNS was a simpler standard.)

At this point almost every major OS (including Windows 10 after the right feature update) mDNS mostly just works out of the box: ask for somehostname.local and if a system responds "oh, that's my hostname" things mostly just work. (mDNS was once called "Bonjour" if that helps connect the dots on what it is and how long many OSes have supported it.)

So don't use .local for DNS and mDNS works fine in so many cases these days you don't really need set a DNS for your local systems anyway. (Though if you do want a setup, I think this article is correct and home.arpa is the safest option available. .lan is also a bad idea because it isn't RFC protected and could be bought by someone as gTLD just as Google bought .dev.)

Re: What domain name to use for your home network

#163
post #55

Earlier quoted context omitted.

Read the article. Don’t use .local (except for mDNS.)

They don't give a reason. I don't believe the author. I think it will not only technically work fine, but it's a good idea and better than using what the author suggests.

They do give a reason: mDNS is a standard that was assigned .local. mDNS is useful for a number of reasons. (One of its original codenames was "Bonjour" if that helps connect the dots on how old mDNS is at this point.)

It's not worth the effort to break mDNS because lots of apps can use mDNS, it's a useful standard. In fact, in many LANs today (on modern operating systems inc. relatively recent versions of Windows 10 as Microsoft was one of the last to adopt mDNS) mDNS does almost everything people would want DNS to do in LAN scope anyway and you could get away with not assigning any local DNS and just using mDNS services.

Re: What domain name to use for your home network

#164
post #161

Earlier quoted context omitted.

Yes, but that can be achieved by using a hostname alone (router, nas, printer, htpc...). What does the domain bring?

How, exactly, is that hostname being resolved, though? There is no magical protocol to resolve TLD-less hostnames in DNS. Your router probably adds entries for `hostname.dhcp-domain` but since `dhcp-domain` is empty, you end up with just `hostname`. No, go ahead and name a device `com` and see what happens. Your router will have a hard time resolving `example.com`. This is why you put your stuff behind apurpose-built…

In some cases today that hostname is being resolved via mDNS, which is a good reason to get into the habit of using .local for mDNS addresses. Using somehostname.local on many OSes today forces DNS lookups to always and only use mDNS and avoids accidentally calling DNS. (So long as you don't break mDNS support on your local network by doing something like trying to use .local for traditional DNS.)

mDNS is probably sufficient for most people and you don't need to setup old school DNS on a local network. (But if you do, a purpose-built TLD like home.arpa is a good choice.)

Re: What domain name to use for your home network

#165
post #80

Earlier quoted context omitted.

> the original owner/ responsible PoC left long ago "Person of Colo(u)r"?

Point of Contact

Ah, thanks (both of you). Yeah, I'd seen that before, recognise it now that you mention it. But it had completely slipped my mind, so I really couldn't fathom what skin colour had to do with this.

Re: What domain name to use for your home network

#166
post #84

Earlier quoted context omitted.

Give your local box a static IP from a LAN range, give it a name in .local or .lan domain, and you're likely fine. The more interesting stuff begins when you want several boxes, and also your laptops, phones, tablets, etc to form a reasonable LAN, while accessing the internet. Bonus points for remote access to your LAN from outside it using your laptop or phone. Etc, etc.

Why is a local domain useful? I mean, what's wrong with your local machines having only a hostname with no domain at all?

If you want to protect a webserver inside your home (which seems like a good idea in 2021), you're going to need SSL -- and that requires a domain.

Self signed ssl certs were kinda a solution to this -- and then were largely rejected as being absolutely "insecure" because they, well, were absolutely insecure.

Re: What domain name to use for your home network

#167
post #70

No mention of .internal https://datatracker.ietf.org/doc/html/draft-wkumari-dnsop-in... (Though maybe it's not a great name for this particular application, it seems to make a lot of sense for enterprise level infrastructure)

That's an Internet Draft, not a standard or even at least a published RFC. An Internet Draft cannot be used Internet-Drafts as reference material or cited as anything other than "work in progress." There are some more reserved domains in RFC 6761 ( https://datatracker.ietf.org/doc/html/rfc6761 ) though: - .test (Application software SHOULD NOT recognize test names as special, and SHOULD use test names as they would o…

> Users may assume that IPv4 and IPv6 address queries for localhost names will always resolve to the respective IP loopback address.

Is the RFC assuming that there is only one loopback address for each protocol? That may be true for IPv6, but in IPv4 the entire 127.0.0.0/8 range is reserved for loopback. You can bind services to addresses anywhere in that range ("ip addr add 127.0.0.100/8 dev lo; nc -l 127.0.0.100 1234") which can only be accessed through that specific loopback address. So is this saying that .localhost domains must always resolve to some loopback address in IPv4 queries, or to 127.0.0.1 in particular?

There was a proposal to do something similar for IPv6 (using a 1::/32 prefix[0]) but it doesn't seem to have advanced much since 2013.

[0] https://tools.ietf.org/id/draft-smith-v6ops-larger-ipv6-loop...

Re: What domain name to use for your home network

#168
post #71

Earlier quoted context omitted.

It is quite easy, the original owner/ responsible PoC left long ago, or the email goes to an barely read inbox/ group or bounces completely. If a task only recurs less frequently like say every 3-5 years, it is more likely to be forgotten it is the same whether it is individual or companies.

If that person leaves or the notifications are ignored that would happen with any method that involves any interaction whatsoever. At a certain point someone has to take some amount of responsibility for this, and if they don't it's going to fail _eventually_.

True, there is onus is on the organization to setup processes to handle all this. However it is not all that surprising these things gets missed , like i said if the process is not repeated frequent enough any organization memory is likely to loose track of it . no different from human memory really.

Re: What domain name to use for your home network

#169
post #5

> Do not use undelegated domain names like .lan, .home, .homenet, .network, nor should you make up your own domain name. ...why? My DNS server, my rules, no? Why should I feel obligated to follow ICANN? Obviously, I'll need to make changes if someone ever registers the domain with ICANN (and I want to access the ICANN version), but other than that...

The issue here being: what happens when you have your proxy configured as "proxy.lan" but you make a typo when entering it in local DNS or in your browser settings? That DNS request for "proxy.lan" will now go all the way out to the root servers for every page load, multiple times. Not so important for you with your 200 tabs open, but quite important to the people maintaining the root servers who see a significant pe…

If you want to be a polite DNS resolver operator, root servers from B to G allow zone transfer, so you can just host the root zone locally. This way none of the typos or other bogus requests will leave your network.

Re: What domain name to use for your home network

#170
post #125

What method are people using to configure this oin their own network? The router supplied by my ISP doesn't support using a custom DNS server like a pihole, unfortunately. I don't consider using /etc/hosts a longterm worthwhile solution. I'd love to find another useful way of setting this up.

Does your router support disabling DHCP? You can just run your own DHCP server in that case.

That's what I do, even though I run my own router. The pi-hole acts as both DNS and DHCP.

It sets the DNS domain correctly via DHCP, unlike a lot of routers.

Post reply on HN