What is the "Search Domains" field for in the tcp/ip DNS settings control panel/preference pane for?

78

18

On Mac OS X, if you go to System Preferences -> Network -> Advanced -> DNS on the left is an area where DHCP DNS resolvers show up, or you can enter in your own to override any that your router is dishing out.

On the right is a large field for "Search Domains:".

I am sure there is an analogous field on Windows and Linux as well.

I have looked at google, and also the help pages, which do not say much...

Domains are searched in the order you list them, and the search stops when a valid name is found.

To search a name hierarchy, use search domains of varying scope. For example: building.campus.university.edu, campus.university.edu, university.edu.

Can someone explain to me, or point me to a link that explains what this field is for, and what benefits there may be by me learning different value to enter into it.

I am also curious if anyone has seen any noticeable gains by altering the value for the default MTU from 1500 on Mac OS X when communicating over wireless-N.

Thanks

user17245

Posted 2010-09-03T17:16:29.823

Reputation: 1 107

Answers

77

These are for the mechanism for going from a machine name to a Fully Qualified Domain Name.

DNS searches can only look at a Fully Qualified Domain Name, such as mymachine.example.com. But, it's a pain to type out mymachine.example.com, you want to be able to just type mymachine.

Using Search Domains is the mechanism to do this. If you type a name that does not end with a period, it knows it needs to add the search domains for the lookup. So, lets say your Search Domains list was: example.org, example.com

mymachine

would try first mymachine.example.org, not find it, then try mymachine.example.com, found it, now done.

mymachine.example.com

would try mymachine.example.com.example.org (remember, it doesn't end with a period, still adds domains), fail, then mymachine.example.com.example.com, not find it, fall back to mymachine.example.com, found it, now done

mymachine.example.com. Ends with a period, no searching, just do mymachine.example.com

Soooo.....

If you have your own DNS domain such as example.com, put it there. If not, ignore it. It really is more corporate than a home setting.

Rich Homolka

Posted 2010-09-03T17:16:29.823

Reputation: 27 121

Any idea why I'd see "izzigo.tv" configured on my machine? Is that something that could have been set by DHCP by the ISP I am using? – Frank Schwieterman – 2016-11-03T02:16:37.147

1@FrankSchwieterman yes. This is something that DHCP can set – Rich Homolka – 2017-01-11T12:50:48.653

.local seems appropriate for environments where this feature isn't desired. – jimmont – 2018-10-22T16:38:11.420

1

When searching for a computer name like "MyMac", you need to know the fully-qualified name of that computer. It might just be MyMac., or it might be something like MyMac.MySchool.edu, or (in a business) MyMac.MyCompany.com. The search domains are how the system translates the short name to the full name.

This should be set per-connection, rather than once for your machine, because you may have something like a normal connection active at the same time as a VPN connection to your company, where traffic sent over the VPN should use a different search domain.

Joel Coehoorn

Posted 2010-09-03T17:16:29.823

Reputation: 26 787

1

All computers have what is called the fully-qualified name (something my Joe.MyCompany.com) and to access the computer you need to know this. The computer name is not enough. However, rather than make you type the fully-qualified, this is a list of entries the computer will try.

When you try to access joe (for example ping joe), it will (in your example) first try to access joe.building.campus.university.edu, then joe.campus.university.edu, then joe.university.edu.

If joe's computer was in another domain, you would need to type the fully name.

It is normally used to record different subdomains on your local intranet.

sgmoore

Posted 2010-09-03T17:16:29.823

Reputation: 5 961