There are much smarter people than me here, but if I might chime in: Two basic assumptions in networking are that no two separate devices will share the same MAC address, and a device's MAC address doesn't change after it's manufactured. Obviously there are practical exceptions (spoofing, privacy MAC addresses, etc.), but those are the assumptions we operate under (I think this is the real takeaway from the discussion about VMs). Meanwhile, no such assumptions can be made about hostnames.
So, from Dnsmasq's point of view, given conflicting configuration, it makes sense to always prefer the MAC address over the hostname, since it's a stronger identifier. Accordingly, if the assumption about MAC address <=> machine doesn't hold true in your environment, it seems to me the best option is probably to avoid using MAC addresses as machine identifiers at all. Can you set DHCP client IDs? Or use hostnames for the host machines' regular OSes as well? Alternatively, can you set up the live USBs to use custom MAC addresses, so the assumption does hold true? Regards, Nick On Mon, Jun 21, 2021, at 12:09 PM, Jesus M Diaz wrote: > I never talked of VM on purpose, because they are not VM (hence, no > hypervisor or any other controller plane). Indeed I talked of live linux > distributions running on USB that I only use for very specific tasks, and of > course, I run them over physical machines, but these physical machines are > usually running their own OS. > > But all this, imho, is not relevant at all, it was explained just to express > that *sometimes* it might happen that one DHCP request matches more than one > dhcp-host entry in the dnsmasq.con file. That is the only relevant situation, > and my question was: is there any way to set a precedence among the > potentially matching dhcp-hosts entries? > > I don't really understand why the philosophical discussion on what a computer > is or is not. > > Thanks anyway everybody for the comments. > > > On Mon, 21 Jun 2021 at 14:54, Alex Morris <dnsmasq-disc...@alexmorris.co.uk> > wrote: >> On Mon, 21 Jun 2021, at 13:42, Jesus M Diaz wrote: >> > >> > so, if I have two virtual computers running over the same hardware, >> > >> >> ...then your hypervisor ought to provide unique MAC addresses for each guest >> NIC. >> >> > >> > what should be used as identifier for dnsmasq? >> > >> >> The unique MAC address allocated by the hypervisor to the guest NIC. >> >> >> -- >> Alex >> >> _______________________________________________ >> Dnsmasq-discuss mailing list >> Dnsmasq-discuss@lists.thekelleys.org.uk >> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > <mailto:Dnsmasq-discuss%40lists.thekelleys.org.uk> > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss >
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss