DNS Search List 6 entrys limit.

Latest response

im trying to add more then 6 entry to the /etc/resolv.conf but its ignoring the 7 entry.
i understand by looking to /usr/include/resolv.h file that there is 6 entry limitation.

test7.com is not being use when i try to resolve something that is in this suffix.

/etc/resolv.conf example

search test1.com. test2.com. test3.com test4.com test5.com test6.com test7.com

is there any way to increase this number?

Responses

resolver has this limitation of 6 domains

Your two basic choices are:
1) rewrite the resolver libs
2) switch to Windows (I've stumbled upon systems with 30+ search suffixes defined - Windows supports like 50, more depending on the Windows version)

Be aware that for each search domain you add to a system - whether it be Windows or running a different resolver library - you slow down your DNS search results for any hosts not in those search domains. You also exert a higher and higher toll on your DNS servers for each DNS lookup that you perform. Basically, the default limit of six is there to keep you from doing Bad Things.

i don't want to rewrite libs and can't switch to windows.
but thank you any way for your answer.
by the way , some one suggested openresolv as a solution what do you think?

http://roy.marples.name/projects/openresolv/index

Not familiar with that project. However, in reading that link, it seems to only be designed to address scenarios where you have multiple DHClient actions creating conflicts in the contents of /etc/resolv.conf. You'd need to find a project that replaces or (more likely) supercedes libresolv.so.

Agreed. This doesn't solve the problem raised with the limit because it is still using the same resolver, it is just managing the configuration file which will still has the same limits.

openresolv (from the blurb on the website) sounds like a partial implementation of what NetworkManager already achieves.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.