[Dnsmasq-discuss] Multiple MAC addresses in dhcp-host line

Simon Kelley simon at thekelleys.org.uk
Thu Dec 26 17:13:28 GMT 2013


On 26/12/13 08:13, John Hanks wrote:
> Hi,
>
> Short question: What is the maximum number of MAC addresses that can be
> present in a dhcp-host entry?
>
> Long explanation: I have a number of hosts which have multiple MAC
> addresses and are stateless between boots. They use PXE to get a kernel
> and initrd, then use dhclient to set up eth0, then pull a config script
> which determines vlans, bonding, etc., and restarts the network
> appropriately. This all works great with one caveat, on some hosts the
> network devices sometimes change order between reboots (udev seems to
> detect in parallel so it is a race to see who wins eth0) and while I can
> control the hardware so that only 1 interface will attempt to PXE, I
> have little control over whether or not that interface will be called
> eth0 by the kernel (short of customizing and initrd for each host, which
> I don't want to do). So I'd like to list all possible MAC addresses for
> the host in the dhcp-host entry. I haven't had any luck listing more
> than two mac addresses and have been working around this by rebooting in
> the case of the randomizing hosts and just using the two "best" macs for
> hosts that don't randomly change, but may change from kernel release to
> kernel release. It would be really handy if I could list many MAC
> addresses. I have currently have hosts with up to 8 nics.
>
> Thanks,
>
> jbh
>
>

Be aware that multiple MAC addresses in a single dhcp-host has different 
semantics to multiple dhcp-host lines, each with one MAC address but 
with the same IP address.

I'm not quite clear how your scheme works. Are you using all the 
ethernet interfaces on a host, each connected to a different network, or 
all connected to the same network?

Cheers,

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