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-??] ...
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.
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”.
Yes. The DHCP server implements the DHCP protocol. And since V1.8 also the BOOTP style requests are supported.
DHCP Server for Windows is not open source and therefore the source code is not available for free.
No. The DHCP server reads the dhcpsrv.ini every time again, when a client requests an IP address.
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
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. I will update the list. Continue reading
The reservation of IP addresses usually serves the purpose of excluding IP addresses or address ranges from the IP pool. Mostly, because those IP addresses are already known to be used somewhere in the network and are not to be reused or controlled by DHCP. There are two ways on how to reserve IP addresses. Continue reading
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. Continue reading
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. Continue reading
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.
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.
Remote booting of a device usually works in the following steps. Continue reading
The IPPOOL_x setting allows to configure an IP pool like 22.214.171.124-254. This is a class C network with a subnet mask of 255.255.255.0. To define a class B network simply configure the IP pool such as 126.96.36.199-188.8.131.52 with a subnet mask 255.255.0.0. Thats all. DHCP server versions prior to V2.3.1 require a bit more effort.
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.
DHCP Server runs on all Win32 based Windows Version. Continue reading