[Dnsmasq-discuss] Assign IP range by hostname with wildcard

Christian Zenker christian.zenker at 599media.de
Tue Sep 4 09:51:52 BST 2012


Hi.

First of all: I have less than one day of experience with DHCP, so please forgive me if my terminology is a bit off or I do some terrible beginners mistake.
I'm trying to set up DHCP for our small company. This far everything worked really smoothly (thanks to dnsmasq), but I'm struggling with some minor issue:

I want to separate the dhcp ranges from the workstations from any other machines. As the workstations have a hostname naming scheme like "foobar-1", "foobar-2", etc. I thought it would be nice to work with wildcards, like:

dhcp-host=set:baz,foobar-*
dhcp-range=tag:baz,192.168.1.1,192.168.1.42,infinite
dhcp-range=tag:!baz,192.168.1.43,192.168.1.254,12h

But this is not a valid syntax. The extensive way

dhcp-host=set:baz,foobar-1
dhcp-host=set:baz,foobar-2
# [...]

works, but is not really nice and hard to maintain. Is there any way to use some kind of wildcard to keep the configuration short?

Christian Zenker.




More information about the Dnsmasq-discuss mailing list