Reply

Deny lease based on option 12 (hostname)

Techie
Posts: 3
3255     0

Hi Community,

 

Is it possible to deny a dhcp request when it's starting with a specific hostname (option 12)?

Example; if a dhcp request is received by the DHCP server with hostname x the DHCP server will not give out a lease to that request.

 

I was thinking of using a ipv4 filter but I don't know how to deny it.

Can someone help me out or point me in the right direction?

Re: Deny lease based on option 12 (hostname)

Moderator
Moderator
Posts: 45
3256     0

Hi There,

 

You can certainly deny a DHCP request based on the Hostname (Option 12) by using the IPv4 Filter.

 

Please follow the steps below:

 

  • Go to Data Management > DHCP > IPv4 Filters and create a new IPv4 Option Filter1.png

     

 

 

 

  • Give the IPv4 Option Filter your desired name and check the “Apply this filter as a global DHCP class” option. 2.png

     

 

 

  • In the Match rule section, select “host-name (12) string” and specify the Hostname (‘test’ in our example).

 3.png

 

  • Save and Close.

 

Now you can go to the Range in question and add the created IPv4 Option Filter “denyhostname” as a Class Filter and select the Action as “Deny Lease “

 

4.png

 

  • ‘Save & Close’ and Restart the DHCP services as and when requested.

 

 

Now when a Client with the corresponding Hostname requests for a lease, the DHCP Server would ignore the DHCPDiscover from the particular client and log “no free leases”.

 

 

Please refer to the snippet below.

 

5.png

 

Hope this helps.

 

Regards. 

Re: Deny lease based on option 12 (hostname)

[ Edited ]
Techie
Posts: 3
3256     0

Hi Braj,

 

Thank you for the help, I only can't seem to understand the part of making the class filter and I can't find the option to Deny Lease.

I have made a logic filter and the dropdown menu for deny lease is missing.

 

Also the pictures aren't working for me but that's alright.

Thanks in advance!

Re: Deny lease based on option 12 (hostname)

Moderator
Moderator
Posts: 45
3256     0

Hi There,

 

Thank you for your response.

 

Class Filter List can only be found in the IPv4 Range properties under "IPv4 Filters" tab (Toggle Advanced Mode).

 

Once you Add the required Option Filter in the Class Filter List, you can find a drop down menu listed under "Actions" in which you can find the "Grant Lease / Deny Lease" Options.

 


grant.png

 

Logic Filters do not have the Deny lease option as only Class Filter does.

 

Hope this helps.

 

Regards.

 

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You