Community discussions

 
Znevna
newbie
Topic Author
Posts: 30
Joined: Mon Sep 23, 2019 1:04 pm

DHCPv6 - Option 24 - Domain Search List

Thu Nov 07, 2019 3:50 pm

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: viewtopic.php?t=134791#p663781 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 ... ption-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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5923
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCPv6 - Option 24 - Domain Search List

Thu Nov 07, 2019 5:53 pm

This is the usual format for DNS names at network level. No idea why it was made so complicated. A 00-terminated string with dots as separators would have been so much easier.
In DNS requests (port 53) it is even more complicated as there is a form of "compression" where aside of such length-value components you can also point to the same component elsewhere in the request!

Anyway, DHCPv6 (like most of IPv6) is an underdeveloped area of RouterOS. Often, "easy features" in IPv4 are not available in IPv6 or have to be worked around in complicated ways.
(e.g. when you want to send DNS servers in DHVPv6 reply you need to write the address as full HEX value instead of the usual colon-separated compressed IPv6 address format)
 
Znevna
newbie
Topic Author
Posts: 30
Joined: Mon Sep 23, 2019 1:04 pm

Re: DHCPv6 - Option 24 - Domain Search List

Thu Nov 07, 2019 5:59 pm

To my surprise, regarding option code 23, which was also bugging me, i've discovered that it automagically does this (in 6.46beta59):
You do not have the required permissions to view the files attached to this post.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5923
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCPv6 - Option 24 - Domain Search List

Thu Nov 07, 2019 7:39 pm

Ok, good to see that at least they are working on it!
I hope the v7 will have lots of other IPv6 features on-par with IPv4... at least it is now no longer an optional package, so there is hope!

Who is online

Users browsing this forum: MSN [Bot] and 133 guests