[Dnsmasq-discuss] How to return a DHCP Option value which repeats DHCP Client MAC address ?

Olivier oza.4h07 at gmail.com
Wed Aug 19 11:22:37 BST 2020


Hello,

For some class of devices, I would like to return a DHCP Option value which
repeats requester's MAC address (with case sensitivity control options).

dhcp-vendorclass=foo,"Foo"
dhcp-option=vendor:foo,43,"http://1.2.3.4/foo_<MAC_in_uper_case>.cfg"

dhcp-vendorclass=bar,"Bar"
dhcp-option=vendor:foo,43,"http://5.6.7.8/bar_<MAC_in_lower_case>.cfg"

For instance, if device of Foo class has 0123456789ab MAC, I would like to
get an option 43 set with "http://1.2.3.4/foo_0123456789AB.cfg".
If this device if of Bar class, I would like it to get "
http://5.6.7.8/bar_0123456789ab.cfg".

Please, note that:
- the MAC address must not include any separator,
- as such, striping leading 0 must be avoided (returning bar_123456789ab
instead of bar_0123456789ab).

Is it possible with dnsmasq 2.80 ?

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200819/02c55a3c/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list