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

Re: DNS problem on local network



David Brodbeck on 06/08/07 19:11, wrote:
On Aug 6, 2007, at 10:50 AM, Adam Hardy wrote:

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

I'm trying to enable DNS on my internal network. I think you missed the first email I sent but this is one of the main symptoms:


isengard:~# hostname
isengard
isengard:~# hostname --fqdn
hostname: Unknown host
isengard:~# nslookup gondor
Server:         194.74.65.69
Address:        194.74.65.69#53

** server can't find gondor: NXDOMAIN

It seems to me that my internal network does not have domain configured properly and that this is causing dnsmasq to try to look it up on the internet, but I can't find any info on it.

On my dnsmasq/dhcp server, I can put the IP for the internal NIC into the /etc/hosts. However I can't do that for the DHCP clients. Perhaps this is purely down to a dnsmasq config issue but I think that it needs me to change something more basic such as the domain, to something like 'localdomain'.

Other symptoms include xfce showing this error:

Could not look up internet address for gondor. It may be possible to correct the problem by adding gondor to the file /etc/hosts.



Thanks
Adam



Reply to: