[TriLUG] Dnsmasq: Single Host with multiple IPs

Randy Barlow randy at electronsweatshop.com
Thu Mar 27 15:17:59 EDT 2008


So I took Alan's advice from a few weeks ago (directed at someone else) 
and set up Dnsmasq on my home network.  So far it's great, but I do have 
one question.  I've got dnsmasq set up to give some hosts the same IP 
and hostname, based on MAC.  The machine that's throwing me off is my 
laptop.  I like to plug it in to ethernet directly when it's on my desk 
(and I switch the wireless switch off to ensure that its default route 
goes through the wired network) and I use it wirelessly when I'm 
elsewhere in the house.

dhcp-host=MA:CW:IR:EL:ES:SS,laptop,192.168.1.136
dhcp-host=MA:CW:IR:ED:DD:DD,laptop,192.168.1.137

Now, I kind of expected the DNS server to hand out the IP of the MAC 
that most recently requested an IP, but it seems to always give the IP 
of the first entry (wireless).

An obvious possible solution would be to just give different host names 
for wired and wireless, but I was wondering if the collective genius of 
TriLUG knew of a Better Way (TM) to get the DNS resolution working using 
dnsmasq (I think my stomach is too weak right now for Bind :)

-- 
Randy Barlow
http://electronsweatshop.com



More information about the TriLUG mailing list