Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-05-2004, 05:51 PM   #1
LQ Newbie
Registered: Mar 2004
Location: Spokane, WA
Distribution: Mandrake 9.1, 9.2, RH9, OpenBSD
Posts: 13

Rep: Reputation: 0
How do I set up Slackware 9.1 to use DHCP with a static DNS?

I am trying out Slackware on an extra box for testing and learning.

I've set up my eth0 to use dhcp in the inet.conf file. Although it works great for pickup up the address and gateway, it overwrites my resolve.conf file where I put the static DNS address.

How do I get it to leave the resolve.conf alone...or get it to write the static IP addresses in the resolve.conf file when it starts the network?

I checked rc.inet1.conf, rc.inet2.conf but could not find anything that had to do with the DNS. Where should I be looking? Thanks for helping out this newbie.
Old 05-02-2004, 11:36 PM   #2
Registered: Aug 2003
Location: Planet Earth
Distribution: Linux Mint Debian Edition (LMDE)
Posts: 215

Rep: Reputation: 31
Adding a -R option to the dhcpcd command in /etc/rc.d/rc.inet1 will prevent /etc/resolv.conf from being updated by dhcpcd.
Old 12-18-2012, 09:30 AM   #3
Registered: Aug 2012
Distribution: Slackware 13.37
Posts: 46

Rep: Reputation: Disabled
I know it's bad to resurrect old posts, but when searching for "Slackware use dhcp with static nameserver", this one is one of the top results.

From Slackware 13.37 (maybe previous versions as well), you can add this to your card config in "rc.inet1.conf":
Replace x by your card number.

Using DHCP, your /etc/resolv.conf will not be modified.
Please note that this is a "per network card" setting. If using several NICs, and want to always use a static DNS server, make the change for each NIC.


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
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 12:39 AM
How to run Dyn. DNS on a static IP for a box on dhcp chuddy117 Linux - Networking 2 10-04-2004 08:10 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
How to set a static IP and DNS server phil1076 Linux - Networking 1 08-19-2003 06:20 PM
DNS, NIS, Static <-> Dynamic DHCP, Proxy bjc Linux - Networking 5 11-12-2000 05:20 AM > Forums > Linux Forums > Linux - Newbie

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

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