You can create host records (in /etc/config/dhcp) with mac, ip and name
options and dnsmasq should use that to resolve DNS requests as well.

  https://openwrt.org/docs/guide-user/base-system/dhcp

An example in /etc/config/dhcp would look like this:

config host
     option mac xx:xx:xx:xx:xx:xx
     option ip 192.168.1.50
     option name myhostname

You can do as many as you want, and that should give you stable ip address
leases and hostname resolution.


On Fri, Mar 1, 2019 at 3:13 PM Dick Steffens <[email protected]> wrote:

> On 3/1/19 2:53 PM, Tomas Kuchta wrote:
> > If your router can answer dns request ( many routers run dnsmasq service
> )
> > then you could have local name resolution working on all machines just by
> > pointing to your router for Dns.
> >
> > If your router does that - just configure it that it hand out its own IP
> as
> > Dns during DHCP. You should also configure all the PCs not to change
> their
> > names by DHCP unless you want that. After that names should work for all
> > machines using DHCP for IP assignment.
> >
> > The advantage here is that you do not have to hand maintain list of all
> > your machines and their IPs on all host all the time. If you use DHCP IPs
> > change every time you reboot/update router.
>
> Sounds worthwhile. I do have a Buffalo router running OpenWRT, and I do
> have it set to always assign specific IP addresses based on the MAC
> address. I'll look into how to assign host names there. But since there
> are only four machines involved, I've already added the info to each
> hosts file, and it's doing what I want. It's not likely I'll be adding
> additional hosts anytime soon.
>
> Thanks.
>
> --
> Regards,
>
> Dick Steffens
>
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to