| 1 |
# |
| 2 |
# Sample configuration file for ISC dhcpd for Debian |
| 3 |
# with multi-architecture netbooting, for di-netboot-assistant |
| 4 |
# |
| 5 |
# $Id: 65a32a406951055e2afb337984aa526d7304bc0a $ |
| 6 |
# |
| 7 |
|
| 8 |
# The ddns-updates-style parameter controls whether or not the server will |
| 9 |
# attempt to do a DNS update when a lease is confirmed. We default to the |
| 10 |
# behavior of the version 2 packages ('none', since DHCP v2 didn't |
| 11 |
# have support for DDNS.) |
| 12 |
ddns-update-style none; |
| 13 |
|
| 14 |
# option definitions common to all supported networks... |
| 15 |
option domain-name "example.org"; |
| 16 |
option domain-name-servers ns1.example.org, ns2.example.org; |
| 17 |
|
| 18 |
default-lease-time 600; |
| 19 |
max-lease-time 7200; |
| 20 |
|
| 21 |
# If this DHCP server is the official DHCP server for the local |
| 22 |
# network, the authoritative directive should be uncommented. |
| 23 |
#authoritative; |
| 24 |
|
| 25 |
# Use this to send dhcp log messages to a different log file (you also |
| 26 |
# have to hack syslog.conf to complete the redirection). |
| 27 |
log-facility local7; |
| 28 |
|
| 29 |
# ### Some options for Network boot (PXE) ### |
| 30 |
|
| 31 |
# Declare pxelinux specific options _names_ (before we use them). |
| 32 |
option space pxelinux; |
| 33 |
option pxelinux.magic code 208 = string; # = 0xd0 |
| 34 |
option pxelinux.configfile code 209 = text; # = 0xd1 |
| 35 |
option pxelinux.pathprefix code 210 = text; # = 0xd2 |
| 36 |
option pxelinux.reboottime code 211 = unsigned integer 32; # = 0xd3 |
| 37 |
# (see syslinux's /usr/share/doc/syslinux/pxelinux.txt.gz) |
| 38 |
|
| 39 |
## The tftpd server IP address, for all clients. |
| 40 |
#next-server <<<Your TFTP server>>>; |
| 41 |
next-server 192.168.0.11; |
| 42 |
|
| 43 |
# Default netboot filename for (bootp, and other non-PXE clients) |
| 44 |
filename "enter-your-default-di-netboot-imagename-here" |
| 45 |
|
| 46 |
class "pxeclient" { |
| 47 |
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; |
| 48 |
|
| 49 |
## Only PXE clients, will get those options |
| 50 |
## (when they are _actually_ net-booting from their PXE agent). |
| 51 |
|
| 52 |
site-option-space "pxelinux"; |
| 53 |
option pxelinux.magic f1:00:74:7e; |
| 54 |
#option pxelinux.reboottime 0; |
| 55 |
|
| 56 |
## x86 (i386, amd64, x86_64, IA32) architectures. |
| 57 |
if substring (option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000" { |
| 58 |
#filename "d-i/n-a/etch/i386/pxelinux.0"; |
| 59 |
#option pxelinux.configfile "d-i/n-a/etch/i386/pxelinux.cfg/default"; |
| 60 |
|
| 61 |
## If you want to use the meta menu : |
| 62 |
filename "d-i/n-a/pxelinux.0"; |
| 63 |
option pxelinux.configfile "::d-i/n-a/pxelinux.cfg/default"; |
| 64 |
#or# option pxelinux.configfile "::d-i/n-a/pxelinux.cfg/default.serial-9600"; |
| 65 |
} |
| 66 |
|
| 67 |
if exists dhcp-parameter-request-list { |
| 68 |
# We Always send the PXELINUX options (values are in hexadecimal: 0xd0=208) |
| 69 |
option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3); |
| 70 |
} |
| 71 |
|
| 72 |
} |
| 73 |
|
| 74 |
class "sun" { |
| 75 |
match if substring (option vendor-class-identifier, 0, 5) = "SUNW."; |
| 76 |
# Needs improvements: some Sun have x86 CPUs !! |
| 77 |
# uname -i : "SUNW.SPARCstation", "SUNW.Ultra", "SUNW.Sun-Blade", "SUNW.Sun-Fire"... |
| 78 |
|
| 79 |
# Replace "stable" with the actual boot image you want to boot. |
| 80 |
filename "d-i/n-a/stable/sparc/boot.img"; |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
subnet 192.168.0.0 netmask 255.255.255.0 { |
| 85 |
|
| 86 |
# Adjust your modem/router's IP address here. |
| 87 |
option routers 192.168.0.1; |
| 88 |
|
| 89 |
range 192.168.0.81 192.168.0.91 |
| 90 |
|
| 91 |
# If your dhcp server isn't configured with fixed IP address, |
| 92 |
# use this hack (replace with the DHCP server's MAC adress): |
| 93 |
#host mydhcpserver { |
| 94 |
# hardware ethernet 00:15:58:01:23:45; |
| 95 |
# fixed-address 192.168.0.10; |
| 96 |
#} |
| 97 |
} |
| 98 |
|
| 99 |
# The "deny unknown-clients;", the "host" declaration and "authoritative" |
| 100 |
# allow to have two dhcp server runing side by side (one for PXE agent |
| 101 |
# booting, and one for Debian/Linux boot) |
| 102 |
#deny unknown-clients; |
| 103 |
|
| 104 |
#group { |
| 105 |
# # a group for some hppa systems |
| 106 |
# filename "d-i/n-a/stable/hppa/boot.img"; |
| 107 |
# |
| 108 |
# host myhost1 { hardware ethernet 00:40:63:d8:02:2c; } |
| 109 |
# host myhost2 { hardware ethernet 00:40:63:d8:2c:02; } |
| 110 |
#} |
| 111 |
} |
| 112 |
|
| 113 |
# No service will be given on this subnet, but declaring it helps the |
| 114 |
# DHCP server to understand the network topology. |
| 115 |
|
| 116 |
#subnet 10.152.187.0 netmask 255.255.255.0 { |
| 117 |
#} |
| 118 |
|
| 119 |
# This is a very basic subnet declaration. |
| 120 |
|
| 121 |
#subnet 10.254.239.0 netmask 255.255.255.224 { |
| 122 |
# range 10.254.239.10 10.254.239.20; |
| 123 |
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; |
| 124 |
#} |
| 125 |
|
| 126 |
# This declaration allows BOOTP clients to get dynamic addresses, |
| 127 |
# which we don't really recommend. |
| 128 |
|
| 129 |
#subnet 10.254.239.32 netmask 255.255.255.224 { |
| 130 |
# range dynamic-bootp 10.254.239.40 10.254.239.60; |
| 131 |
# option broadcast-address 10.254.239.31; |
| 132 |
# option routers rtr-239-32-1.example.org; |
| 133 |
#} |
| 134 |
|
| 135 |
# A slightly different configuration for an internal subnet. |
| 136 |
#subnet 10.5.5.0 netmask 255.255.255.224 { |
| 137 |
# range 10.5.5.26 10.5.5.30; |
| 138 |
# option domain-name-servers ns1.internal.example.org; |
| 139 |
# option domain-name "internal.example.org"; |
| 140 |
# option routers 10.5.5.1; |
| 141 |
# option broadcast-address 10.5.5.31; |
| 142 |
# default-lease-time 600; |
| 143 |
# max-lease-time 7200; |
| 144 |
#} |
| 145 |
|
| 146 |
# Hosts which require special configuration options can be listed in |
| 147 |
# host statements. If no address is specified, the address will be |
| 148 |
# allocated dynamically (if possible), but the host-specific information |
| 149 |
# will still come from the host declaration. |
| 150 |
|
| 151 |
#host passacaglia { |
| 152 |
# hardware ethernet 0:0:c0:5d:bd:95; |
| 153 |
# filename "vmunix.passacaglia"; |
| 154 |
# server-name "toccata.fugue.com"; |
| 155 |
#} |
| 156 |
|
| 157 |
# Fixed IP addresses can also be specified for hosts. These addresses |
| 158 |
# should not also be listed as being available for dynamic assignment. |
| 159 |
# Hosts for which fixed IP addresses have been specified can boot using |
| 160 |
# BOOTP or DHCP. Hosts for which no fixed address is specified can only |
| 161 |
# be booted with DHCP, unless there is an address range on the subnet |
| 162 |
# to which a BOOTP client is connected which has the dynamic-bootp flag |
| 163 |
# set. |
| 164 |
#host fantasia { |
| 165 |
# hardware ethernet 08:00:07:26:c0:a5; |
| 166 |
# fixed-address fantasia.fugue.com; |
| 167 |
#} |
| 168 |
|
| 169 |
# You can declare a class of clients and then do address allocation |
| 170 |
# based on that. The example below shows a case where all clients |
| 171 |
# in a certain class get addresses on the 10.17.224/24 subnet, and all |
| 172 |
# other clients get addresses on the 10.0.29/24 subnet. |
| 173 |
|
| 174 |
#class "foo" { |
| 175 |
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; |
| 176 |
#} |
| 177 |
|
| 178 |
#shared-network 224-29 { |
| 179 |
# subnet 10.17.224.0 netmask 255.255.255.0 { |
| 180 |
# option routers rtr-224.example.org; |
| 181 |
# } |
| 182 |
# subnet 10.0.29.0 netmask 255.255.255.0 { |
| 183 |
# option routers rtr-29.example.org; |
| 184 |
# } |
| 185 |
# pool { |
| 186 |
# allow members of "foo"; |
| 187 |
# range 10.17.224.10 10.17.224.250; |
| 188 |
# } |
| 189 |
# pool { |
| 190 |
# deny members of "foo"; |
| 191 |
# range 10.0.29.10 10.0.29.230; |
| 192 |
# } |
| 193 |
#} |