[Dnsmasq-discuss] Multiple host names (CNAME-ish behavior)

Simon Kelley simon at thekelleys.org.uk
Fri Dec 22 21:36:48 GMT 2006

Joshua J. Kugler wrote:
> I found this post in the archives:
> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2006q4/000942.html
> But it doesn't solve my issue.
> I'd like to be able to assign aliases to hostnames in dhcp.  So, if I have a 
> machine that registers itself as host1, I then want to be able to do lookups 
> with the names host2, host3, etc.  Kind of like an /etc/hosts file, but 
> instead of an IP column it has a "actual host name" column.  The post to 
> which I linked above requires the machine to have a static IP, and I want to 
> avoid that if possible, even if I'm only "binding" to the MAC and doing 
> static DHCP.
> Any way to do this?

The post you reference is about the best you can do, but it does doesn't 
  require a static IP, ie the host doesn't have to know it's IP address. 
In the example, the host knows its name, and dnsmasq uses that to assign 
the IP address by DHCP. If you want to use the MAC address instead, just 
add that to the dhcp-host line.

/etc/hosts:   studio.internal    studio ads db images boatertalk tys


That implements binding the MAC and doing static IP - what you want.

If you like, you can put the name<->MAC mapping in /etc/ethers instead 
(you have to enable reading /etc/ethers in /etc/dnsmasq.conf)


00:11:22:33:44:55	studio



> j

More information about the Dnsmasq-discuss mailing list