For my tests, the following was done with 2 virtual machines. The server is under CentOS7 and the client under Windows 10 (MAC : 08:00:27:bd:3d:ab).
After every modification on the server side, I perform a release/renew on the client to check if it get the IP I want.
Here is the configuration :
authoritative;
ddns-update-style none;
default-lease-time 28800;
max-lease-time 36000;
allow bootp;
next-server 192.168.0.254;
filename "pxelinux.0";
shared-network {
subnet 192.168.0.0 netmask 255.255.255.128 {
option broadcast-address 192.168.0.127;
option routers 192.168.0.1;
option ntp-servers 192.168.0.1;
option domain-name-servers 192.168.0.1;
class "matchHW" {
match hardware;
}
group {
deny unknown-clients;
subclass "matchHW" 1:08:00:27:bd:3d:ab;
}
group {
deny unknown-clients;
host win10 {
hardware ethernet f8:00:27:bd:3d:ab;
fixed-address 192.168.0.13;
}
}
pool {
allow members of "matchHW";
option routers 192.168.0.3;
option domain-name-servers 192.168.0.3;
range 192.168.0.40 192.168.0.49;
}
pool {
allow unknown-clients;
option routers 192.168.0.2;
option domain-name-servers 192.168.0.2;
range 192.168.0.30 192.168.0.39;
}
}
}
In this specific configuration, I don't understand why the Windows client get for it's IP 192.168.0.30 with .1 for it's GW. I expect it get 192.168.0.40 with .3 for it's GW.
If I switch the 2 MACs (08:00:27:bd:3d:ab, f8:00:27:bd:3d:ab) to get a static IP, it works (get 192.168.0.13). If I edit these MAC to come with my client with an unknown MAC, it works too (get 192.168.0.30).
The final goal of my configuration is to serve IP for 3 "groups" :
- static IP for known MAC
- dynamic IP for known MAC
- dynamic IP for unknown MAC
Each of these groups will have specific routers and DNS configuration.
Does anyone has an idea ?