Frequently Asked Questions

How to uninstall DHCP server

The DHCP server has no install function and therefore also does not have an uninstall function either. The DHCP server runs as an application without any install, just run it and stop it as you wish.
If you are using the DHCP server as a service then you have to remove the service. To remove the service, you can either just hit the stop followed by the remove button or you go into the services applet of windows and remove the service there. Please keep in mind that you need administrator privileges to do so.

dhcpwiz_6
Some people that have used the HTTP function of the DHCP server software, have experienced that the browser shows the DHCP status page even when the software is not running. This is due to the browser and its cache. Please just clean your browser cache in that case.
After you have removed the service and cleaned the browser cache, the DHCP server software is completely removed from your system.

How to exclude clients from IP assignment

Option 1: Exclude with negative (black) list

You can use the IPSCOPE feature, in order to exclude one or more clients from getting an IP address assigned. Assuming you want to exclude just one client with a given MAC address (e.g. 08:00:00:01:03:A1). Here is an example:

[Settings]
IPPOOL_1=10.30.99.2-30
IPBIND_1=10.30.99.1
IPSCOPE_1=if(chaddr == "08:00:00:01:03:A1", null, "validdevice");

AssociateBindsToPools=1
Trace=1
DeleteOnRelease=0
ExpiredLeaseTimeout=3600

[GENERAL]
LEASETIME=86400
NODETYPE=8
SUBNETMASK=255.255.255.0
DNS_0=10.30.99.1
ROUTER_0=10.30.99.1

This will consider all clients but 08:00:00:01:03:A1 to be a “validdevice”. 08:00:00:01:03:A1 is not.

The term validdevice can be used to configure specifics in the scope section for the devices named by IPSCOPE_1. You can follow up on that by reading the IPSCOPE feature description. There is no need to go into details of that now for excluding certain devices from IP address assignment.

If you want to exclude even more devices then just extent the IPSCOPE setting accordingly:

[Settings]
...
IPSCOPE_1=if(chaddr == "08:00:00:01:03:A1" || chaddr == "08:00:00:01:03:A2", null, "validdevice");
...

Now also 08:00:00:01:03:A2 will not get an IP address anymore.
Please be aware that this feature works only, if the client(s) don’t already have a client section in the INI file. Only new clients (unknown to the DHCP server) will be selected based on the IPSCOPE definition.

Option 2: Exclude with positive (white) list

The other way to define which client get an IP address assigned is a white-list approach. Here is an example on how to do that based on the IgnoreUnkownClients setting:

[Settings]
IPPOOL_1=10.30.99.2-30
IPBIND_1=10.30.99.1

AssociateBindsToPools=1
Trace=1
DeleteOnRelease=0
ExpiredLeaseTimeout=3600
IgnoreUnknownClients=1

[GENERAL]
LEASETIME=86400
NODETYPE=8
SUBNETMASK=255.255.255.0
DNS_0=10.30.99.1
ROUTER_0=10.30.99.1

; white-list of clients that get an IP address assigned:
[10-11-12-13-14-15]
[10-11-12-13-14-16]
[10-11-12-13-14-17]
[10-11-12-13-14-18]

Please note that only the four clients listed based on their mac addresses will be served by the DHCP server. The client section does not need to include anything. Simply add more client mac addresses to the list to serve them as well.
The key to this approach is, besides the fact that you need to know the clients beforehand, is to set IgnoreUnkownClients=1. You can add clients to the INI file anytime. And, you can even use wildcards, as described here.

The following example adds all clients 10-11-12-13-14-00 up to 10-11-12-13-14-FF  to the (white) list of clients:

...
[10-11-12-13-14-??]
...

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.

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”.

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. Continue reading

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.

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.