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