Jeremy Nicoll wrote: > Thanks to everyone who replied, not just Dan... > > So... > > On Mon, 19 Feb 2018, at 13:30, Dan Purgert wrote: >> Jeremy Nicoll wrote: > >> > What, on a home LAN, is that used for? >> >> In general terms, supplying domain information at setup time adds a >> "helper" record to /etc/resolv.conf (or whatever RH, Windows, etc. >> uses). Note that if you use DHCP, this step is usually skipped, as the >> DHCP server provides the information. > > On a Win8.1 system, ipconfig /all does show me a hostname (the same > value as %COMPUTERNAME%) which happens to be a combination of the > machine's manufacturer name, and model > > There's no domain value at all, though DHCP is in use... but I suppose I > configured the DHCP server (in the router/switch) and maybe left fields > blank there...
Yep, it's because your DHCP server does not have anything set. I should've said something more like "if you're setting a host to use DHCP, the setup assumption is that the DHCP server will provide it". Of course, it is not a requirement that the DHCP server provide this information. > > >> In short, the "helper" record appends the domain name to a hostname, so >> you don't have to type out a FQDN when you're trying to get to a remote >> host. > > Do you mean when someone outside the LAN is trying to connect to my > machine? I'd assume that makes sense only on a corporate / company > LAN with a static IP gateway address and that address would be defined > in DNS matching the company's domain name... and - if that's right - I > can see that telling each pc on the LAN that it's part of the company's > domain makes sense... No, I mean for your own local network. It's so that when you're on the LAN, you can just connect to a host by its name. It doesn't help at all off the local network. Say your "domain name" is cybertron.net and you have three hosts - OptimusPrime, Bumblebee, and Ironhide. Normally, if you wanted to ping one of them, you'd have a command along the lines of "ping Ironhide.cybertron.net" ... kind of a lot of typing, so you can add the "helpers" which lets you simply use a hostname in your commands -- "ping Ironhide". > > > Other than that, opinion seems divided on whether for a home LAN it > makes more sense to leave domain name unset, or to provide a value > (picked carefully, perhaps ending ".test" or ".invalid"). In some ways > I like the idea of providing a planned/known name, if only because I'd > recognise it for what it is if I saw it in error messages, logs etc in > future. If you're going to set up a local domain, double-check the RFCs for reserved / allowed to use without registration TLDs -- and make sure you're checking CURRENT docs (stff like "*local" used to be allowed, but now it's set for mDNS / bonjour / avahi). Or pay $15 for a year (ish) and get yourself your own registered domain, and don't worry about it getting changed somewhere down the line. > > I almost wonder if, to avoid any potential name conflict, one would be > sensible to register a domain, and then NOT have it point at one's own > home LAN - because unless a dynamic DNS service is used, how could > one keep that uptodate (my cable internet ISP does change my WAN > ip address occasionally) - and use its name on the home system. But > then again that might have unintended consequences. > That's what I do (except I do also pay for ddns, because I use my domain name for simple things with friends / family). The real killer is paying for TLS certs, though perhaps this year I'll move everything to Let's Encrypt. -- |_|O|_| Registered Linux user #585947 |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5 4AEE 8E11 DDF3 1279 A281