Not an answer, actually. - *Avoid multiple matches*. As explained in the 'scenario description', that's not possible in this case, but moreover, there might be other scenarios where it wouldn't be possible either.
- *My point of view: Each computer has a (dnsmasq) DNS entry, the entry gets in DNS by DHCP of dnsmasq*. What a computer is? the physical instance or the virtual one? the hardware or the software? This is the key to my scenario. And I totally agree with you: each computer should have one entry, the problem is the definition of 'each computer'. So, regardless of your opinion about the scenario being logical, making sense of being valid/invalid, the question stands: is there any way to define precedences for potentially multiple matches? Thanks. Jesus M Diaz On Sun, 20 Jun 2021 at 22:50, Geert Stappers via Dnsmasq-discuss < dnsmasq-discuss@lists.thekelleys.org.uk> wrote: > On Sun, Jun 20, 2021 at 08:58:59PM +0100, Jesus M Diaz wrote: > > Hello, > > > > Let me explain the scenario: > > > > - I have a number of computers acquiring IP-address by DHCP and I have > > dnsmasq configured with static leases for specific mac-addresses. > > - I also have a couple of virtual computers for very specific purposes > that > > I run from a live Linux distro from a USB drive. Physically I can run > them > > on any of my 'physical' computers. > > > > Now the problem and questions: > > > > - I configured the virtual-usb computers to present themselves with > > specific hostnames. > > OK > > > - I configured dnsmasq to assign an ip-address based on the hostname, and > > it works fine ... *IF AND ONLY IF* I don't have a specific mac-address > > based dhcp-host entry. > > OK > > > > Apparently when I have more than one dhcp-host entries matching the DHCP > > request, the mac-addr based one is the preferred one. I've tried > > configuring it in different order but always the mac-addr based is the > > chosen one. > > > > So, my question: > > is there any way to set up the precedence of the dhcp-host entry > > Triggered by "the dhcp-host entry", a snippet from manual page of dnsmasq: > > > dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][tag:<tag>][,<ipaddr>][,<hostname>] > > In other words: "the dhcp-host entry" has many many meanings. > > > > in case more than one match the DHCP request? > > What avoiding the multiple matches? > > > > And what is the actual problem? As in: Why the question? > > My point of view: > Each computer has a (dnsmasq) DNS entry, > the entry gets in DNS by DHCP of dnsmasq. > > > > Regards > Geert Stappers > > ADA coin wallet address > > > DdzFFzCqrhsmqj9cvCvEcpq7D97cqSVmKKB8wEAzyAxYP76PwhFZBi1qyz9e38heFdQ2twPhmaWusS2XogsBgz5Mx7DYxtN4W9TnPEPW > -- > Silence is hard to parse > > _______________________________________________ > 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 https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss