12ee67178SXianjun Jiao# 22ee67178SXianjun Jiao# Sample configuration file for ISC dhcpd for Debian 32ee67178SXianjun Jiao# 42ee67178SXianjun Jiao# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as 52ee67178SXianjun Jiao# configuration file instead of this file. 62ee67178SXianjun Jiao# 72ee67178SXianjun Jiao# 82ee67178SXianjun Jiao 92ee67178SXianjun Jiao# The ddns-updates-style parameter controls whether or not the server will 102ee67178SXianjun Jiao# attempt to do a DNS update when a lease is confirmed. We default to the 112ee67178SXianjun Jiao# behavior of the version 2 packages ('none', since DHCP v2 didn't 122ee67178SXianjun Jiao# have support for DDNS.) 132ee67178SXianjun Jiaoddns-update-style none; 142ee67178SXianjun Jiao 152ee67178SXianjun Jiao# option definitions common to all supported networks... 16*3933c530SXianjun Jiao# option domain-name "orca-project.eu"; 172ee67178SXianjun Jiao#option domain-name-servers ns1.example.org, ns2.example.org; 182ee67178SXianjun Jiao 192ee67178SXianjun Jiaodefault-lease-time 600; 202ee67178SXianjun Jiaomax-lease-time 7200; 212ee67178SXianjun Jiao 222ee67178SXianjun Jiao# If this DHCP server is the official DHCP server for the local 232ee67178SXianjun Jiao# network, the authoritative directive should be uncommented. 242ee67178SXianjun Jiao#authoritative; 252ee67178SXianjun Jiao 262ee67178SXianjun Jiao# Use this to send dhcp log messages to a different log file (you also 272ee67178SXianjun Jiao# have to hack syslog.conf to complete the redirection). 282ee67178SXianjun Jiaolog-facility local7; 292ee67178SXianjun Jiao 302ee67178SXianjun Jiao# No service will be given on this subnet, but declaring it helps the 312ee67178SXianjun Jiao# DHCP server to understand the network topology. 322ee67178SXianjun Jiao 332ee67178SXianjun Jiaooption subnet-mask 255.255.255.0; 342ee67178SXianjun Jiaooption broadcast-address 192.168.13.255; 352ee67178SXianjun Jiaooption routers 192.168.13.1; 362ee67178SXianjun Jiaooption domain-name-servers 8.8.8.8, 4.4.4.4; 372ee67178SXianjun Jiaooption domain-name "mydomain.example"; 382ee67178SXianjun Jiao 392ee67178SXianjun Jiaosubnet 192.168.13.0 netmask 255.255.255.0 { 402ee67178SXianjun Jiao# default-lease-time 6000; 412ee67178SXianjun Jiao# max-lease-time 7200; 422ee67178SXianjun Jiao option routers 192.168.13.1; 432ee67178SXianjun Jiao range 192.168.13.2 192.168.13.254; 442ee67178SXianjun Jiao} 452ee67178SXianjun Jiao 462ee67178SXianjun Jiao#subnet 10.152.187.0 netmask 255.255.255.0 { 472ee67178SXianjun Jiao#} 482ee67178SXianjun Jiao 492ee67178SXianjun Jiao# This is a very basic subnet declaration. 502ee67178SXianjun Jiao 512ee67178SXianjun Jiao#subnet 10.254.239.0 netmask 255.255.255.224 { 522ee67178SXianjun Jiao# range 10.254.239.10 10.254.239.20; 532ee67178SXianjun Jiao# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; 542ee67178SXianjun Jiao#} 552ee67178SXianjun Jiao 562ee67178SXianjun Jiao# This declaration allows BOOTP clients to get dynamic addresses, 572ee67178SXianjun Jiao# which we don't really recommend. 582ee67178SXianjun Jiao 592ee67178SXianjun Jiao#subnet 10.254.239.32 netmask 255.255.255.224 { 602ee67178SXianjun Jiao# range dynamic-bootp 10.254.239.40 10.254.239.60; 612ee67178SXianjun Jiao# option broadcast-address 10.254.239.31; 622ee67178SXianjun Jiao# option routers rtr-239-32-1.example.org; 632ee67178SXianjun Jiao#} 642ee67178SXianjun Jiao 652ee67178SXianjun Jiao# A slightly different configuration for an internal subnet. 662ee67178SXianjun Jiao#subnet 10.5.5.0 netmask 255.255.255.224 { 672ee67178SXianjun Jiao# range 10.5.5.26 10.5.5.30; 682ee67178SXianjun Jiao# option domain-name-servers ns1.internal.example.org; 692ee67178SXianjun Jiao# option domain-name "internal.example.org"; 702ee67178SXianjun Jiao# option routers 10.5.5.1; 712ee67178SXianjun Jiao# option broadcast-address 10.5.5.31; 722ee67178SXianjun Jiao# default-lease-time 600; 732ee67178SXianjun Jiao# max-lease-time 7200; 742ee67178SXianjun Jiao#} 752ee67178SXianjun Jiao 762ee67178SXianjun Jiao# Hosts which require special configuration options can be listed in 772ee67178SXianjun Jiao# host statements. If no address is specified, the address will be 782ee67178SXianjun Jiao# allocated dynamically (if possible), but the host-specific information 792ee67178SXianjun Jiao# will still come from the host declaration. 802ee67178SXianjun Jiao 812ee67178SXianjun Jiao#host passacaglia { 822ee67178SXianjun Jiao# hardware ethernet 0:0:c0:5d:bd:95; 832ee67178SXianjun Jiao# filename "vmunix.passacaglia"; 842ee67178SXianjun Jiao# server-name "toccata.fugue.com"; 852ee67178SXianjun Jiao#} 862ee67178SXianjun Jiao 872ee67178SXianjun Jiao# Fixed IP addresses can also be specified for hosts. These addresses 882ee67178SXianjun Jiao# should not also be listed as being available for dynamic assignment. 892ee67178SXianjun Jiao# Hosts for which fixed IP addresses have been specified can boot using 902ee67178SXianjun Jiao# BOOTP or DHCP. Hosts for which no fixed address is specified can only 912ee67178SXianjun Jiao# be booted with DHCP, unless there is an address range on the subnet 922ee67178SXianjun Jiao# to which a BOOTP client is connected which has the dynamic-bootp flag 932ee67178SXianjun Jiao# set. 942ee67178SXianjun Jiao#host fantasia { 952ee67178SXianjun Jiao# hardware ethernet 08:00:07:26:c0:a5; 962ee67178SXianjun Jiao# fixed-address fantasia.fugue.com; 972ee67178SXianjun Jiao#} 982ee67178SXianjun Jiao 992ee67178SXianjun Jiao# You can declare a class of clients and then do address allocation 1002ee67178SXianjun Jiao# based on that. The example below shows a case where all clients 1012ee67178SXianjun Jiao# in a certain class get addresses on the 10.17.224/24 subnet, and all 1022ee67178SXianjun Jiao# other clients get addresses on the 10.0.29/24 subnet. 1032ee67178SXianjun Jiao 1042ee67178SXianjun Jiao#class "foo" { 1052ee67178SXianjun Jiao# match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; 1062ee67178SXianjun Jiao#} 1072ee67178SXianjun Jiao 1082ee67178SXianjun Jiao#shared-network 224-29 { 1092ee67178SXianjun Jiao# subnet 10.17.224.0 netmask 255.255.255.0 { 1102ee67178SXianjun Jiao# option routers rtr-224.example.org; 1112ee67178SXianjun Jiao# } 1122ee67178SXianjun Jiao# subnet 10.0.29.0 netmask 255.255.255.0 { 1132ee67178SXianjun Jiao# option routers rtr-29.example.org; 1142ee67178SXianjun Jiao# } 1152ee67178SXianjun Jiao# pool { 1162ee67178SXianjun Jiao# allow members of "foo"; 1172ee67178SXianjun Jiao# range 10.17.224.10 10.17.224.250; 1182ee67178SXianjun Jiao# } 1192ee67178SXianjun Jiao# pool { 1202ee67178SXianjun Jiao# deny members of "foo"; 1212ee67178SXianjun Jiao# range 10.0.29.10 10.0.29.230; 1222ee67178SXianjun Jiao# } 1232ee67178SXianjun Jiao#} 124