|
#
|
|
# This is configuration file for ISC dhcpd for Debian, generated by Freenetis
|
|
#
|
|
|
|
# The ddns-updates-style parameter controls whether or not the server will
|
|
# attempt to do a DNS update when a lease is confirmed. We default to the
|
|
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
|
# have support for DDNS.)
|
|
ddns-update-style none;
|
|
|
|
# option definitions common to all supported networks...
|
|
|
|
option domain-name-servers <?php echo implode(", ", $result->dns_servers) ?>;
|
|
|
|
default-lease-time 600;
|
|
max-lease-time 7200;
|
|
|
|
# If this DHCP server is the official DHCP server for the local
|
|
# network, the authoritative directive should be uncommented.
|
|
authoritative;
|
|
|
|
# Use this to send dhcp log messages to a different log file (you also
|
|
# have to hack syslog.conf to complete the redirection).
|
|
log-facility local7;
|
|
|
|
# No service will be given on this subnet, but declaring it helps the
|
|
# DHCP server to understand the network topology.
|
|
|
|
<?php foreach ($result->dhcp_servers as $dhcp_server): ?>
|
|
# <?php echo $dhcp_server->name ?>
|
|
subnet <?php echo $dhcp_server->network ?> netmask <?php echo $dhcp_server->netmask ?>
|
|
{
|
|
option subnet-mask <?php echo $dhcp_server->netmask ?>;
|
|
option broadcast-address <?php echo $dhcp_server->broadcast ?>;
|
|
option routers <?php echo $dhcp_server->gateway ?>;
|
|
<?php foreach ($dhcp_server->ranges as $range): ?>
|
|
range <?php echo $range->start ?> <?php echo $range->end ?>;
|
|
<?php endforeach ?>
|
|
option domain-name-servers <?php echo implode(", ", $dhcp_server->dns_servers) ?>;
|
|
|
|
<?php foreach ($dhcp_server->hosts as $host): ?>
|
|
# <?php echo text::cs_utf2ascii(text::object_format($host, $host->comment)) ?>
|
|
host host_<?php echo $host->id ?>
|
|
{
|
|
hardware ethernet <?php echo $host->mac ?>;
|
|
fixed-address <?php echo $host->ip_address ?>;
|
|
}
|
|
|
|
<?php endforeach ?>
|
|
}
|
|
|
|
<?php endforeach ?>
|
|
|