2 ######################################################################
4 # This is a virtual server that handles DHCP.
8 # This code is experimental, and SHOULD NOT be used in a
9 # production system. It is intended for validation and
10 # experimentation ONLY.
12 # In order for this to work, you will need to run configure:
14 # $ ./configure --with-dhcp
18 # DHCP is NOT enabled by default.
20 # The goal of this effort is to get the code in front of
21 # people who are interested in another DHCP server.
22 # We NEED FEEDBACK, patches, bug reports, etc. Especially patches!
24 # Please contribute, or this work will be nothing more than
29 # A: It allows the server to receive DHCP packets, and to
30 # respond with static, pre-configured DHCP responses.
32 # Q: Does it do static/dynamic IP assignment?
33 # A: No. Or, maybe. Try it and see.
35 # Q: Does it read ISC configuration or lease files?
36 # A: No. Please submit patches.
38 # Q: Does it have DHCP feature X?
39 # A: No. Please submit patches.
41 # Q: Does it support option 82?
44 # Q: Does it support other options?
45 # A: Maybe. See dictionary.dhcp. Please submit patches.
47 # Q: It doesn't seem to do much of anything!
52 ######################################################################
55 # The DHCP functionality goes into a virtual server.
59 # This is part RADIUS legacy (sorry). Clients have to be defined for
60 # DHCP. This is not normal practice for a DHCP server, but it does
61 # enable a simple filter list of "known clients".
64 # DHCP packets are normally sent with source IP address 0.0.0.0.
65 # If you want to accept packets from any IP, uncomment the "netmask"
66 # entry below, and delete the other "client" sections in this file.
80 # Define a DHCP socket.
82 # The default port below is 6700, so you don't break your network.
83 # If you want it to do real DHCP, change this to 67, and good luck!
85 # You can also bind the DHCP socket to an interface.
86 # See below, and raddb/radiusd.conf for examples.
88 # This lets you run *one* DHCP server instance and have it listen on
89 # multiple interfaces, each with a separate policy.
91 # If you have multiple interfaces, it is a good idea to bind the
92 # listen section to an interface. You will likely also need one
93 # listen section per interface.
101 # Packets received on the socket will be processed through one
102 # of the following sections, named after the DHCP packet type.
103 # See dictionary.dhcp for the packet types.
106 DHCP-Message-Type = DHCP-Offer
109 # The contents here are invented. Change them!
111 DHCP-Domain-Name-Server = 127.0.0.1
112 DHCP-Domain-Name-Server = 127.0.0.2
113 DHCP-Subnet-Mask = 255.255.255.0
114 DHCP-Router-Address = 192.168.1.1
115 DHCP-IP-Address-Lease-Time = 86400
116 DHCP-DHCP-Server-Identifier = 192.168.1.1
119 # Do a simple mapping of MAC to assigned IP.
121 # See below for the definition of the "mac2ip"
126 # If the MAC wasn't found in that list, do something else.
127 # You could call a Perl, Python, or Java script here.
138 DHCP-Message-Type = DHCP-Ack
141 # The contents here are invented. Change them!
143 DHCP-Domain-Name-Server = 127.0.0.1
144 DHCP-Domain-Name-Server = 127.0.0.2
145 DHCP-Subnet-Mask = 255.255.255.0
146 DHCP-Router-Address = 192.168.1.1
147 DHCP-IP-Address-Lease-Time = 86400
148 DHCP-DHCP-Server-Identifier = 192.168.1.1
151 # Do a simple mapping of MAC to assigned IP.
153 # See below for the definition of the "mac2ip"
158 # If the MAC wasn't found in that list, do something else.
159 # You could call a Perl, Python, or Java script here.
168 # If there's no named section for the packet type, then the packet
169 # is processed through this section.
178 ######################################################################
180 # This next section is a sample configuration for the "passwd"
181 # module, that reads flat-text files. It should go into
182 # radiusd.conf, in the "modules" section.
184 # The file is in the format <mac>,<ip>
186 # 00:01:02:03:04:05,192.168.1.100
187 # 01:01:02:03:04:05,192.168.1.101
188 # 02:01:02:03:04:05,192.168.1.102
190 # This lets you perform simple static IP assignment.
192 ######################################################################
195 # filename = ${confdir}/mac2ip
196 # format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"