1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# Sample configuration file for ISC dhcpd for Debian 3*4882a593Smuzhiyun# 4*4882a593Smuzhiyun# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $ 5*4882a593Smuzhiyun# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun# The ddns-updates-style parameter controls whether or not the server will 8*4882a593Smuzhiyun# attempt to do a DNS update when a lease is confirmed. We default to the 9*4882a593Smuzhiyun# behavior of the version 2 packages ('none', since DHCP v2 didn't 10*4882a593Smuzhiyun# have support for DDNS.) 11*4882a593Smuzhiyunddns-update-style none; 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun# option definitions common to all supported networks... 14*4882a593Smuzhiyunoption domain-name "example.org"; 15*4882a593Smuzhiyunoption domain-name-servers ns1.example.org, ns2.example.org; 16*4882a593Smuzhiyun 17*4882a593Smuzhiyundefault-lease-time 600; 18*4882a593Smuzhiyunmax-lease-time 7200; 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun# If this DHCP server is the official DHCP server for the local 21*4882a593Smuzhiyun# network, the authoritative directive should be uncommented. 22*4882a593Smuzhiyun#authoritative; 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun# Use this to send dhcp log messages to a different log file (you also 25*4882a593Smuzhiyun# have to hack syslog.conf to complete the redirection). 26*4882a593Smuzhiyunlog-facility local7; 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun# No service will be given on this subnet, but declaring it helps the 29*4882a593Smuzhiyun# DHCP server to understand the network topology. 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun#subnet 10.152.187.0 netmask 255.255.255.0 { 32*4882a593Smuzhiyun#} 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun# This is a very basic subnet declaration. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun#subnet 10.254.239.0 netmask 255.255.255.224 { 37*4882a593Smuzhiyun# range 10.254.239.10 10.254.239.20; 38*4882a593Smuzhiyun# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; 39*4882a593Smuzhiyun#} 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun# This declaration allows BOOTP clients to get dynamic addresses, 42*4882a593Smuzhiyun# which we don't really recommend. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun#subnet 10.254.239.32 netmask 255.255.255.224 { 45*4882a593Smuzhiyun# range dynamic-bootp 10.254.239.40 10.254.239.60; 46*4882a593Smuzhiyun# option broadcast-address 10.254.239.31; 47*4882a593Smuzhiyun# option routers rtr-239-32-1.example.org; 48*4882a593Smuzhiyun#} 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun# A slightly different configuration for an internal subnet. 51*4882a593Smuzhiyun#subnet 10.5.5.0 netmask 255.255.255.224 { 52*4882a593Smuzhiyun# range 10.5.5.26 10.5.5.30; 53*4882a593Smuzhiyun# option domain-name-servers ns1.internal.example.org; 54*4882a593Smuzhiyun# option domain-name "internal.example.org"; 55*4882a593Smuzhiyun# option routers 10.5.5.1; 56*4882a593Smuzhiyun# option broadcast-address 10.5.5.31; 57*4882a593Smuzhiyun# default-lease-time 600; 58*4882a593Smuzhiyun# max-lease-time 7200; 59*4882a593Smuzhiyun#} 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun# Hosts which require special configuration options can be listed in 62*4882a593Smuzhiyun# host statements. If no address is specified, the address will be 63*4882a593Smuzhiyun# allocated dynamically (if possible), but the host-specific information 64*4882a593Smuzhiyun# will still come from the host declaration. 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun#host passacaglia { 67*4882a593Smuzhiyun# hardware ethernet 0:0:c0:5d:bd:95; 68*4882a593Smuzhiyun# filename "vmunix.passacaglia"; 69*4882a593Smuzhiyun# server-name "toccata.fugue.com"; 70*4882a593Smuzhiyun#} 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun# Fixed IP addresses can also be specified for hosts. These addresses 73*4882a593Smuzhiyun# should not also be listed as being available for dynamic assignment. 74*4882a593Smuzhiyun# Hosts for which fixed IP addresses have been specified can boot using 75*4882a593Smuzhiyun# BOOTP or DHCP. Hosts for which no fixed address is specified can only 76*4882a593Smuzhiyun# be booted with DHCP, unless there is an address range on the subnet 77*4882a593Smuzhiyun# to which a BOOTP client is connected which has the dynamic-bootp flag 78*4882a593Smuzhiyun# set. 79*4882a593Smuzhiyun#host fantasia { 80*4882a593Smuzhiyun# hardware ethernet 08:00:07:26:c0:a5; 81*4882a593Smuzhiyun# fixed-address fantasia.fugue.com; 82*4882a593Smuzhiyun#} 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun# You can declare a class of clients and then do address allocation 85*4882a593Smuzhiyun# based on that. The example below shows a case where all clients 86*4882a593Smuzhiyun# in a certain class get addresses on the 10.17.224/24 subnet, and all 87*4882a593Smuzhiyun# other clients get addresses on the 10.0.29/24 subnet. 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun#class "foo" { 90*4882a593Smuzhiyun# match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; 91*4882a593Smuzhiyun#} 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun#shared-network 224-29 { 94*4882a593Smuzhiyun# subnet 10.17.224.0 netmask 255.255.255.0 { 95*4882a593Smuzhiyun# option routers rtr-224.example.org; 96*4882a593Smuzhiyun# } 97*4882a593Smuzhiyun# subnet 10.0.29.0 netmask 255.255.255.0 { 98*4882a593Smuzhiyun# option routers rtr-29.example.org; 99*4882a593Smuzhiyun# } 100*4882a593Smuzhiyun# pool { 101*4882a593Smuzhiyun# allow members of "foo"; 102*4882a593Smuzhiyun# range 10.17.224.10 10.17.224.250; 103*4882a593Smuzhiyun# } 104*4882a593Smuzhiyun# pool { 105*4882a593Smuzhiyun# deny members of "foo"; 106*4882a593Smuzhiyun# range 10.0.29.10 10.0.29.230; 107*4882a593Smuzhiyun# } 108*4882a593Smuzhiyun#} 109