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