access computer via name without editing hosts file?

Craig White craigwhite at azapple.com
Mon Dec 24 16:19:42 MST 2007


On Mon, 2007-12-24 at 15:32 -0700, Matrix Mole wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I've got a network of about 7 computers all running various OS'es (2
> gentoo, 3 mac, 1 slackware, 1 windows). Around 4-5 years ago when I
> first put this network together I was able to access any of the
> computers by their assigned computer name. For some reason when I
> performed a router bios upgrade (using a D-Link at the time) I lost that
> ability and from then on, was required to use either IP address or edit
> the hosts file on every computer. This became extremely frustrating
> when, for whatever reason, a computer would pull a different IP address
> from the router. At that time I just went into the router config and
> hard coded all the IPs so that I wouldn't have to worry about the
> changes and could keep my hosts files intact. Since then I've removed
> the router from the network, replacing it with my k6-2/350 Gentoo box.
> On the gentoo box I'm usin dnsmasq as my DNS forwarder/resolver for the
> network, along with acting as my DHCP server. I was under the impression
> from my reading of the dnsmasq man pages and tutorials that it would
> allow me to browse my local network via name resolution without
> requiring to manipulate the hosts file on my various computers, but no
> such luck. It appears that when I issue a request for a computer by
> name, the actual request never even goes out onto the network, it checks
> the local hosts file and if it's not there it merely spits back that the
> host does not exist. Is there some way to force the local machines to
> look at the DNS resolver on my router to get the IP of a computer based
> on it's name? Do I need to use machine.localnet or somesuch dot'ed
> notation to force it to look out on the network for the machine names?
----
the customary way of doing this would be to use say your Gentoo box to
run both a full DNS and DHCP server (the ISC versions) and to configure
DHCP to update DNS when it hands out an IP address.

The trick is not to just masquerade (or forward) all DNS requests but
rather create your own local domain (and reverse domain for finding
names from ip addresses) and have the DNS server handle those
authoritatively and merely serve as a caching server for everywhere
else.

Craig



More information about the PLUG-discuss mailing list