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

Pedro Côrte-Real pedro at pedrocr.net
Wed Jan 24 13:00:26 GMT 2007


On 1/24/07, Simon Kelley <simon at thekelleys.org.uk> wrote:
> 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.

My dynamic allocation range doesn't include the fixed addresses. If
that's enough it would be great to be able to do it.

> 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.

Yes I've seen this way of doing it. The problem is that it requires
client config. But fif it's the only way I'll do it like that.

Thanks,

Pedro.



More information about the Dnsmasq-discuss mailing list