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 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.
96 # Packets received on the socket will be processed through one
97 # of the following sections, named after the DHCP packet type.
98 # See dictionary.dhcp for the packet types.
101 DHCP-Message-Type = DHCP-Offer
104 # The contents here are invented. Change them!
106 DHCP-Domain-Name-Server = 127.0.0.1
107 DHCP-Domain-Name-Server = 127.0.0.2
108 DHCP-Subnet-Mask = 255.255.255.0
109 DHCP-Router-Address = 192.168.1.1
110 DHCP-IP-Address-Lease-Time = 86400
111 DHCP-DHCP-Server-Identifier = 192.168.1.1
114 # Do a simple mapping of MAC to assigned IP.
116 # See below for the definition of the "mac2ip"
121 # If the MAC wasn't found in that list, do something else.
122 # You could call a Perl, Python, or Java script here.
133 DHCP-Message-Type = DHCP-Ack
136 # The contents here are invented. Change them!
138 DHCP-Domain-Name-Server = 127.0.0.1
139 DHCP-Domain-Name-Server = 127.0.0.2
140 DHCP-Subnet-Mask = 255.255.255.0
141 DHCP-Router-Address = 192.168.1.1
142 DHCP-IP-Address-Lease-Time = 86400
143 DHCP-DHCP-Server-Identifier = 192.168.1.1
146 # Do a simple mapping of MAC to assigned IP.
148 # See below for the definition of the "mac2ip"
153 # If the MAC wasn't found in that list, do something else.
154 # You could call a Perl, Python, or Java script here.
163 # If there's no named section for the packet type, then the packet
164 # is processed through this section.
173 ######################################################################
175 # This next section is a sample configuration for the "passwd"
176 # module, that reads flat-text files. It should go into
177 # radiusd.conf, in the "modules" section.
179 # The file is in the format <mac>,<ip>
181 # 00:01:02:03:04:05,192.168.1.100
182 # 01:01:02:03:04:05,192.168.1.101
183 # 02:01:02:03:04:05,192.168.1.102
185 # This lets you perform simple static IP assignment.
187 ######################################################################
190 # filename = ${confdir}/mac2ip
191 # format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"