[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Domain question



On Thu, 14 Jul 2005, Rob Brenart wrote:

John Hasler wrote:

I don't really care yet about any kind of centralized user management or
whatnot, what I care about is for the machines to be able to see each
other by machinename...


You can put the name and IP of every machine into /etc/host on every other
machine, or you can install a dhcp server on one of them.


right now I have to go by IP, which aren't reserved so it's kind of a
pain.


There are IP ranges reserved specifically for LANs such as yours.  Use
numbers in the 192.168.xxx.xxx or 10.xxx.xxx.xxx ranges.

To the first point, I'm already running a DHCP server with no reservations... so using a hosts file doesn't work out, as when the laptops come and go I have no promise they'll come back with the same IP. To the second point, it's exactly the last .xxx which is my problem, as it's not steady, I'm already working in just 192.168.1.x


Well you have several options. If your DHCP server is a Debian (or Linux) box then you can install the dnsmasq package which will act as a local DNS server and provide DNS services to your local machines. It will learn the hostname/IP address mapping of your local machines from the DHCP server. I used this for years when I had a Debian box as a router for my home network, it was easy to set up and worked very well (and I still wish I was doing it this way).

But if (like me now), you have one of those little turn-key routers (Netgear, Linksys, etc.) that is acting as your DHCP server, you can configure it to provide static IP addresses through DHCP to each host so essentially you have a fixed IP addr/hostname mapping for each machine that you can put into your /etc/hosts file. Or, you can just configure the machines that are always on your home LAN to have static addresses and not even do DHCP. I like the static DHCP option for things like laptops that travel to different networks, but the best option depends upon your usage.



Reply to: