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-??] ...