Product SiteDocumentation Site

10.7.2. Konfigurieren

Die ersten Elemente, die in der Konfigurationsdatei des DHCP-Servers (/etc/dhcp/dhcpd.conf) editiert werden müssen, sind der Domain-Name und die DNS-Server. Falls dieser Server im lokalen Netzwerk der einzige ist (in Übereinstimmung mit der Broadcast-Einstellung), muss die Anweisung authoritative ebenfalls aktiviert (oder auskommentiert) sein. Außerdem muss ein subnet-Abschnitt erstellt werden, der das lokale Netzwerk und die bereitzustellenden Konfigurationsinformationen beschreibt. Das folgende Beispiel passt zu einem lokalen 192.168.0.0/24-Netzwerk mit einem als Gateway dienenden Router an 192.168.0.1. Verfügbare IP-Adressen liegen im Bereich von 192.168.0.128 bis 192.168.0.254.
Beispiel 10.14. Auszug aus der Datei /etc/dhcp/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#

# 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 interim;

# option definitions common to all supported networks...
option domain-name "internal.falcot.com";
option domain-name-servers ns.internal.falcot.com;

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;

# My subnet
subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    range 192.168.0.128 192.168.0.254;
    ddns-domainname "internal.falcot.com";
}