-   Linux - Newbie (
-   -   suffix search orders and DHCP (

badgolfer73 05-25-2004 12:09 PM

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 However, we have multiple subdomains that I need to be ableto resolve via "shortname". I can go and edit resolv.conf to add, 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....

adamwenner 05-25-2004 03:26 PM

you can add the following to your /etc/resolv.conf


this will search first, then second


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

badgolfer73 05-26-2004 06:19 AM

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

Demonbane 05-26-2004 06:55 AM

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

adamwenner 05-26-2004 06:59 AM

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" > /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

All times are GMT -5. The time now is 12:25 AM.