Name resolution with unqualified names

Kevin O'Gorman kogorman at gmail.com
Mon Nov 27 20:57:15 UTC 2017


On Sat, Nov 25, 2017 at 10:57 PM, Xen <list at xenhideout.nl> wrote:

> Kevin O'Gorman schreef op 26-11-2017 6:58:
>
> Finding all that to be somewhat less than immediately intelligible, I
>> anticipated a considerable learning curve.  Another approach occurred to
>> me.  Since all of the IP numbers are reserved, there's no need to get them
>> from a DNS server of any kind, or interfere with the organization of
>> /etc/resolv.conf.
>>
>> Also: /etc/hosts is still a file, and can hold this information.
>>
>> Accordingly, I'm working on scripts to gather and distribute the relevant
>> information in such a way that any future changes can be propagated quickly.
>>
>
> Well it's cool that you do your own thing.
>
> But let me condense the material then a bit.
>
> - dnsmasq is a DNS and DHCP server and is a very small program.
> - if you install it on one of your servers it can take over the job that
> the router is currently doing with regards to DNS and DHCP
>
> - every computer has a hostname
>
> - every computer that gets an IP through DHCP gives that hostname to the
> DHCP server.
>
> - the DHCP server can use this hostname to give a fixed IP address to the
> client.
>
> This was the:      dhcp-host=hostname,192.168.0.50       that I mentioned.
>
> (hostname == camelot)
>
>
>
> - dnsmasq takes all of the hostnames acquired from DHCP clients and puts
> them in a list.
>
> - this list is then used for DNS.
>
>
>
>
> So again if you care. This is the contents of your /etc/dnsmasq.conf if
> you were to go this "route" ;-).
>
> no-resolv
> expand-hosts
> domain-needed
> bogus-priv
> server=8.8.8.8                   <-- mentions the google DNS server but
> can be your router
> local=/local/                    <-- the local domain you want
> auth-zone=local
> domain=local,192.168.0.0/24      <-- specify which 10.0.0.0/8 network
> belongs to ".local"
> dhcp-option=option:router,192.168.0.1     <-- address your router has
> dhcp-range=192.168.0.100,192.168.0.199,12h    <-- DHCP range
>
> Replace 192.168.0.X with 10.0.0.X if you must.
>
> You would have immediate name resolution.
>
> But you would have to go to your router settings and turn off DHCP.
>
>
On reflection, I am not satisfied with this approach.  Since a large part
of my purpose was to understand my existing equipment, this is a bit like
sweeping the problem under the rug.  The thing I find hardest to understand
is that I have four desktops connected to the same switch, all running
Ubuntu or Xubuntu 16.04 LTS, pretty much the same way and getting their IPs
from the router through the switch.  So why do just two of them have
127.0.1.1 listed as its name resolver, and the others list the IP of the
router?

Come to that, how does it work for camelot's /etc/resolv.conf (actually
linked to /run/resolveconf/resolv.conf) list 127.0.1.1 as its resolver.
Plato's too.

On Camelot running Xubuntu and Plato running Ubuntu (both in desktop
versions), /run/resolveconf/resolv.conf is:
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.1.1

On gog and magog, running Ubuntu server 127.0.1.1 is replaced by an IP that
seems to be the router; at least pointing a browser at that IP gets me the
internal support page from the router.

Other oddities:
  gog and magog can find each other using nslookup(1), which reports using
the router as its server; neither one can find camelot or plato in that way
unless i add the parameter to make them use the router.
  camelot and plato cannot find each other or the other hosts by their
unqualified names using nslookup, which reports using 127.0.1.1

Camelot is running Xubuntu because I like the xfce desktop.  Plato is
running Ubuntu because it's still under warranty from System76 and that's
the OS it was supplied with.  Gog and magog are running server because I
only access them via SSH, and they don't need an X server for that.  None
of them is actually headless, but I spend my time on Camelot, and have a
workspace for each and 3 HD monitors to make each workspace big.  It just
happens the motherboard I last put into Camelot has 3 HD outputs, and I had
3 identical HD montiors.  Voila!

Now on reflection (a day later) there is one ray of hope.  The the two that
use the router for DNS are running Ubuntu server, and they are the ones
that behave as I would prefer -- able to discover eachother by their
unqualified names (I can't really give them qualified names anyway, because
I only have one externally visible IP address, or can I?).  I vaguely
remember that the server install had a bunch of extras, most of which I
declined.  I think one of them may have been a DNS server.  Seeing no need,
I declined.  Could it be that the desktop installs have a DNS server by
default and that the installed DNS server is exposing 127.0.1.1 and it is
inferior to the router or needs further configuration?

How do I test this idea?  How do I find out what software corresponds to
those options on installation?

-- 
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20171127/4816463c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20171127/4816463c/attachment.gif>


More information about the ubuntu-users mailing list