how to keep search suffix in /etc/resolv.conf

Chuck Mead csm at lunar-linux.org
Sun Nov 16 18:39:00 UTC 2003


Jingcao Hu wrote:

>Thanks Frank, Mattew and Mike. Unfortunately, I use the DHCP server which is
>provided by my ISP, so I don't have access to it. Meanwhile, I don't want to
>use my school's DNS server though, since using ISP's DNS server seems a
>little bit faster. Maybe I will just go ahead and put some code in my
>rc.local. 
>
>
>Frank Solensky <frank at solensky.org> writes:
>
>  
>
>>>Every time, when the system reboot, the dhcp client overwrite it. I
>>>am fine with the given DNS server, but I would like to keep my search
>>>suffix. More specifically, I want to have the "search a.b.c" to the
>>>domain that I want.
>>>      
>>>
>>If you're picking up the DNS server locations from your DHCP server, it
>>might be easier to get it to announce the domain name along with the
>>server addresses.
>>
>>If the server is another Linux system, the dhcpd.conf file should
>>include the line
>>    option domain-name "cmu.edu";
>>usually as a global configuration option.  The man page for dhcpd.conf
>>has more details.
>>
>>
>>    
>>
>
>  
>
Edit /etc/sysconfig/network-scripts/ifcfg-ethX (where X is the interface 
which is using DHCP)

Add the line:

PEERDNS=no

Restart your network and then edit your /etc/resolv.conf to say what you 
want. It will no longer be overwritten by dhclient updates.

-- 
csm
Lunar Project Leader
Disclaimer: "I am not a curmudgeon! No... really..."
Addendum: "Bwahahaha! Fire up the orbital mind-control lasers!" 






More information about the fedora-list mailing list