Re: [Dnsmasq-discuss] unable to resolv hosts by name in my local network

2009-12-18 Thread Luca Postregna
Ok, this is true. But my question is different, i think.
If in /etc/hosts are present my hosts, with expandhost option in my dnsmasq
config, resolv by name work properly.
But I don't want to specify anything in /etc/hosts. I think that dnsmasq,
when one client get address, obtain all info (dhcp.leases) to permit itself
and other clients to resolv by name the new client, is it true?

LP



On Thu, Dec 17, 2009 at 11:02 PM, Rance Hall ran...@gmail.com wrote:

 On Thu, Dec 17, 2009 at 3:51 PM, Luca Postregna
 luca.postre...@gmail.com wrote:
  Is there a way to resolv by name the hosts of my network without modify
  /etc/hosts on the server or in the client?
  On the server in dhcp.leased I can read that my client send the hostname,
 is
  not that enough?
 
  Thanks, Luca.
 
 
  --
  http://www.infis.units.it/~lucapost/http://www.infis.units.it/%7Elucapost/
  Luca Postregna

 The clients that get dhcp addresses should already be able to resolv
 by name the other dhcp clients.  If this is not true, you have a
 problem and you need to fix that first.

 In order for the clients to resolv by name static ip machines, the
 server needs to know about them some way.

 typically this is with the /etc/hosts file, but IIRC dnsmasq has the
 ability to specify an additional/alternate /etc/hosts file.  this
 other file needs to be a properly formatted /etc/hosts file, it can
 just have another name.

 This should get your clients resolving the network correctly.

 The next thing you need to know about is if you want the dhcp server
 to resolv local names the same way the clients do.

 There is a way to configure this also.

 specify in your servers /etc/resolv.conf that the server should look
 at itself for name resolution, and then specify a second proper
 /etc/resolv.conf file for dnsmasq to use to get the rest of the net.

 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




-- 
http://www.infis.units.it/~lucapost/
Luca Postregna


Re: [Dnsmasq-discuss] unable to resolv hosts by name in my local network

2009-12-18 Thread Rance Hall
On Fri, Dec 18, 2009 at 3:31 AM, Luca Postregna
luca.postre...@gmail.com wrote:
 Ok, this is true. But my question is different, i think.
 If in /etc/hosts are present my hosts, with expandhost option in my dnsmasq
 config, resolv by name work properly.
 But I don't want to specify anything in /etc/hosts. I think that dnsmasq,
 when one client get address, obtain all info (dhcp.leases) to permit itself
 and other clients to resolv by name the new client, is it true?

 LP


snip

This is almost always true for cases when all clients that need to
resolv each others names are provided by the dhcp server.

You don't have to modify /etc/hosts if dhcp clients are all you have.


There are some common things that interfere with this basic status.

1) Some OSes (usually unix based) ship needing dhclient to be
configured to send a hostname with the dhcp request.  Windows does
this by default, but with *nix this is a configurable option.  NOT
sending the hostname with the dhcp request will cause name resolution
to fail for just these hosts.


2) Its possible (though I've only seen it happen once in my several
years of using dnsmasq) to get a corrupted dhcp.leases file.  If this
file is hosed then name resolution of dhcp clients can be broken
depending on the specific way the leases file gets hosed.

3) the wrong authoritative setting in dnsmasq.conf or another dhcp
server somewhere on your net that also thinks its authoritative.

There might be other off the wall things as well.

I refer you to my previous post, the behavior you desire is in my
view, default.  If you don't get it, there is something broken.  But
you need to do a better job of explaining what broken looks like for
you so we can help you figure out what to do about it.



[Dnsmasq-discuss] unable to resolv hosts by name in my local network

2009-12-17 Thread Luca Postregna
Is there a way to resolv by name the hosts of my network without modify
/etc/hosts on the server or in the client?
On the server in dhcp.leased I can read that my client send the hostname, is
not that enough?

Thanks, Luca.



-- 
http://www.infis.units.it/~lucapost/
Luca Postregna


Re: [Dnsmasq-discuss] unable to resolv hosts by name in my local network

2009-12-17 Thread Rance Hall
On Thu, Dec 17, 2009 at 3:51 PM, Luca Postregna
luca.postre...@gmail.com wrote:
 Is there a way to resolv by name the hosts of my network without modify
 /etc/hosts on the server or in the client?
 On the server in dhcp.leased I can read that my client send the hostname, is
 not that enough?

 Thanks, Luca.


 --
 http://www.infis.units.it/~lucapost/
 Luca Postregna

The clients that get dhcp addresses should already be able to resolv
by name the other dhcp clients.  If this is not true, you have a
problem and you need to fix that first.

In order for the clients to resolv by name static ip machines, the
server needs to know about them some way.

typically this is with the /etc/hosts file, but IIRC dnsmasq has the
ability to specify an additional/alternate /etc/hosts file.  this
other file needs to be a properly formatted /etc/hosts file, it can
just have another name.

This should get your clients resolving the network correctly.

The next thing you need to know about is if you want the dhcp server
to resolv local names the same way the clients do.

There is a way to configure this also.

specify in your servers /etc/resolv.conf that the server should look
at itself for name resolution, and then specify a second proper
/etc/resolv.conf file for dnsmasq to use to get the rest of the net.