[Dnsmasq-discuss] Multiple MAC addresses for a single IP

Simon Kelley simon at thekelleys.org.uk
Wed Jan 24 11:58:41 GMT 2007


Pedro Côrte-Real wrote:
> I use dnsmasq on my opernwrt router and my standard linux server. Both
> serve IPs to my laptop that has both wireless and wired interfaces. I
> wanted to receive the same IP on both interfaces so I added both mac
> addresses with the same IP to /etc/ethers. Dnsmasq doesn't like this
> and ignores one of them.
> 
> I used to do this with dhcpd and it should be perfectly valid. The
> only problem is what happens if for some reason both mac addresses ask
> for an IP. In that case it would be good to be able to force the
> previous lease to end. This can only happen when changing between
> wireless and wired. The older lease shouldn't be in use anymore.
> 
> Any reason why this isn't implemented like this?

The reason for that test is because otherwise the DHCP server can get
into an infinite protocol loop: When one of the MAC addresses asks for
an address, it gets offered the correct address. but when it confirms
that address, it gets thown out, because the address is reserved for a
MAC address which is different (ie the other MAC address.) Repeat
indefinitely. I don't know how ISC dhcpd deals with this: maybe by not
allowing reserved addresses in the address range allowed for dynamic
allocation.

The fix for this is to configure the client to send the same client-id
from both interfaces, and associate the IP address with the client-id.
Client-ids trump MAC addresses for tracking clients, so dnsmasq will
treat the laptop as the same machine no matter which interface it uses.
There's a section in the FAQ which covers exactly this.

Cheers,

Simon.


> 
> Greetings,
> 
> Pedro.
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list