Name resolution with unqualified names

Xen list at xenhideout.nl
Sun Nov 26 06:57:57 UTC 2017


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.




More information about the ubuntu-users mailing list