[Dnsmasq-discuss] When Client is set to DHCP
Mon, 29 Nov 2004 22:50:29 -0500
I take it that by "client" you mean the computer that is asking dnsmasq
for an IP address and not the computer on which dnsmasq is installed.
The scenario you describe, DNS resolution of a dynamically-assigned
address, is precisely what dnsmasq is best at. Two ways exist to get
the effect you want:
1. Configure on the client the DHCP 'host-name' option to whatever
hostname you want that client to be known as in dnsmasq. Some client
software seems to interchangeably refer to the host-name option as the
client ID option, although the two are different. The dnsmasq man page
refers to both the host-name option and the client-id option, and I
believe that they are handled differently. Simon or someone else,
however, would have to answer that question.
2. The dhcp-host configuration option in /etc/dnsmasq.conf can pair a
MAC address to a hostname using the following syntax:
dhcp-host=<MAC address>,<host name>,<lease time>
The lease time is optional, and the hostname should be just that, not
the FQDN foo.domain.com. There are many more parameters for the
dhcp-host statement; read the man page if you want to do more.
On Nov 29, 2004, at 9:15 PM, Kenyatta Senior wrote:
> Maybe I have it all wrong BUT how do i set up dnsmasq if my client is
> set for DHCP??? I can't add that particular machine in /etc/hosts.
> Since I won't know what IP it will be given.
> THe client gets an IP address... BUT i can't ping alpha. :-( Is there
> is settign in /etc/dnsmasq.conf that i'm missing?
> Only two things are infinite, the universe and human stupidty, and I'm
> not sure of the former.
> - Albert Einstein
> Dnsmasq-discuss mailing list