Hello, spent the whole morning dealing with this and I think this should be documented somewhere.
If this isn’t the right place for this please move it somewhere else.
So, basically I wanted to push the local dns suffix to clients via IPv6 too, not just only via IPv4 which is quite easy from the DHCP server, networks, you just specify it under Domain (which sets option 15).
But, can you do it via IPv6? sure, DHCPv6 can, but it’s not that easy in RouterOS.
You have to set Option 24 to “something”. But what should that something contain?
I’ve found a post here: http://forum.mikrotik.com/t/ipv6-static-addressing/119775/1 but using that it pushes a malformed response to clients, seen in Wireshark too.
Digging the web I’ve found an example that uses cisco.com and a raw value as example
show=”cisco.com” value=”05636973636f03636f6d00”
But how do you get from cisco.com to that hex value? because cisco.com in hex is 636973636f2e636f6d
Digging some more I’ve found this post which explains the value (near the end): http://www.mattzuba.com/2011/03/windows-2008-rc2-dhcp-server-option-119/
So, we strip the dots, the 05 in front tells we have a component made of 5, then 03 tells we have 3 more in the next component and it all ends with null (00).
Now, if we wanted to push ‘lan’ as suffix to clients, since the default config lists router.lan in static dns, we should set this:
03 6C616E 00
/ipv6 dhcp-server option
add code=24 name=DOMAIN value=0x036C616E00
And then we only need to list ‘DOMAIN’ under our DHCPv6 Server Options ![]()
Not elegant, but it works. Wireshark doesn’t complain, clients get what they need instead of garbage.
Cheers.
Z.
