FREQUENTLY ASKED QUESTIONS
Question
1: What
operating systems can I use as a DHCP server?
Question
2: What
operating systems can I use as a client?
Question
3: I did
setup the DHCP server but it doesn't work. What
am I doing wrong?
Question
4: Is it
necessary to restart the DHCP server after
editing the INI file?
Question
5: Is it
possible to get the source code of the DHCP
server?
Question
6: Does the
DHCP server support the BOOTP protocol?
Question
7: Does the
DHCP server support more than one ethernet card?
Question
8: Why does
IgnoreUnknownClients not work as expected?
Question
9: Does the
DHCP server support client identifier?
Question
10: How to
configure the DHCP server for class B networks?
Question 11
:
I want to establish a pxe boot environment but I don't get it to work. What am I doing wrong?
Question 12
:
Why is the DHCP Status web page not showing?
Question 13
:
What is error 10038? And, why does it occur upon termination of the DHCP Server?
Question 14
:
How can I specify sub-options, e.g. for the vendor specific OPTION_43?
Question 15
:
How can I add DNS entries and specify a DNS domain?
|
| Question
1: What operating systems can I use as a DHCP
server? |
Here
is a list of operating systems that have been
used as DHCP Servers so far:
- Windows NT 4.0 SP3,
SP4, SP5, SP6
- Windows 2000 RC3
- Windows 98 SE
- Windows 98
- Windows 95 OSR2
- Windows 2000
professional
- Windows XP
- Windows XP SP1
- Windows XP
professional SP2
- Windows XP 64bit
- Windows VISTA
- Windows 7 (32 bit and 64 bit)
- Bart PE (used from
Windows XP Sp2)
- Windows Server 2003
(SP1)
- Windows Server 2003 R2
- Windows Server 2008
|
| Question
2: What
operating systems can I use as a client?
|
It should work with every operating system (not
only windows), since the DHCP server implements a
standard protocol. Please tell me about the
operating systems that you are using and whether
it works or not.
Here is a list of clients that it has been used
with:
- Windows CE
- Linux RedHat 6.1
Kernel 2.2.12-20
- Windows 98 SE
- Windows NT 4.0 SP3,
SP4, SP5
- Windows 95 OSR2
- Windows 2000
professional
- Windows XP
- Windows XP embedded
- Windows 7 (32 bit and 64 bit)
- Suse Linux
- Ubuntu 6.06, 2.6.15
kernel
- Puppy 2.17, 2.6.21.5
kernel
- Sidux 2007-02,
2.6.22.6 kernel
- Debian 4.0, 2.6.18
kernel
- Debian 2.14-16-18
kernels
- SystemRescueCD 0.2.19,
2.6.16.10 kernel
- MS DOS TCP/IP Protocol
Driver 1.0a
- Symbian Phones
- Apple iPhone
- Nintendo DS
- Sony PSP
|
| Question
3: I did
setup the DHCP server but it doesn't work. What
am I doing wrong? |
This is probably the question
that I hate the most. Here is what I always do to
find out what's going on: Setup the IP network by
hand. In other words: don't use the DHCP Server,
at all. Configure all the necessary things in the
network settings of your client machine and don't
set "Obtain an IP address from a DHCP
server". If you have done this and your
network still isn't working there is something
very basic wrong, already. There is no hope that
the DHCP server is going to help you to solve
this problem.Once you have a configuration
running, where your two or more computers are
setup using manually assigned IP addresses, check
your dhcpsrv.ini file once more to make sure that
everything that you entered manually appears in
the dhcpsrv.ini file. After that, set the
"Obtain an IP address from a DHCP
server" in the network settings and reboot.
If it's not getting an IP address assigned, you
need to compare the IP configuration of the
manually configured with the automatically
configured system. You can use the
ipconfig/winipcfg tools. There has to be a
difference! If you found that: try to manipulate
the dhcpsrv.ini to let the server assign that
option that was different in the two
configurations.
If it still doesn't work then please
check your security settings. Especially with
Windows Vista it is very likely that you need to
open the security settings of your firewall and
allow the DHCP server to communicate. Open up ports 67, 68 and 53.
If all this didnt help, then
enable the trace (set Trace=1 in the [Settings]
section) and send me the dhcpsrv.ini and
dhcpsrv.trc files.
|
| Question
4: Is it necessary
to restart the DHCP server after editing the INI
file? |
No. The DHCP server reads the
dhcpsrv.ini every time again, when a client
requests an IP address. |
| Question
5: Is it
possible to get the source code of the DHCP
server? |
Maybe. I have absolutely no
problem with giving you the source code, as long
as I get something back from you. I will not post
the source code on the Web, but you can e-mail me
and contribute something to make the DHCP server
better as it is today. I will consider based on the field of use. Here is a list
of examples what kind of information I need to decide:
- A list of operating
systems and configurations that you have
used with the DHCP server.
- A list of client
operating systems that have successfully
been used with this DHCP server.
- A report of bugs or
suggestions that you found worth to be
fixed in future versions.
- Your opinion about the
DHCP server.
- How did you find the
DHCP server on the Web?
- Some information about
the project that you want to do with the
source code. Expecially whether it is commercial, educational or private.
|
| Question
6: Does the
DHCP server support the BOOTP protocol?
|
Yes. The DHCP server implements
the DHCP protocol. And since V1.8 also the BOOTP style requests are supported. |
| Question
7: Does the
DHCP server support more than one ethernet card?
|
Yes. It automatically uses all NIC's that it
finds and listens for incoming DHCP requests.
Windows 2000 (and later OSs) has a little bit of a different
behavior than previous Windows operating systems.
It doesn't tell you the IP address of an adapter
until it is physically connected. The DHCP server
since V1.3 supports that as well by implicitly stopping
and starting itself whenever a change in the IP
configuration occurs.
You can also restrict the DHCP Server to certain cards by using the IPBIND_x
entries in the [Settings] section or server "virtualization". See the
dhcpsrv.ini for details.
|
| Question
8: Why does
IgnoreUnknownClients not work as expected?
|
Sometimes there is confusion about
IgnoreUnknownClients. There are two settings that
control the behavior of the DHCP server with
respect to unknown clients:
ConfigureUnknownClients and IgnoreUnknownClients.
ConfigureUnknownClients controls whether an
unknown client gets an entry automatically
generated in the INI file based on IPPOOLs and so
on. What makes a client a known client is any
kind of client section in the INI file. This can
be a client section with wildcards. This client
section does not need to contain any IPADDR
entry. The IPADDR entry is generated
automatically. IgnoreUnknownClients controls how
the DHCP server behaves in cases in which no
client section is generated by the DHCP server.
Sent a NAK to the requesting client or simple
ignore the request. Example:
[00-40-8C-??-??-??] ; support only clients with
mac address starting with 00-40-8C
AutoConfig=1
[Settings]
ConfigureUnknownClients=0
IgnoreUnknownClients=1
This tells the DHCP server to configure only
clients with mac address 00-40-8C-??-??-?? and do
not respond to any requests from other kind of
clients.
|
| Question
9: Does the
DHCP server support client-identifier?
|
Yes. Set UseClientID=1 and all
client sections will be named after the option 61
supplied name of the client. See UseClientID
setting for details..
|
| Question
10: How to
configure IP pools for class B networks?
|
The IPPOOL_x setting allows to
configure an IP pool like 192.10.1.2-254. This is
a class C network with a subnet mask of
255.255.255.0. At first sight it may seem as if
the DHCP server would not support class B
networks. This would require to define an IP pool
like 192.10.2.1-192.10.5.254 with a subnet mask
255.255.0.0. This is indeed possible since V2.3.1. And no special
handling is needed anymore.
The following describes how to
configure the DHCP server to support class B
networks in versions prior to V2.3.1:Variant
1: Restrict the DHCP Server to one network
interface card (NIC):
[Settings]
IPBIND_1=192.10.2.1 ; NIC 1
AssociateBindsToPools=0
IPPOOL_1=192.10.2.2-254
IPPOOL_2=192.10.3.1-254
IPPOOL_3=192.10.4.1-254
IPPOOL_4=192.10.5.1-254
[General]
SUBNETMASK=255.255.0.0
This configuration
restricts the DHCP server to one NIC and (very
important) sets AssociateBindsToPools=0. This
allows to configure a series of IPPOOL_x
definitions that in total define all valid IP
addresses that the DHCP server shall manage. Of
course, this is still restricted to 10 IP pools
(approx. 2500 IP addresses in total): IPPOOL_0,
..., IPPOOL_9
Variant 2: Run multiple ("virtual") instances of the DHCP Server:
If multiple NICs are to be
supported then the variant 1 approach does not work. Because, it is only possible to have
one IPPOOL_x per IPBIND_x. In this case the V1.8 feature to run mulitple "virtual" instances comes in handy.
dhcpsrv.ini:
[Servers]
SERVER_1=dhcp1.ini
SERVER_2=dhcp2.ini
dhcp1.ini:
[Settings]
Trace=1
TraceFile=dhcp1.txt
IPBIND_1=192.10.2.1 ; NIC 1
AssociateBindsToPools=0
IPPOOL_1=192.10.2.2-254
IPPOOL_2=192.10.3.1-254
IPPOOL_3=192.10.4.1-254
IPPOOL_4=192.10.5.1-254
[General]
SUBNETMASK=255.255.0.0
dhcp2.ini:
[Settings]
Trace=1
TraceFile=dhcp2.txt
IPBIND_1=192.11.2.1 ; NIC 2
AssociateBindsToPools=0
IPPOOL_1=192.11.2.2-254
IPPOOL_2=192.11.3.1-254
IPPOOL_3=192.11.4.1-254
IPPOOL_4=192.11.5.1-254
[General]
SUBNETMASK=255.255.0.0
The two dhcp_.ini files define two seperate
instances of the DHCP Server. All the sections and configurations can be specified
in the dhcp1.ini or dhcp2.ini as usual. The settings and databases are kept
seperately and behave as if two instances of the dhcpsr.exe would have been started
with a dedicated ini file for each of them. The only [Settings] that are not
"virtualized" are the ones shown in the example above: InstallAsService,
ShowBalloonMessages and NotifyTimeout. They can not be "virtualized", because they
really define the behavior of the executable process (e.g. installation or icon
in the tray).
|
|
Question 11:
I want to establish a pxe boot environment but I don't get it to work. What am I doing wrong?
|
The following INI file is the setup for a pxe boot environment for pxelinux. It assumes 192.168.0.2 as the server IP address.
[Settings]
Trace=1
IgnoreUnknownClients=1
ConfigureUnknownClients=1
AssociateBindsToPools=1
IPBIND_2=192.168.0.2
IPPOOL_2=192.168.0.3-134
[General]
LEASETIME=86400 ; lease time of 1 day
NEXTSERVER=192.168.0.2 ; tftp server (clients look in option 66 and/or in NEXTSERVER field)
OPTION_66=192.168.0.2 ; tftp server
BOOTFILE=pxelinux.0
SUBNETMASK=255.255.255.0
DOMAINNAME=mydomain.local
DNS_1=192.168.0.2
[TFTP-Settings] ; settings for the integrated tftp server
EnableTFTP=1
Root=D:\tftproot\
[DNS-Settings] ; settings for the integrated dns server
EnableDNS=1
This configuration works under the assumption that a server side path d:\tftproot\ exists with the needed pxelinux files stored, i.e. pxelinux.0.
The integrated DNS is not really needed for a pxe boot environment to work. Please note that the integrated TFTP server (new in V1.9) is configured.
If you are already using another TFTP server and want to continue to do so, then please set EnableTFTP=0 and make sure that the external TFTP server is setup
accordingly.
The same works with Windows 7 and Windows PE boot. If you for example set up a Windows 7 network boot as it is
described in the german computer magazin c't 5/2011 page 170ff, then the following INI file will do the job:
[SETTINGS]
IPPOOL_1=192.168.0.3-254
IPBIND_1=192.168.0.2
AssociateBindsToPools=1
[GENERAL]
LEASETIME=86400
NODETYPE=8
SUBNETMASK=255.255.255.0
BOOTFILE=wdsnbp.0
NEXTSERVER=192.168.0.2
[TFTP-SETTINGS]
EnableTFTP=1
ROOT=D:\pxe
|
|
Question 12:
Why is the DHCP Status web page not showing?
|
First, please check that the HTTP Server is enabled.
[HTTP-Settings]
EnableHTTP=1
Root="c:\httproot\" ; the server side pathname to the files served through the http protocol
If the HTTP Server is not enabled, then the "Open Status" entry in the context menu
is grayed. The status info is provided as a web page and therefore requires the
HTTP Server to be enabled.
If it still does not work, then make sure that the port
number 80 is not already used by another HTTP Server running on your computer. You can
move the integrated HTTP Server to another port number with the following setting:
[SETTINGS]
...
PORT_80=50555
...
Now, the url to access the status web page is http://127.0.0.1:50555.
|
|
Question 13:
What is error 10038? And, why does it occur upon termination of the DHCP Server?
|
In the trace file (dhcptrc.txt) you will see the follwing trace entries:
[11/07/2012 07:07:07] DHCP Server is terminating (ignore error messages that follow)
[11/07/2012 07:07:07] recvfrom returns with error 10038
This happens every time you terminate the DHCP server. The reason is of technical nature and is by design.
There is nothing to worry about, because it is intended behavior.
The reason for it lies in the fact that the DHCP Server software uses blocking sockets as a communication resource. The DHCP Server
basically is blocked in a socket call and waits for a request from a client. When you terminate the DHCP Server application, then
the blocking socket function call is de-blocked by closing the socket. This then leads to the error message 10038.
|
|
Question 14:
How can I specify sub-options, e.g. for the vendor specific OPTION_43?
|
Usually, a DHCP option is either an IP address or subnetmask or a string. You can specify all kind of options and option data using the
custom option feature of the DHCP server like this:
[General]
OPTION_66=192.168.5.1 ; IP address of TFTP server
OPTION_60="PXEClient" ; string
Some options, especially the vendor specific OPTION_43, are composed of sub-options of different types.
It is possible to define OPTION_43 with one sub-option like this:
OPTION_43=08 0E "http://load.me" ;
This defines OPTION_43 with one sub-option 8. Every sub-option consists of a 1 byte tag (08 in this case),
1 byte length (0E in this case, which is 14 dec) and the data with the given length (http://load.me is a 14 byte string).
Unfortunatly the length has to be calculated and entered manually as the second byte in hex format.
If there is a second sub-option to be specified, such as an IP address as sub-option 6 then the complete OPTION_43 looks like this:
OPTION_43=08 0E "http://load.me" 06 04 192.168.5.1 ;
The sub-option 6 also consists of a tag (06), length (04) and data, as you can easily see above.
Since V2.4, the error-prone task to manually determine the length of the sub-option is replaced by an auto-len feature.
With that the example above reads like this:
OPTION_43=08 ( "http://load.me" ) 06 ( 192.168.5.1 ) ;
Everything inside parentheses is automatically prefixed with the length of that data.
|
|
Question 15:
How can I add DNS entries and specify a DNS domain?
|
The integrated DNS function resolves names to IP addresses and vice versa based on the same data repository
as the DHCP server itself. All information is stored in the INI file. All clients that have been added
to the INI
file, automatically or manually, can be resolved. Assuming the following INI file:
[General]
DOMAINNAME=mydomain.local
[00-01-02-03-04-05]
IPADDR=10.5.60.7
Hostname=pc1
With this INI file, the DNS function will resolve the IP address 10.5.60.7 to pc1.mydomain.local and vice versa.
Say you want to add a DNS record for a client that is not represented in the INI file. A reason why this might
be necessary is because you have clients with static IP address on the network not DHCP assigned.
Simply add the following lines to the INI file:
[IP_10.5.60.8]
IPADDR=10.5.60.8
Hostname=pc2
Now the DNS function is able to resolve pc2.mydomain.local. It's IP address is 10.5.60.8. Please note
that the section
name for pc2 is choosen as IP_... The client section name has no particular function besides being a
unique one for each client. Usually this is the MAC address, because this is the identifier used by DHCP.
But if the client is only added to the INI file for the purpose of DNS resolution than it is ok to not use the
MAC address.
|