Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As you may well be aware the resolv.conf search appears to be limited to 6 domains. I need 7
Is there anyway to expand this or am I out of luck on this one?
One thing I noticed is that if you run nslookup on a short name that is in the 7th search it does work but ssh does not. I'm guessing that nslookup is actually reading the whole file and isn't limited.
Do you really need to reach each of the 7 domains from each server or host. It seems if you have that many domains you have them for different purposes so you could tailor the resolv.conf on specific hosts/servers to search the domains most germane to their purpose.
Alternatively you could put all your short names into a separate domain and add forward lookups for all of the servers into that. We do something similar to that here. Our extranet (internet) and intranet use different domain names so we add new servers to both domains. Internal lookups are satisfied by the intranet FQDN even if it doesn't match the one the target server knows itself as. The reverse lookups are all set to return the FQDN for the name the server knows itself by.
Well each of the search domains is for another part of the country (the reason why this did this is unclear to me but I can't change that). As for short names there are thousands
My guess is that when they add the new server at the site they make sure its not already in use. For most of these servers they follow a naming patter such as the following.
new york webserver would be nyweb1
new york mediaserver would be nymed1
By the way the limit is set in /usr/include/resolv.h in Linux:
Code:
# define MAXDNSRCH 6 /* max # domains in search path */
Setting that to 7 and recompiling the resolver stuff might work.
However, the time it will take to search 7 domains for the name might make things rather slow for the domain at the end of the list. Also when you update software (for a security fix or whatever) you'll have to remember to go and recompile again as it will likely revert to the 6 limit if it includes resolv.h.
If it were me I think I'd just have everyone use the FQDN - or as suggested before I'd have separate resolv.conf files for the hosts in different regions.
Pretty new to this stuff so I'm not sure how or what I need to compile to try that out. I found the file you were speaking of and I see that it is set to "6"
jlightner, thank you for information! I found a rather interesting reading about increasing the MAXDNSRCH value from Red Hat Bugzilla. However, has anybody successfully increased the resolv.conf search string value?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.