Community discussions

MikroTik App
 
eggbean
just joined
Topic Author
Posts: 10
Joined: Sat May 16, 2020 8:53 am
Location: London, UK
Contact:

Search Domain (DHCP Option 119) not working

Mon Sep 28, 2020 10:46 am

Is there anything wrong with this? This is set, but the search domain does not seem to be added through DHCP on iOS.
/ip dhcp-server option add name=domain-search-list code=119 value="0x0c'soonoononono'0x02'co'0x02'uk'"
soonoononono.co.uk

The first part of the domain is obviously mangled, but it has 12 characters.

This is also set:
/ip dhcp-server network add address=192.168.88.0/24 comment=defconf dhcp-option=domain-search-option dns-server=192.168.88.2 domain=soonoononono.co.uk gateway=192.168.88.1 netmask=24
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Search Domain (DHCP Option 119) not working

Mon Sep 28, 2020 12:22 pm

Two points:
  • there is no "end of list" - 0x00 as the last byte of the "list"; I'm not sure whether end of string works the same when the payload is being parsed
  • Mikrotik follows the RFC and only sends options which the client is asking for. So as you say that it does not work with iOS in particular, enable DHCP logging in Mikrotik (/system logging add topics=dhcp) and check that the client sends 119 in the list of requested options
 
sid5632
Long time Member
Long time Member
Posts: 558
Joined: Fri Feb 17, 2017 6:05 pm

Re: Search Domain (DHCP Option 119) not working

Mon Sep 28, 2020 1:16 pm

Is this a typo.:
dhcp-option=domain-search-option
when you earlier had:
name=domain-search-list
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1352
Joined: Mon Sep 23, 2019 1:04 pm

Re: Search Domain (DHCP Option 119) not working

Mon Sep 28, 2020 3:50 pm

As sindy pointed out, you're missing the null termination.
And probably the mistake pointed out by sid5632.
Adding this in /ip dhcp-server option:
add code=119 name=option1 value="0x0c'soonoononono'0x02'co'0x02'uk'0x00"
Which translates in:
/ip dhcp-server option> print
 # NAME          CODE          VALUE                                                           RAW-VALUE                                                     
[..]
 2 option1        119         0x0c'soonoononono'0x02'co'0x02'uk'0x00         0c736f6f6e6f6f6e6f6e6f6e6f02636f02756b00
And selecting that option1 in my networks dhcp settings results in this:
dhcp,debug,packet     Domain-Search = 0C-73-6F-6F-6E-6F-6F-6E-6F-6E-6F-6E-6F-02-63-6F-02-75-6B-00 
And I think it works since this can be seen in a Windows 10 clients registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{...}]
[...]
"DhcpDomainSearchList"="soonoononono.co.uk"
 
eggbean
just joined
Topic Author
Posts: 10
Joined: Sat May 16, 2020 8:53 am
Location: London, UK
Contact:

Re: Search Domain (DHCP Option 119) not working

Tue Sep 29, 2020 2:18 am

Thanks everyone. I have fixed that typo, added the null byte and see it now being sent successfully to Windows, but it still does not seem to be working with iOS 14 (actually iPadOS).

Image

I can see in the router log that it is being requested and being sent to the iPad along with the other network information through DHCP. and as it is working on Windows, this is probably some issue to do with iOS/iPadOS.
 
eggbean
just joined
Topic Author
Posts: 10
Joined: Sat May 16, 2020 8:53 am
Location: London, UK
Contact:

Re: Search Domain (DHCP Option 119) not working

Tue Sep 29, 2020 3:00 am

This feature may have been broken on iOS since v4.3!

https://community.spiceworks.com/topic/ ... rver-names

Who is online

Users browsing this forum: No registered users and 39 guests