10-23-2018 09:04 PM
Hi Community, Is it possible to grant lease from dhcp request when it's contain with a specific word in its hostname (option 12)? Like test1.ptabc.xyz Example; if a dhcp request is received by the DHCP server with hostname contain ptabc then DHCP server will give out a lease to that request, if nothing contain ptabc it will not give out lease Can someone help me out for this case? Best regard
Solved! Go to Solution.
10-24-2018 08:30 AM
In your example "test1" is the hostname and "ptabc" is the domain name. RFC 2132 indiates that domain names are addressed by option 15.
The Microsoft DHCP world has a policy based assignment option but anything that does not match a policy still gets an assignment from the pool.
I dont think DHCP is designed to do what you are asking.
10-31-2018 02:30 AM
01-15-2019 08:28 AM
Technically this is possible but may not be the best way to grant/deny lease
1. Navigate to DHCP-->IPv4 Filters-->Select IPv4 Option Filter
2. In the General section, give the filter a name (hostfilter?) and check "Apply this filter as a global DHCP class"
3. In the rules section, select, "host-name (12) string-->substring equals-->Offset 0, Length 4, test1"
4. Save and Close the Filter
5. Edit the required DHCP range-->toggle Advanced mode-->IPv4 Filters section-->Add your filter as a class filter and grant lease.
6. Restart DHCP service
Note: Applying such a filter may explicitly deny clients who for some reason fail to send option-12 data or does not match test1 in option 12 data (0 through 4).