0

I have a quick question. Is it possible to make ISC dhcpd server insert the option 61 (client id) in DHCPOFFER, in case if it is present in DHCPDISCOVER? The ISC dhcpd version I'm using is dhcp-4.1.1 (dhcp-4.1.1-12.P1.el6_0.4.x86_64 CentOS rpm).

Thanks in advance

  • What are you trying to accomplish ? I would not complicate things just for doing so without a very specific objective. – Overmind Feb 27 '19 at 12:59
3

Yes, you can set options based on conditional statements in the ISC dhcpd server. Specifically you can test if the dhcp-client-identifier option is present in the incoming DHCP packet, and if it is set the option for the response packet to the incoming value by this expression:

   
# other options in scope ...
if exists dhcp-client-identifier {
  option dhcp-client-identifier = option dhcp-client-identifier;
}
# other options in scope ...

The left side of the = sets the server parameter name, the right side data expression will return the contents of the parameter name from the client packet.

For more info see man dhcp-eval and the SETTING PARAMETER VALUES USING EXPRESSIONS section at the bottom of man dhcp.conf

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.