Apr 162017
 

I already wrote about using Mikrotik’s DNS to resolve a short name lookup in Windows. And there I noted that domain-name DHCP option seemingly has no effect on Linux. Well, let me introduce you to domain search option.

Most of the Linux/Unix based operating systems, whether it is Linux, FreeBSD, or MacOS support arguably a more proper way to define which domain we are referring to when using a single word host name.

To define suffix for domain search, just add option 119:

/ip dhcp-server option
add name="domain-search-option" code=119 value="'example'"

And of course add this option to DHCP network:

/ip dhcp-server network
set 1 dhcp-option=domain-search-option

PS: And no, you cannot use this instead of domain-name. Windows clients only support domain-name while Linux/Mac only supports domain-search option.

  One Response to “Adding Domain Search Option to Mikrotik DHCP”

Comments (1)
  1. This option is a list (see your RFC3397), so use instead:
    /ip dhcp-server option add name=”domain-search-option” code=119 value=”0x04’home’0x00″

    Another real life example:
    /ip dhcp-server option add name=”domain-search-option” code=119 value=”0x02’ad’0x04’test’0x03’com’0x02’uk’0x00C003″

    this is analog to resolv.conf’s:

    search ad.test.com.uk test.com.uk

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>