[Dnsmasq-discuss] Give ip for client only if mac and hostname are specific one

Simon Kelley simon at thekelleys.org.uk
Fri Nov 1 13:48:22 GMT 2013

On 31/10/13 23:07, Beat Meier wrote:
> Thanks Simone this works!
> I'm trying to go to the perfect solution :-) so I have still a question.
> Is there a possibility to get the boolean OR operation with tags?
> I give for a mac and hostaname some ip
> For the same mac with other hostname an other ip
> And for the rest I want normal dhcp operations...
> dhcp-match=set:hostname1-ok,12,laptop
> dhcp-mac=set:mac1-ok,XX:2e:5f:81:XX:XX
> tag-if=set:host1-ok,tag:hostname1-ok,tag:mac1-ok
> tag-if=set:host1-mac-only,tag:!hostname1-ok,tag:mac1-ok
> dhcp-range=tag:host1-ok,,
> dhcp-range=tag:host1-mac-only,,
> Now how can I to a tag which is set if one of this tags above are set?
> As I see tag-if does set tag only if all tags are set and I want
> set a tag if host1-ok is set OR host1-mac-only is set ...
> so I can use this tag for normal operations or is there an other solutions?
De-Morgan's theorem to the rescue!

A OR B == NOT ( (NOT A) AND (NOT B) )

dhcp-range=tag:!host1-mac-only,tag:!host1-ok,<normal address  range>



> Thanks a lot
> Beat
> _______________________________________________
> 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