LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 05-25-2004, 01:09 PM   #1
badgolfer73
LQ Newbie
 
Registered: May 2004
Location: outside boston
Distribution: Slackware 9.1
Posts: 14

Rep: Reputation: 0
suffix search orders and DHCP


hello all,

I have a nameresolution question: I use DHCP exclusively (Home and work). Our work DHCP servers are set up to only hand out one suffix search order of subdomain01.domain.com. However, we have multiple subdomains that I need to be ableto resolve via "shortname". I can go and edit resolv.conf to add subdomain02.domain.com, and that works fine, but when I restart, and the SHCP lease and lease settings are recieved from the DHCP server, any edits to the resolv.conf are overwritten, meaning that I can no longer resolve to any subdomain other than that which the DHCP server hands out. I currently have scripts that I run on start-up, depending on what network I am on, that mount various file servers and shares, but they are having a hard time resolving via shortname until I edit the resolv.conf. Am I limited to only using fully qualified names, or is there a way to have static suffix search orders even though I am using DHCP?

thx for your time....
 
Old 05-25-2004, 04:26 PM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
you can add the following to your /etc/resolv.conf

search domain.com domain2.com

this will search domain.com first, then domain2.com second

or
domain domain.com domain2.com

sorry, i dont know exactly what these do, i guess i should, this may give you some pointers

if this is what you are talking about

Last edited by adamwenner; 05-25-2004 at 04:27 PM.
 
Old 05-26-2004, 07:19 AM   #3
badgolfer73
LQ Newbie
 
Registered: May 2004
Location: outside boston
Distribution: Slackware 9.1
Posts: 14

Original Poster
Rep: Reputation: 0
Adding an entry to resolv.conf is not the issue. I can do that, and it works fine, until I restart networking, or the computer. When the network interface renews with DHCP, it receives a single suffix search order, and overwrites the resolv.conf, and all of its changes, in favor of its new search entry.

What I need to know, is if there is a way to static your search orders somewhere so that they do not constantly get overwritten.

many thanks
 
Old 05-26-2004, 07:55 AM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If you run dhcpcd with -R option it'll prevent it from replacing existing /etc/resolv.conf
therefore if you're running Slackware, edit /etc/rc.inet1 and add the option
 
Old 05-26-2004, 07:59 AM   #5
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
you can also do it another way that i just did

make a script and put the following lines in it

cat /etc/resolv.conf > /etc/resolv.bkup
echo "domain domain.com domain1.com" > /etc/resolv.conf
cat /etc/resolv.bkup >> /etc/resolv.conf

this will then put your domains at the beginning of the resolv.conf file, searching them first.

just add a reference to this script in your /etc/rc.local file
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why cannot compute suffix of object files? bhxs1809 Linux From Scratch 11 03-05-2012 01:04 PM
can't access/locate other PCs with different DNS suffix rsumbeling Linux - Networking 1 12-06-2004 06:41 PM
dnsmasq wont resolve local names without suffix Rooboy Linux - Networking 0 10-07-2004 07:46 AM
BIND9 and W2k dhcp clients DNS suffix issue. wasp4141 Linux - Networking 1 04-06-2004 11:56 PM
how to run a shell script which suffix is .bin??? yunxiang Linux - Software 2 05-05-2003 11:24 PM


All times are GMT -5. The time now is 09:02 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration