Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

DNS DHCP IPAM

Reply
Highlighted
Accepted Solution

Grant lease to hostname that contain specific name

Adviser
Posts: 64
5715     0

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

Highlighted

Re: Grant lease to hostname that contain specific name

Techie
Posts: 4
5716     0

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.

Highlighted

Re: Grant lease to hostname that contain specific name

Adviser
Posts: 64
5716     0

Thanks for the respond,

 

Finally i prefer to use user-class (option 77) to filter which client are allow to get IP from DHCP servers.

 

Thanks

Highlighted

Re: Grant lease to hostname that contain specific name

Moderator
Moderator
Posts: 148
5716     0

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).

 

 

Best Regards,

 

Bibin Thomas

Showing results for 
Search instead for 
Do you mean 

Recommended for You