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