Is it possible to calculate ip address based on mac address for isc-dhcp server?
For example: 'aa:aa:aa:aa:aa:x' => '10.10.10.x'
I have following in dhcpd.conf:
subnet 10.10.10.0 netmask 255.255.255.0 {
class "v" {
match if substring (hardware, 0, 14) = "AA:AA:AA:AA:AA";
}
pool {
range 10.10.10.101 10.10.10.200;
deny unknown-clients;
allow members of "v";
fixed-address = concat('10.10.10.', substring (hardware, 15, 2));
}
}
fixed-address
directive is misplaced (have to be in host
closure only), so I have error. Any workarounds exists?