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

Re: DNS problem on local network




On Aug 6, 2007, at 10:50 AM, Adam Hardy wrote:
Please send us your /etc/hosts file.  Every box needs a minimal
/etc/hosts file with at least its own hostname (though I'v never used
DHCP).  The box running dnsmasq should have all the hosts on your
network listed in /etc/hosts for dnsmasq to read.

adam@gondor:~$ cat /etc/hosts
127.0.0.1       localhost localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

So I should put gondor in there on the same line as the localhost?

And on the dnsmasq box it's the same. I can enter the IP address of the box's NIC on the internal network into /etc/hosts because it's fixed, but all the DHCP clients?

If the machine has a fixed IP, you want that on the /etc/hosts line for its name, generally speaking. Putting it on the same line as 127.0.0.1 can confuse some software.

So if you have a machine named foo.bar.net with an IP of 192.168.127.50, the /etc/hosts entry would look like this:

192.168.127.50	foo.bar.net foo

This associates the names "foo.bar.net" and "foo" with that IP.

I'm not entirely clear on what you're trying to do, but dnsmasq can probably serve DNS records for your DHCP clients if you configure it properly. If you explain a little more what you're trying to do and what's not working I might be able to help more.





Reply to: