On Fri, May 20, 2005 at 02:40:49PM +0100, Martijn Koster wrote:
Chris Green wrote:
In general what do others here do about naming machines on a small SoHo LAN behind a router? Is there some accepted way of doing it?
I currently do mine like this:
- my domain greenhills.co.uk is public, and hosted on the internet
- my lan machines are e.g. grinder.home.greenhills.co.uk
- my main openwrt-based lan router runs dnsmasq (on its lan interface) and is configured to resolve *.home.greenhills.co.uk itself, and forward other queries to my isp
- home.greenhills.co.uk is not delegated; outsiders don't see it.
- my lan machines have "search home.greenhills.co.uk" in resolv.conf, so that "ssh grinder" works.
This configuration is relatively new, but appears to work fine. I hadn't used dnsmasq before, but it's nice. It also does dhcp on my lan.
This sounds something like where I want to be, however it does seem to be getting steadily more complicated which is why I originally stayed with /etc/hosts. It's easy enough using /etc/hosts, you edit one and copy it to the other two or three machines (or the same between Windows machines and LMHOSTS).
You said you use multiple ISPs, so that you have different upstream dns servers. In that situation I would:
- use a FORWARDONLY dnscache on your routers lan address, for use by
your lan machines
- run tinydns on 127.0.0.1 on your router, to serve names on your lan
- forward queries for your lan domain to tinydns
- forward other queries to your isp
- script your isp connection scripts to put the right values in dnscache/root/servers/@, then run svc -du to restart dnscache
You could achieve the same with dnsmasq: update dnsmasq.conf then restart it.
Remember my router is a small box made by Zyxel, not a Linux box.