11337 questions

13512 answers


31662 members

0 votes
300 views 0 comments

Hi community

I have a RUTX11

On the lan side I have a device that needs to get specific options like :

option my_vendor.enroll-url "address.of.enrollement";
option my_vendor.enroll-bundle "bundlename";
option my_vendor.enroll-password "my-secret-token";
option my_vendor.api-port "8443";

so here is what I tried in the rutx shell :

uci set dhcp.my_vendor='vendorclass'
uci set dhcp.my_vendor.vendorclass='*my_vendor*'
uci add_list dhcp.my_vendor.dhcp_option='2,url.of.firmware'
uci add_list dhcp.my_vendor.dhcp_option='3,address.of.enrollement'
uci add_list dhcp.my_vendor.dhcp_option='4,enroll.bundle.name'
uci add_list dhcp.my_vendor.dhcp_option='5,my.secret.token'
uci add_list dhcp.my_vendor.dhcp_option='6,api.port'
uci commit dhcp
/etc/init.d/dnsmasq restart

options correctly added in /etc/config/dhcp but no option is returned in the DHCP response.

so I tried with :

vendorclass="my_vendor" (no wildcard, matching the exact vendorclass)--> FAILED
Mac instead of vendorclass --> FAILED
Putting all options in a single line --> FAILED
Assigned the option to the LAN interface ---> FAILED

Does anyone has a working setup for that ?

1 Answer

–1 vote

I suggest looking at the OpenWRT page about using DHCP options: