Compressed Config

Claus Holm Christensen iscdhcp at claushc.dk
Tue May 13 20:15:33 UTC 2008


Todd Snyder skrev:
> Given the sameness of all the subnets, is there a clever way to define
> these so each one isn't declared?  Something similar to the $GENERATE
> directive in named?  It seems like a lot of work when you have hundreds
> of the exact same lines, except 2 numbers changing ...

The easy solution is probably to use a system like IPplan 
<http://sourceforge.net/projects/iptrack/> to handle all your addresses. 
It can mark subnets for DHCP, and export an XML file, which can be 
converted to a configuration file for DHCPd with XSLT.

I'm running something like 700 subnets and three /18 networks in that 
way, and so far I have found it to be extremely useful.

> I'm not fond of the number of lines in the above - my understanding is
> that I could do this as well:
> 
> Subnet 172.25.1.0 netmask 255.255.255.0 { range 172.25.1.16
> 172.25.1.254; option routers 172.25.1.1; }; 
 >
> And define the rest of the options as a more global scope ... Am I
> mistaken?

Correct, just write the other options outside the subnet definition, 
then they will be the default settings for the subnets.


-- 
Claus Holm Christensen


More information about the dhcp-users mailing list