I'm attempting to setup an additional pool for my sip phones, and use the polycom MACs to keep them using the pool.
I was hopping to give this pool (and only this pool) an option 66 dhcp option entry. I don't see the option for Additional option in the new pool I setup.
Is this expected, am I doing it wrong, or is this maybe a feature request?
Bit late in replying, but the answer is no. Options apply to the interface itself, not to the individual pools.
Here's a little test I did to show it, I created two pools and added a silly option, the resulting config file for dhcpd looks like this:
subnet 192.168.2.0 netmask 255.255.255.0 {
pool {
range 192.168.2.50 192.168.2.90;
}
pool {
range 192.168.2.100 192.168.2.150;
}
option routers 192.168.2.254;
option domain-name-servers 192.168.2.254;
option custom-opt2-0 "hello";
}
As you see, the options are created for the interface, not the pools. However reading the ISC dhcp manual there could be a way, perhaps an option for a manual override to allow you to create your own config file. To create this in the GUI per pool would also require other bits to be added for class, thus rejecting or accepting certain clients, allowing exactly what you want. So the manual override is probably easier.
OK, I've done some playing with the dhcp server and dhcp.conf. There is a way to do this and it's using the "class" keyword in dhcp.conf, you look for a specific string in the vendor identifier and within the subnet definition you use the allow/deny keywords etc. Tested it and it works, all I need to do now is add it to the GUI, which is not a five minute job, but it is a useful addition so I'll start looking at it.
Let me just say, Thanks and Thanks.
I would have been happy with a "that's not how it works, " but knowing that it might one day be a feature is even better!
Yup.. actually already completed the front end GUI, just working on the code that writes it into the config file, might have something to submit for review by the weekend.
Is done, tested, seems to work fine. I'll issue a PR tomorrow. It's then up to the devs to pull it in for inclusion. You can if you wish test it, but you'll need to be on 21.1.3, as my system is on the dev path and is on 21.7.a*. I'll post instructions when I've issued the PR.
I think I may have added something you don't need, I've added a vendor class by pool, so you would use the vendor class of the phones and they would get an address from a specific pool; however, you wanted it by mac address, that already exists under the advanced options for the pool. Look and you will find and option for MAC address control, you enter the MAC addresses of each device, separated by a comma. Personally I think the option 61 method using the vendor identifier is better as it takes less effort, just one string. You also asked about option 66, this can be entered in the additional options section at the bottom of the dhcp settings page.
So you can go ahead and use your MACs, or wait until my commit makes it through testing, if the devs decide its a worthwhile addition.