DHCP option 66 for specific devices in vlan


I managed to set dhcp option 66 for all devices in a dedicated vlan, by just adding the DHCP-Option in LuCi. (I'm using a snapshot on my Archer C7.)


But that is not what I want. And I did not understand how to do that for a group of devices (Mitel 6568i phones) and use another "66" option for all other devices.
I guess it is some miracle with "vendorclass"

Any help is welcome.


Instead of Option 6 in this example, use 66:

1 Like

According to this, option 66 is not the url, but the hostname or IP. Moreover you cannot say that a tftp server is http :stuck_out_tongue:
Option 67 is the filename.



I found the line with option 66 and http and path in the mitel doc's.
The phones requires exact this!
And of course I have no need for an tftp server.

Everything works fine with http and https when I use it as a global option.

But I want to have 3 lines with option 66 but specific to the devices. Just like this.


How to point line 1 to Mitel phones, line 2 to Snom phones and line 3 to the rest of the world?

1 Like

Ok. I did a hard reset on my test-phone.
And from now on option 66 is only usable with a tftp server. Just like expected by you.

So I read the Mitel docs again and found some hints.

If Mitel IP Phones receive the server configuration from both DHCP Option 66 and DHCP Option 43,
then Option 43 takes precedence over Option 66

Sub-Option/Code 02 Configuration server (protocol,server, and path

A System Administrator can customize the IP Phone(s) in the network by entering a text string in the phone’s configuration files.
The following is an Option 43 example using Linux. On the startup of the phones, when the DHCP server receives the request with the information in this example, it allows the 6867i phones to use FTP and the 6869i phones to use TFTP from the same server

option space AastraIPPhone67i;
option AastraIPPhone67i.cfg-server-name code 02 = text;

option space AastraIPPhone67i;
option AastraIPPhone69i.cfg-server-name code 02 = text;

Subnet netmask {
	class "vendor-class-67i" {
		match if option vendor-class-identifier="AastraIPPhone67i";
		vendor-option-space AastraIPPhone67i;
		option AastraIPPhone67i.cfg-server-name "ftp://username:password@";
	class "vendor-class-69i" {
		match if option vendor-class-identifier="AastraIPPhone69i";
		vendor-option-space AastraIPPhone69i;
		option AastraIPPhone69i.cfg-server-name "tftp://";

Can I paste this into any OpenWrt file ?

Exactly as is, I don't think so. It looks to me like an isc-dhcpd configuration snippet. You can either convert it to dnsmasq config and add it in /etc/dnsmasq.conf or disable dnsmasq from dhcp and use isc-dhcpd.


I would like to stay with dnsmaq.
But i don't feel able to transfer the configuration to dnsmasq.
Just to less know-how and no newbie friendly documentation....

i.e. sub-option 02

I know that the hex code for option 43 looks like this:
2B 5A 02 0C

2B = Option numer 43
5A = Length of suboption 43 data
02 = Suboption
0C = Length of suboption

But how to bring these values into openwrt ?

dnsmasq options are well documented and readily available to those who sincerely seek them.

/etc/dnsmasq.conf supports practically all documented options... so perhaps you are overthinking things? or looking in the wrong place?

( that said... you may need the dnsmasq-full variant for some options )

1 Like

The problem is not reading the documentation.
The problem is understanding the documentation.
I have asked a Java developer. And same as I he also did not understand what to do. So I'm not the only one ...

The doc may be quite useful for developers and experienced users but not for newbies in all cases.

And if its so easy to find the right documentation. Please tell us how to find the right documentation. I'm willing to learn how to find.

1 Like

tried opening your favourite web search tool... and typing in;

"dnsmasq.conf" "vendor-class-identifier" "match"


1 Like

Using google search the first entry points to the openwrt forum.
Just where I startet yesterday ...

And there is nothing about how to point this "config vendorclass" to a specific vlan. It's just a global 66 option.

And here we are at my initial question. Or am I wrong?

did you try this first yet... and ensure it's working?

you mention you are a 'newbie'... I don't see how compounding two issues into one from the beginning is going to assist you in reaching your goal any quicker...

if the option above works on it's own... then you can do another web search for "dnsmasq for vlan"...


Yes, I have triple checked

After deleting custom settings at the phone, I reseted it to firmware defaults.
Then I cut the LAN/POE line.

Next steps are on the Archer C7
First I added this to /etc/config/dhcp

config vendorclass
	option networkid '6865i'
	option vendorclass 'AastraIPPhone6865i'
	list dhcp_option '66,'

And just to be sure that my changes take effect I have rebooted the router.

Then plugging in LAN wire on the phone.
The phone is checking for LLDP (not configured anywhere in my LAN), DHCP.
After a while the phone starts checking for new firmware on the http server, reads all configuration files and updates language packs.
Then it reboots. And voila.
All configured and working as expected.

To make a cross check I changed the http address in the vendorclass definition.
The phone responds with a loop. LLDP, DHCP, LLDP, DHCP, ....

Next time I made a typo at the vendorclass statement.
The phone did not try to update its config.

So in my simple view everything works ok.

VLAN's are working too.

But no vlan depend vendor config yet.


This is a kind of ugly workaround, but for a limited number of affected devices it works (for me):

config mac
	option mac '00:0e:84:XX:XX:XX'
	option networkid 'cisco-sip'
	list dhcp_option '66,172.XXX.XXX.1'

config mac
	option mac 'ac:a0:16:XX:XX:XX'
	option networkid 'cisco-sip1'
	list dhcp_option '66,172.XXX.XXX.1'