Hi Dan, On Sat, Apr 16, 2016 at 11:56:11PM -0700, Dan Hitt wrote: > On Sat, Apr 16, 2016 at 10:42 PM, Andy Smith <a...@strugglers.net> wrote: > > What doesn't work about it? > > It has no effect. > > So, if i do > ping second_host > i get "unknown host" from ping.
OK. So all the hosts on your local network are getting .local as a domain name by suggestion of the DHCP server, but do you have a DNS server anywhere that is serving those names, or are you putting everything in /etc/hosts? I have done some tests on my own machines and I find that if I add "local." to my search line in /etc/resolv.conf it does seem to generate a DNS query for whatever.local. I do not have a DNS server that is serving the .local zone though, so it gives me NXDOMAIN. Of course if I would add google.com to my search list then a query for say, "mail" would turn into "mail.google.com" and I'd get an answer. So I wonder how your DNS is set up. If you are relying on the ISP-supplied router to serve DNS for names it is giving out by DHCP, well, some would and some wouldn't. You could check by running DNS diagnostic tools such as "dig" against the IP address of your router, e.g.: dig -t a second-host.local @192.168.0.1 where "second-host.local" is what you want to look up, "192.168.0.1" is the IP address of your router and the "-t a" is asking for answers of type A: IPv4 address. If that gave an NXDOMAIN answer then there isn't any configuration mistake on your side, it's just that your router is not acting as a DNS server for that zone. (By the way, underscores are not permitted in Internet host names, so your "first_host" and "second_host" examples are not good, but I am guessing they were merely examples.) > Given this, is there any way to change the network's name? Although .local is reserved for mDNS, I think that unless you actually use mDNS you should be okay. As I say, I put ".local" in my search list and then saw DNS queries going out for those names so it probably doesn't interfere with (normal, unicast) DNS. > Is there any way to reload the dhclient.conf file without restarting dhclient? These settings only take effect when you get a new lease or renew an existing one. So I think the answer is no. Is getting a new lease problematic? Normally on a DHCP network you don't tend to care if your IP address changes… (if you do care, you can get the DHCP server to give you the same one each time, but in your case that'd be a setting in the router which you don't manage). > This seems perplexing to me, because i'm not unhappy with any of the > ips i'm getting, i just want to be able to refer to hosts by shorter names. The issue is that these are different concepts and different services here, although they seem related and in your case are being provided by the same black box. The black box tells you your IP address and your host name and your domain name, so it seems logical that it should be able to also serve DNS for that zone, but it is not always the case. Cheers, Andy -- http://bitfolk.com/ -- No-nonsense VPS hosting