<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hi,</div>
<div> </div>
<div>I am trying to automate the addition of hosts and subnets into dhcpd, is it possible to do something like</div>
<div> </div>
<div># cat /usr/local/etc/dhcpd.conf</div>
<div>authoritative;</div>
<div> </div>
<div># Subnet Declaration</div>
<div>include "/usr/local/etc/dhcpd.conf_subnet";</div>
<div> </div>
<div># Client Declaration</div>
<div>include "/usr/local/etc/dhcpd.conf_static";</div>
<div> </div>
<div><font face="Times New Roman, serif" size="3"><b>dhcpd.conf_subnet</b></font></div>
<div><font face="Times New Roman, serif" size="3">allow unknown-clients;</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3">subnet 10.45.192.0 netmask x.x.x.x{</font></div>
<div><font face="Times New Roman, serif" size="3">option broadcast-address x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option domain-name-servers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option domain-name "atx711vm2.ericsson.com.";</font></div>
<div><font face="Times New Roman, serif" size="3">option ntp-servers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option routers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">}</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3">subnet 10.42.33.0 netmask x.x.x.x{</font></div>
<div><font face="Times New Roman, serif" size="3">option routers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option broadcast-address x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option domain-name-servers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3">option domain-name "sken.com";</font></div>
<div><font face="Times New Roman, serif" size="3">}</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"><b>dhcpd.conf_static</b></font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3">host RBS4 {</font></div>
<div><font face="Times New Roman, serif" size="3">option dhcp-client-identifier "RBS4";</font></div>
<div><font face="Times New Roman, serif" size="3"> fixed-address 10.45.192.4;</font></div>
<div><font face="Times New Roman, serif" size="3"> option tftp-server-name "x.x.x.x";</font></div>
<div><font face="Times New Roman, serif" size="3"> option bootfile-name "/WRAN/test.xml";</font></div>
<div><font face="Times New Roman, serif" size="3"> }</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3">host RBS4TEST {</font></div>
<div><font face="Times New Roman, serif" size="3">option dhcp-client-identifier "RBS4TEST";</font></div>
<div><font face="Times New Roman, serif" size="3"> fixed-address 10.42.33.76;</font></div>
<div><font face="Times New Roman, serif" size="3"> option tftp-server-name "x.x.x.x";</font></div>
<div><font face="Times New Roman, serif" size="3"> option bootfile-name "/WRAN/test.xml";</font></div>
<div><font face="Times New Roman, serif" size="3"> option ntp-servers x.x.x.x;</font></div>
<div><font face="Times New Roman, serif" size="3"> option time-offset 2555034;</font></div>
<div><font face="Times New Roman, serif" size="3"> }</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3">Or do each static address need to be declared within the subnet declaration</font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div><font face="Times New Roman, serif" size="3"> </font></div>
<div> </div>
</font>
</body>
</html>