> Andrew Schulman wrote:
> >
> > The way I do it is to have my DHCP server tell my DNS server about its
> > leases and hostnames, then configure DNS to try to answer queries from DHCP
> > (as well as /etc/hosts) before resolving from the WAN.
> >
> > This is especially easy to do if you use dnsmasq for your DHCP and DNS
> > servers. dnsmasq is both servers, so DNS automatically knows all of the
> > DHCP leases, and resolves hostnames from them. You're done.
> >
> > Good luck,
> > Andrew.
> >
> > --
> > To reply by email, change "deadspam.com" to "alumni.utexas.net"
>
> Andrew, thank you.
>
> Actually, I don't have a DNS server in this home network. It's just a
> Belkin 4-port wireless router, which is DHCP server for the two
> machines, and it gets the DNS and IP settings automatically from my
> ISP.
>
> So, from my understanding, you don't need to add any lines in
> /etc/hosts of your myboxA (for example), with the DHCP and DNS
> configged correctly, am I right?
Right. But since you don't have that option with your router, maybe just a
simple static setup is best for you. You can configure your router to
assign fixed IP addresses to each of your two hosts, and then set up
/etc/hosts on each. That will work just fine, although you have to update
all of the /etc/hosts files if you ever add hosts to your LAN.
If you still want your hosts to get their IP addresses by DHCP (e.g. because
they're laptops and you want them to be able to grab IP addresses when you
take them on the road), then maybe you can configure your router's DHCP
server to assign some fixed IP addresses by DHCP. dnsmasq can do that, and
I don't know about the Belkin routers, but the Linksys routers run dnsmasq
under the hood.
--
To reply by email, change "deadspam.com" to "alumni.utexas.net"
|