DHCP option 6 multiple DNS server entries

Hello.
I am trying to push DHCP option 6 to DHCP clients to specify multiple DNS servers. I tried several syntaxes, but it only works with one entry enclosed in simple quotes. I tried ‘8.8.8.8’,‘1.1.1.1’ , or ‘8.8.8.8,1.1.1.1’ , no go on both. If I only specify one server (‘8.8.8.8’), it works as expected.
Thoughts?

I’d probably just set DNS in “/ip dhcp-server network”, but if you insist on overriding that option, this works:

/ip dhcp-server option
add code=6 name=dnstest value="'1.1.1.1''8.8.8.8''1.0.0.1''8.8.4.4'"

I’ll try with your syntax, thanks!

Yup,
It worked! Thanks a lot! I wish the wiki had better examples and clearer syntax explanations.

Manual/wiki is not too bad. It’s just that when you create options manually, you’re really creating raw bytes that will be sent to clients and you need to undestand what exact format each option uses. For DNS it’s four bytes for first address, four bytes for another, etc. And the ‘10.10.10.10’ as simpler way how to enter address (instead of hexadecimal numbers) is documented. There could be more examples, sure. But specifically this DNS option can be set in “/ip dhcp-server network”, so you shouldn’t even need to create it manually.

Oh!
I missed that tab (Networks)!
Thanks for the cue, I’m a noob. :slight_smile: