LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-11-2009, 01:57 PM   #1
Xitium
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Rep: Reputation: 0
resolv.conf search limited to six


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.
 
Old 05-11-2009, 02:10 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 05-11-2009, 02:18 PM   #3
Xitium
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 05-11-2009, 02:41 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
What is being done to insure there is no short name duplication (e.g. ralph.dom1 and ralph.dom2 would both have short name "ralph".)?
 
Old 05-11-2009, 02:52 PM   #5
Xitium
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
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

salt lake city webserver would be slcweb1

etc ..
 
Old 05-11-2009, 02:56 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 05-11-2009, 03:12 PM   #7
Xitium
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
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"

I am running Debian Lenny
 
Old 12-29-2009, 03:40 AM   #8
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Rep: Reputation: 16
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
search in /etc/resolv.conf gyanug Linux - Networking 1 04-10-2009 10:36 AM
search path in resolv.conf overwritten by the hostname after reboot powah Linux - Networking 3 03-20-2009 02:13 PM
/etc/resolv.conf question. Max Search Entries. grizly Linux - Networking 1 05-28-2008 07:43 PM
resolv.conf DNS search ( Anyway to continue searching next entry?) starsky Linux - Networking 5 08-22-2006 09:01 PM
resolv.conf search line dunkyb Linux - Networking 4 01-28-2005 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration